Class ECPRepositoryImpl

    • Constructor Detail

      • ECPRepositoryImpl

        public ECPRepositoryImpl​(ECPProvider provider,
                                 java.lang.String name,
                                 ECPProperties properties)
        Constructor used to create an instance through user input.
        Parameters:
        provider - the ECPProvider for this repository
        name - the name of this repository
        properties - the ECPProperties of this repository
      • ECPRepositoryImpl

        public ECPRepositoryImpl​(java.io.ObjectInput in)
                          throws java.io.IOException
        Constructor used by the ECPRepositoryManager when loading existing repositories during startup.
        Parameters:
        in - the ObjectInput to parse
        Throws:
        java.io.IOException - when an error occurs
    • Method Detail

      • getType

        public java.lang.String getType()
        This return the type of the object.
        Specified by:
        getType in class Element
        Returns:
        the type
      • setLabel

        public void setLabel​(java.lang.String label)
        Sets the label.
        Specified by:
        setLabel in interface InternalRegistryElement
        Parameters:
        label - the Label to set
      • setDescription

        public void setDescription​(java.lang.String description)
        Sets the description.
        Specified by:
        setDescription in interface InternalRegistryElement
        Parameters:
        description - the Description to set
      • isDisposed

        public boolean isDisposed()
        Whether this instance is already disposed.
        Specified by:
        isDisposed in interface ECPDisposable
        Returns:
        true if already disposed, false otherwise.
      • getAdapter

        public java.lang.Object getAdapter​(java.lang.Class adapterType)
        Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

        This implementation of the method declared by IAdaptable passes the request along to the platform's adapter manager; roughly Platform.getAdapterManager().getAdapter(this, adapter). Subclasses may override this method (however, if they do so, they should invoke the method on their superclass to ensure that the Platform's adapter manager is consulted).

        Parameters:
        adapterType - the class to adapt to
        Returns:
        the adapted object or null
        See Also:
        IAdaptable.getAdapter(Class)
      • dispose

        public void dispose()
        Disposes the current instance.
        Specified by:
        dispose in interface ECPDisposable
      • getProviderSpecificData

        public java.lang.Object getProviderSpecificData()
        This method returns provider specific data of this repository.
        Specified by:
        getProviderSpecificData in interface InternalRepository
        Returns:
        the provider specific data
      • setProviderSpecificData

        public void setProviderSpecificData​(java.lang.Object providerSpecificData)
        This method sets the provider specific data for this repository.
        Specified by:
        setProviderSpecificData in interface InternalRepository
        Parameters:
        providerSpecificData - the provider specific data to set
      • canDelete

        public boolean canDelete()
        Whether this instance can be deleted or not.
        Specified by:
        canDelete in interface ECPContainer
        Returns:
        true if this instance can be deleted, false otherwise.
      • delete

        public void delete()
        Deletes the current instance.
        Specified by:
        delete in interface ECPContainer
      • notifyObjectsChanged

        public void notifyObjectsChanged​(java.util.Collection<java.lang.Object> objects)
        This is a callback method used to notify the repository about changes.
        Specified by:
        notifyObjectsChanged in interface InternalRepository
        Parameters:
        objects - that have changed
      • getOpenProjects

        public InternalProject[] getOpenProjects()
        Return all open projects of that are shared on this repository.
        Returns:
        array of currently open ECPProjects that are shared on this repository
      • propertiesChanged

        protected void propertiesChanged​(java.util.Collection<java.util.Map.Entry<java.lang.String,​java.lang.String>> oldProperties,
                                         java.util.Collection<java.util.Map.Entry<java.lang.String,​java.lang.String>> newProperties)
        Description copied from class: PropertiesElement
        Called if the properties of the element change. Can be implemented by subclasses
        Overrides:
        propertiesChanged in class PropertiesElement
        Parameters:
        oldProperties - the old properties
        newProperties - the new properties