Interface ILibrary


  • public interface ILibrary
    Library belongs to an application. The content of a library is stored by a process model version. Libraries can have dependencies between each other.
    Since:
    10.04.2007
    API:
    This is a public API.
    • Method Detail

      • getId

        String getId()
        Gets the identifier of the library
        Returns:
        identifier of the library
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • setId

        void setId​(String id)
        Sets the identifier of the library
        Parameters:
        id - the new identifier of the library
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
        Security:
        SESSION OWNS LibraryWriteId PERMISSION OR OWNS LibraryWriteId@SYSTEM PERMISSION
      • getName

        String getName()
        Gets the name of the project that this library belongs to. Please note that this is not equal to the library ID, which is returned by getId()!
        Returns:
        name of the library's project
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getDescription

        String getDescription()
        Gets the description of the library
        Returns:
        description of the library
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • setDescription

        void setDescription​(String description)
        Sets the description of the library
        Parameters:
        description - the new description of the library.
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
        Security:
        SESSION OWNS LibraryWriteDescription PERMISSION OR OWNS LibraryWriteDescription@SYSTEM PERMISSION
      • getProvider

        String getProvider()
        Gets the provider of the library
        Returns:
        provider of the library
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • setProvider

        void setProvider​(String provider)
        Sets the provider of the library
        Parameters:
        provider - the new provider of the library
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
        Security:
        SESSION OWNS LibraryWriteProvider PERMISSION OR OWNS LibraryWriteProvider@SYSTEM PERMISSION
      • getVersion

        @Deprecated
        int getVersion()
        Deprecated.
        Returns:
        major version of the library
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getQualifiedVersion

        QualifiedVersion getQualifiedVersion()
        Returns:
        qualified version of the library
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • setQualifiedVersion

        void setQualifiedVersion​(QualifiedVersion qualifiedVersion)
        Parameters:
        qualifiedVersion - the new qualified version of the library
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
        Security:
        SESSION OWNS LibraryWriteVersion PERMISSION OR OWNS LibraryWriteVersion@SYSTEM PERMISSION
      • getProcessModelVersion

        IProcessModelVersion getProcessModelVersion()
        Gets the process model version that holds the library content
        Returns:
        process model version
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getRequiredLibrarySpecifications

        List<ILibrarySpecification> getRequiredLibrarySpecifications()
        Gets the required library specifications. The required library specifications in the returned list are ordered by their position attribute.
        Returns:
        list of required library specifications. Maybe empty. Never null
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • createRequiredLibrarySpecification

        @Deprecated
        ILibrarySpecification createRequiredLibrarySpecification​(String id)
        Creates a new required library specification
        Parameters:
        id - the library identifier of the required library
        Returns:
        the new required library specification
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
        Security:
        SESSION OWNS LibrarySpecificationCreate PERMISSION OR OWNS LibrarySpecificationCreate@SYSTEM PERMISSION
      • createRequiredLibrarySpecification

        ILibrarySpecification createRequiredLibrarySpecification​(String id,
                                                                 int position)
        Creates a new required library specification
        Parameters:
        id - the library identifier of the required library
        position - the position the library specification has in releation to the other library specifications of this library (must be >= 0)
        Returns:
        the new required library specification
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
        Security:
        SESSION OWNS LibrarySpecificationCreate PERMISSION OR OWNS LibrarySpecificationCreate@SYSTEM PERMISSION
      • deleteRequiredLibrarySpecification

        void deleteRequiredLibrarySpecification​(String id)
        Deletes the required library specification
        Parameters:
        id - the identifier of the required library specification to delete
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
        Security:
        SESSION OWNS LibrarySpecificationDelete PERMISSION OR OWNS LibrarySpecificationDelete@SYSTEM PERMISSION
      • isResolved

        boolean isResolved()
        Checks if the library is resolved. A library is resolved if all direct and indirect required libraries are available in the system.
        Returns:
        true if library is resolved, otherwise false
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • findLibraryInRequiredHierarchie

        ILibrary findLibraryInRequiredHierarchie​(String libraryId)
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getRequiredLibraries

        List<ILibrary> getRequiredLibraries()
        Gets all libraries that the library requires (depends of) direct. The libraries in the returned list are ordered by the position attribute of the required library specifications that specifies the requirement of the library.
        Returns:
        list of all required libraries. Maybe empty. Never null.
        Throws:
        PersistencyException - if persistency access fails
        See Also:
        IProcessModelVersion.getAllRelatedProcessModelVersions(ProcessModelVersionRelation)
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getAllRequiredLibraries

        List<ILibrary> getAllRequiredLibraries()

        Gets all libraries that are required by this library, in breadth-first order, without duplicates.

        The libraries in the returned list are ordered as follows:

        1. Direct required libraries ordered by position in dependency list (See ILibrarySpecification.getPosition()). Libraries with the same position will be ordered alphabetically.
        2. Libraries that are required by the direct required libraries (1st level of indirection) ordered first by position of the direct required library and second by their own position.
        3. Libraries that are required by the 1st level of indirect required libraries (i.e. 2nd level of indirection).
        4. etc ...

        Example:

        1. LibZurich -> LibBern, LibLucerne
        2. LibBern -> LibGeneva, LibBasel, LibLausanne
        3. LibLucerne -> LibBasel, LibSierre
        4. LibBasel -> LibLausanne, LibZug

        For this configuration getAllRequiredLibraries() will return the following list of all required libraries for LibZurich:

        [LibBern, LibLucerne, LibGeneva, LibBasel, LibLausanne, LibSierre, LibZug]

        Returns:
        list of all required libraries. Maybe empty. Never null.
        Throws:
        PersistencyException - if persistency access fails
        See Also:
        IProcessModelVersion.getAllRelatedProcessModelVersions(ProcessModelVersionRelation)
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getDependentLibraries

        List<ILibrary> getDependentLibraries()
        Gets all libraries that depend on this library direct
        Returns:
        list of all dependent libraries. Maybe empty. Never null.
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getAllDependentLibraries

        List<ILibrary> getAllDependentLibraries()
        Gets all libraries that depend on this library direct and indirect
        Returns:
        list of all dependent libraries. Maybe empty. Never null.
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • findMatchingLibrarySpecifications

        List<ILibrarySpecification> findMatchingLibrarySpecifications()
        Gets all library requirement specifications which match this library id and version.
        The returned libraries are candidates which could depend on this library.
        Returns:
        librarySpecifications which match this library.
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getCircularDependentLibraries

        List<List<ILibrary>> getCircularDependentLibraries()
        Gets a list of library pathes that describes the circular dependent libraries of this library. A library path is a list of libraries.
        E.g. If lib1 requires lib2 and lib3, lib2 requires lib6, lib3 requires lib6 and lib6 requires lib1 then this method returns the following: [[lib1, lib2, lib6, lib1], [lib1, lib3, lib6, lib1]]
        Returns:
        list of circular dependent library pathes
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • findRequiredLibrarySpecification

        ILibrarySpecification findRequiredLibrarySpecification​(String id)
        Finds a required library specification with it's id
        Parameters:
        id - the id of the required library specification
        Returns:
        library specification or null
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.