public class DefaultCatalogVersionService extends AbstractBusinessService implements CatalogVersionService
AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCatalogVersionService() |
| 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 |
setCatalogVersionDao(CatalogVersionDao catalogVersionDao) |
void |
setSearchRestrictionService(SearchRestrictionService searchRestrictionService) |
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 |
setUserService(UserService userService) |
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplacepublic void setSessionCatalogVersion(java.lang.String catalogId,
java.lang.String catalogVersionName)
CatalogVersionServiceCatalogVersionModel specified by catalogId and catalogVersionName as
the active CatalogVersion of the current session. Previously set active CatalogVersions are replaced.setSessionCatalogVersion in interface CatalogVersionServicecatalogId - the id of the Catalog the CatalogVersion belongs tocatalogVersionName - the name of the Catalog versionpublic void setSessionCatalogVersions(java.util.Collection<CatalogVersionModel> catalogVersions)
CatalogVersionServiceCatalogVersionModels as the active CatalogVersions of the current
session. The previous active session catalog versions are replaced.setSessionCatalogVersions in interface CatalogVersionServicecatalogVersions - the catalogVersions to be set as active session CatalogVersionspublic java.util.Collection<CatalogVersionModel> getSessionCatalogVersions()
CatalogVersionServiceCatalogVersionModels which are activated for the current session.getSessionCatalogVersions in interface CatalogVersionServicepublic void addSessionCatalogVersion(CatalogVersionModel catalogVersion)
CatalogVersionServiceCatalogVersionModel specified by catalogId and catalogVersionName to
the current active Session CatalogVersions.addSessionCatalogVersion in interface CatalogVersionServicecatalogVersion - CatalogVersion to addpublic CatalogVersionModel getCatalogVersion(java.lang.String catalogId, java.lang.String catalogVersionName)
CatalogVersionServicegetCatalogVersion in interface CatalogVersionServicecatalogId - the id for the catalogcatalogVersionName - the version string for the catalog versionpublic CatalogVersionModel getSessionCatalogVersionForCatalog(java.lang.String catalogId)
CatalogVersionServiceCatalogVersionModel 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.getSessionCatalogVersionForCatalog in interface CatalogVersionServicecatalogId - the Catalog id the CatalogVersion belongs tocatalogId, or null if no
such catalog version was found.public java.util.Collection<CatalogVersionModel> getSessionCatalogVersionsForCatalog(java.lang.String catalogId)
CatalogVersionServiceCatalogVersionModels in the session of the CatalogModel matching the specified
catalogId.getSessionCatalogVersionsForCatalog in interface CatalogVersionServicecatalogId - the Catalog id the CatalogVersion belongs toCatalogVersionModels or empty collection if no matching catalog versions were
found in the session.public boolean canRead(CatalogVersionModel catalogVersion, UserModel user)
CatalogVersionServicecanRead in interface CatalogVersionServicecatalogVersion - target CatalogVersionModeluser - target UserModelpublic boolean canWrite(CatalogVersionModel catalogVersion, UserModel user)
CatalogVersionServicecanWrite in interface CatalogVersionServicecatalogVersion - target CatalogVersionModeluser - target UserModelpublic java.util.Collection<CatalogVersionModel> getAllReadableCatalogVersions(PrincipalModel principal)
CatalogVersionServiceCatalogVersionModels for the given principal.getAllReadableCatalogVersions in interface CatalogVersionServiceprincipal - target principalpublic java.util.Collection<CatalogVersionModel> getAllWritableCatalogVersions(PrincipalModel principal)
CatalogVersionServiceCatalogVersionModels for the given principal.getAllWritableCatalogVersions in interface CatalogVersionServiceprincipal - target principalpublic java.util.Collection<CatalogVersionModel> getAllCatalogVersions()
CatalogVersionServicegetAllCatalogVersions in interface CatalogVersionServicepublic void setCatalogVersionDao(CatalogVersionDao catalogVersionDao)
public <T extends CatalogVersionModel> java.util.Collection<T> getAllCatalogVersionsOfType(java.lang.Class<T> versionType)
CatalogVersionServiceT (upper bound CatalogVersionModel) all catalog versions of T
defined in the systemgetAllCatalogVersionsOfType in interface CatalogVersionServiceT - This could be a ClassificationSystemVersionModel or a CatalogVersionModelCatalogVersionModels or ClassificationSystemVersionModel were
found.public java.util.Collection<DuplicatedItemIdentifier> findDuplicatedIds(CatalogVersionModel catalogVersionModel)
CatalogVersionServicefindDuplicatedIds in interface CatalogVersionServicepublic void setUserService(UserService userService)
public void setSearchRestrictionService(SearchRestrictionService searchRestrictionService)
Copyright © 2018 SAP SE. All Rights Reserved.