public class DefaultCMSAdminItemService extends AbstractCMSAdminService implements CMSAdminItemService
CMSAdminItemServiceAbstractService.SerializableDTOACTIVECATALOGVERSION, ACTIVESITE, CLONE_CONTEXT, RESTORE_CONTEXTmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCMSAdminItemService() |
| Modifier and Type | Method and Description |
|---|---|
<T extends CMSItemModel> |
createItem(java.lang.Class<T> modelClass)
Will create a new instance of the given modelClass and set its uid
|
java.util.Optional<CMSItemModel> |
findByItemData(CMSItemData itemData)
Finds the
CMSItemModel uniquely identified by its uid and the catalogVersion defined by the
CMSItemData |
SearchResult<CMSItemModel> |
findByTypeCodeAndName(CatalogVersionModel catalogVersion,
java.lang.String typeCode,
java.lang.String name)
Count the number of CMS Items on a given catalog, typeCode and name.
|
CMSItemModel |
findByUid(java.lang.String uid)
Finds the
CMSItemModel uniquely identified by its uid and the catalogVersion currently in session |
CMSItemModel |
findByUid(java.lang.String uid,
CatalogVersionModel catalogVersion)
Finds the
CMSItemModel uniquely identified by its uid and catalogVersion |
protected java.lang.String |
generateCmsComponentUid() |
protected CatalogVersionService |
getCatalogVersionService() |
protected CMSItemDao |
getCmsItemDao() |
protected PersistentKeyGenerator |
getComponentUidGenerator() |
void |
setCatalogVersionService(CatalogVersionService catalogVersionService) |
void |
setCmsItemDao(CMSItemDao cmsItemDao) |
void |
setComponentUidGenerator(PersistentKeyGenerator componentUidGenerator) |
getActiveCatalogVersion, getActiveSite, getBaseSiteService, getUserService, setBaseSiteService, setUserServicegetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplacepublic CMSItemModel findByUid(java.lang.String uid, CatalogVersionModel catalogVersion) throws CMSItemNotFoundException
CMSItemModel uniquely identified by its uid and catalogVersionfindByUid in interface CMSAdminItemServiceuid - the CMSItemModel uidcatalogVersion - the CatalogVersionModel to which the item belongs toCMSItemModelCMSItemNotFoundException - when the cms item is not foundpublic CMSItemModel findByUid(java.lang.String uid) throws CMSItemNotFoundException
CMSItemModel uniquely identified by its uid and the catalogVersion currently in sessionfindByUid in interface CMSAdminItemServiceuid - the CMSItemModel uidCMSItemModelCMSItemNotFoundException - when the cms item is not foundpublic java.util.Optional<CMSItemModel> findByItemData(CMSItemData itemData)
CMSAdminItemServiceCMSItemModel uniquely identified by its uid and the catalogVersion defined by the
CMSItemDatafindByItemData in interface CMSAdminItemServiceitemData - the CMSItemData containing the uid and catalogVersionOptional containing the concrete class instance of CMSItemModel, otherwise
Optional#empty()public <T extends CMSItemModel> T createItem(java.lang.Class<T> modelClass)
createItem in interface CMSAdminItemServicemodelClass - a class (extending ItemModel) to instantiatepublic SearchResult<CMSItemModel> findByTypeCodeAndName(CatalogVersionModel catalogVersion, java.lang.String typeCode, java.lang.String name)
CMSAdminItemServicefindByTypeCodeAndName in interface CMSAdminItemServicecatalogVersion - the catalogVersion to count the cms items fromtypeCode - the type code we want to count from.name - the name of the cms item, never null.protected java.lang.String generateCmsComponentUid()
public void setCmsItemDao(CMSItemDao cmsItemDao)
cmsItemDao - the cmsItemDao to setprotected CMSItemDao getCmsItemDao()
public void setComponentUidGenerator(PersistentKeyGenerator componentUidGenerator)
componentUidGenerator - the componentUidGenerator to setprotected PersistentKeyGenerator getComponentUidGenerator()
protected CatalogVersionService getCatalogVersionService()
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
Copyright © 2018 SAP SE. All Rights Reserved.