Interface CatalogService

  • All Known Implementing Classes:
    DefaultCatalogService

    public interface CatalogService
    Provides access to Catalogs, CatalogVersions and Session CatalogVersions
    Spring Bean ID:
    catalogService
    • Method Detail

      • setSessionCatalogVersion

        @Deprecated
        void setSessionCatalogVersion​(java.lang.String catalogId,
                                      java.lang.String catalogVersionName)
        Sets the CatalogVersionModel specified by catalogId and catalogVersionName as the active CatalogVersion of the current session. Previous set active CatalogVersions are replaced.
        Parameters:
        catalogId - the id of the Catalog the CatalogVersion belongs to
        catalogVersionName - the version of the Catalog version
        Throws:
        UnknownIdentifierException - if no CatalogVersion with the specified catalog id and version exists
        AmbiguousIdentifierException - if more than one CatalogVersion is found with the specified catalog id and version
        java.lang.IllegalArgumentException - if catalogId or catalogVersionName is null
      • addSessionCatalogVersion

        @Deprecated
        void addSessionCatalogVersion​(java.lang.String catalogId,
                                      java.lang.String catalogVersionName)
        Adds the CatalogVersionModel specified by catalogId and catalogVersionName to the current active Session CatalogVersions.
        Parameters:
        catalogId - the id of the Catalog the CatalogVersion belongs to
        catalogVersionName - the version of the Catalog version
        Throws:
        UnknownIdentifierException - if no CatalogVersion with the specified catalog id and version exists
        AmbiguousIdentifierException - if more than one CatalogVersion is found with the specified catalog id and version
        java.lang.IllegalArgumentException - if catalogId or catalogVersionName is null
      • getCatalogVersion

        @Deprecated
        CatalogVersionModel getCatalogVersion​(java.lang.String catalogId,
                                              java.lang.String catalogVersionName)
        Returns the CatalogVersionModel with the specified catalogId and catalogVersionName.
        Parameters:
        catalogId - the id for the catalog
        catalogVersionName - the version string for the catalog version
        Returns:
        the CatalogVersion with the specified catalog id and version
        Throws:
        UnknownIdentifierException - if no CatalogVersion with the specified catalog id and version exists
        AmbiguousIdentifierException - if more than one CatalogVersion is found with the specified catalog id and version
        java.lang.IllegalArgumentException - if catalogId or catalogVersionName is null
      • getAllCatalogs

        java.util.Collection<CatalogModel> getAllCatalogs()
        Returns all CatalogModels.
        Returns:
        an empty collection if no CatalogModel were found.
      • getAllCatalogsOfType

        <T extends CatalogModel> java.util.Collection<T> getAllCatalogsOfType​(java.lang.Class<T> catalogType)
        Returns for the given T (upper bound CatalogModel) all catalogs of T defined in the system
        Type Parameters:
        T - This could be a ClassificationSystemModel or a CatalogModel
        Returns:
        an empty collection if no ClassificationSystemModels or CatalogModel were found.
        Throws:
        java.lang.IllegalArgumentException - if catalogType is null
      • getCatalogForId

        CatalogModel getCatalogForId​(java.lang.String id)
        Returns the catalog with the specified id.
        Returns:
        the catalog with the specified id.
        Throws:
        UnknownIdentifierException - if no Catalog with the specified id is found
        AmbiguousIdentifierException - if more than one Catalog is found with the specified id
        java.lang.IllegalArgumentException - if id is null
      • getDefaultCatalog

        CatalogModel getDefaultCatalog()
        Returns the default catalog basing on CatalogModel.DEFAULTCATALOG property. If multiple catalogs the one created the latest will be returned.
        Returns:
        default CatalogModel, or null in case no default catalog was found.