public interface CatalogVersionService
| Modifier and Type | Method and Description |
|---|---|
void |
addSessionCatalogVersion(CatalogVersionModel catalogVersion)
Adds the
CatalogVersionModel specified by catalogId and catalogVersionName to
the current active Session CatalogVersions. |
boolean |
canRead(CatalogVersionModel catalogVersion,
UserModel user)
Determines whether user can read from given catalogVersion.
|
boolean |
canWrite(CatalogVersionModel catalogVersion,
UserModel user)
Determines whether user can write to given catalogVersion.
|
java.util.Collection<DuplicatedItemIdentifier> |
findDuplicatedIds(CatalogVersionModel catalogVersionModel)
Returs collection of duplicated items in given catalog.
|
java.util.Collection<CatalogVersionModel> |
getAllCatalogVersions()
Returns all catalog versions defined in the system.
|
<T extends CatalogVersionModel> |
getAllCatalogVersionsOfType(java.lang.Class<T> versionType)
Returns for the given
T (upper bound CatalogVersionModel) all catalog versions of T
defined in the system |
java.util.Collection<CatalogVersionModel> |
getAllReadableCatalogVersions(PrincipalModel principal)
Returns all readable
CatalogVersionModels for the given principal. |
java.util.Collection<CatalogVersionModel> |
getAllWritableCatalogVersions(PrincipalModel principal)
Returns all writable
CatalogVersionModels for the given principal. |
CatalogVersionModel |
getCatalogVersion(java.lang.String catalogId,
java.lang.String catalogVersionName)
|
CatalogVersionModel |
getSessionCatalogVersionForCatalog(java.lang.String catalogId)
Returns the
CatalogVersionModel in the session with the specified catalogId. |
java.util.Collection<CatalogVersionModel> |
getSessionCatalogVersions()
Returns a collection of the
CatalogVersionModels which are activated for the current session. |
java.util.Collection<CatalogVersionModel> |
getSessionCatalogVersionsForCatalog(java.lang.String catalogId)
Returns the
CatalogVersionModels in the session of the CatalogModel matching the specified
catalogId. |
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. |
void |
setSessionCatalogVersions(java.util.Collection<CatalogVersionModel> catalogVersions)
Sets the specified collection of
CatalogVersionModels as the active CatalogVersions of the current
session. |
void setSessionCatalogVersion(java.lang.String catalogId,
java.lang.String catalogVersionName)
CatalogVersionModel specified by catalogId and catalogVersionName as
the active CatalogVersion of the current session. Previously set active CatalogVersions are replaced.catalogId - the id of the Catalog the CatalogVersion belongs tocatalogVersionName - the name of the Catalog versionUnknownIdentifierException - if no CatalogVersion with the specified catalog id and version existsAmbiguousIdentifierException - if more than one CatalogVersion is found with the specified catalog id and versionjava.lang.IllegalArgumentException - if catalogId or catalogVersionName is nullvoid setSessionCatalogVersions(java.util.Collection<CatalogVersionModel> catalogVersions)
CatalogVersionModels as the active CatalogVersions of the current
session. The previous active session catalog versions are replaced.catalogVersions - the catalogVersions to be set as active session CatalogVersionsjava.lang.IllegalArgumentException - if catalogVersions is nullvoid addSessionCatalogVersion(CatalogVersionModel catalogVersion)
CatalogVersionModel specified by catalogId and catalogVersionName to
the current active Session CatalogVersions.catalogVersion - CatalogVersion to addjava.lang.IllegalArgumentException - if catalogVersion is nulljava.util.Collection<CatalogVersionModel> getSessionCatalogVersions()
CatalogVersionModels which are activated for the current session.CatalogVersionModel getCatalogVersion(java.lang.String catalogId, java.lang.String catalogVersionName)
catalogId - the id for the catalogcatalogVersionName - the version string for the catalog versionUnknownIdentifierException - if no CatalogVersion with the specified catalog id and version existsAmbiguousIdentifierException - if more than one CatalogVersion is found with the specified catalog id and versionjava.lang.IllegalArgumentException - if catalogId or catalogVersionName is nullCatalogVersionModel getSessionCatalogVersionForCatalog(java.lang.String catalogId)
CatalogVersionModel in the session with the specified catalogId. This method
expects only one catalog version per catalog in the session, which is true for majority of cases. If this is not
the case, the AmbiguousIdentifierException will be thrown.catalogId - the Catalog id the CatalogVersion belongs tocatalogId, or null if no
such catalog version was found.java.lang.IllegalArgumentException - if catalogId is nullAmbiguousIdentifierException - if more than one CatalogVersionModel can be found in the session with the specified
catalogIdjava.util.Collection<CatalogVersionModel> getSessionCatalogVersionsForCatalog(java.lang.String catalogId)
CatalogVersionModels in the session of the CatalogModel matching the specified
catalogId.catalogId - the Catalog id the CatalogVersion belongs toCatalogVersionModels or empty collection if no matching catalog versions were
found in the session.java.lang.IllegalArgumentException - if catalogId is nullboolean canRead(CatalogVersionModel catalogVersion, UserModel user)
catalogVersion - target CatalogVersionModeluser - target UserModelboolean canWrite(CatalogVersionModel catalogVersion, UserModel user)
catalogVersion - target CatalogVersionModeluser - target UserModeljava.util.Collection<CatalogVersionModel> getAllWritableCatalogVersions(PrincipalModel principal)
CatalogVersionModels for the given principal.principal - target principaljava.util.Collection<CatalogVersionModel> getAllReadableCatalogVersions(PrincipalModel principal)
CatalogVersionModels for the given principal.principal - target principaljava.util.Collection<CatalogVersionModel> getAllCatalogVersions()
<T extends CatalogVersionModel> java.util.Collection<T> getAllCatalogVersionsOfType(java.lang.Class<T> versionType)
T (upper bound CatalogVersionModel) all catalog versions of T
defined in the systemT - This could be a ClassificationSystemVersionModel or a CatalogVersionModelCatalogVersionModels or ClassificationSystemVersionModel were
found.java.lang.IllegalArgumentException - if versionType is nulljava.util.Collection<DuplicatedItemIdentifier> findDuplicatedIds(CatalogVersionModel catalogVersionModel)
catalogVersionModel - Copyright © 2018 SAP SE. All Rights Reserved.