public class DefaultCMSItemFacade extends java.lang.Object implements CMSItemFacade
CMSItemFacade.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.ThreadLocal<java.util.Map<java.lang.String,java.lang.Object>> |
convertedItem
Thread safe temporary storage of a convertedItem just before explicitly rollbacking the transaction in dryRun mode
|
| Constructor and Description |
|---|
DefaultCMSItemFacade() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
convertAndPopulate(CMSItemModel itemModel)
Converts and populates Map to return to the frontend.
|
protected ItemModel |
convertAndPopulate(java.util.Map<java.lang.String,java.lang.Object> itemMap)
Converts and populates model to save
|
protected CMSItemNotFoundException |
createCMSItemNotFoundException(java.lang.String uuid)
Creates a new
CMSItemNotFoundException. |
java.util.Map<java.lang.String,java.lang.Object> |
createItem(java.util.Map<java.lang.String,java.lang.Object> itemMap)
Create CMS Items given the attribute value map.
|
void |
deleteCMSItemByUuid(java.lang.String uuid)
Deletes one single CMSItem by its uuid (Universal Unique Identifier)
|
SearchResult<java.util.Map<java.lang.String,java.lang.Object>> |
findCMSItems(CMSItemSearchData cmsItemSearchData,
PageableData pageableData)
A paged Search for CMSItems in a given catalogversion.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
findCMSItems(java.util.List<java.lang.String> uuids)
A Search for CMSItems by their universally unique identifiers
|
protected CatalogVersionService |
getCatalogVersionService() |
protected CMSAdminSiteService |
getCmsAdminSiteService() |
java.util.Map<java.lang.String,java.lang.Object> |
getCMSItemByUuid(java.lang.String uuid)
Get one single CMSItem by its uuid (Universal Unique Identifier)
For more information about Unique Identifiers, see
UniqueItemIdentifierService |
protected CMSItemConverter |
getCmsItemConverter() |
protected Converter<CMSItemSearchData,CMSItemSearchData> |
getCmsItemSearchDataConverter() |
protected Validator |
getCmsItemSearchDataValidator() |
protected CMSItemSearchService |
getCmsItemSearchService() |
protected FacadeValidationService |
getFacadeValidationService() |
protected ItemDataPopulatorProvider |
getItemDataPopulatorProvider() |
protected ItemTypePopulatorProvider |
getItemTypePopulatorProvider() |
protected ModelService |
getModelService() |
protected OriginalClonedItemProvider |
getOriginalClonedItemProvider() |
SessionSearchRestrictionsDisabler |
getSessionSearchRestrictionsDisabler() |
protected PlatformTransactionManager |
getTransactionManager() |
protected TypeService |
getTypeService() |
protected UniqueItemIdentifierService |
getUniqueItemIdentifierService() |
protected ValidationErrorsProvider |
getValidationErrorsProvider() |
protected void |
initialUpdateValidation(java.lang.String uuid,
java.util.Map<java.lang.String,java.lang.Object> itemMap)
Checks if an item exists.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
saveItem(java.util.Map<java.lang.String,java.lang.Object> itemMap)
Saves Item performing task in local transaction.
|
protected void |
setCatalogInSession(java.util.Map<java.lang.String,java.lang.Object> source)
Sets the catalogVersion in the current session.
|
void |
setCatalogVersionService(CatalogVersionService catalogVersionService) |
protected void |
setCloneContext(java.util.Map<java.lang.String,java.lang.Object> source)
Sets the clone context in the current session.
|
void |
setCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService) |
void |
setCmsItemConverter(CMSItemConverter cmsItemConverter) |
void |
setCmsItemSearchDataConverter(Converter<CMSItemSearchData,CMSItemSearchData> cmsItemSearchDataConverter) |
void |
setCmsItemSearchDataValidator(Validator cmsItemSearchDataValidator) |
void |
setCmsItemSearchService(CMSItemSearchService cmsItemSearchService) |
void |
setFacadeValidationService(FacadeValidationService facadeValidationService) |
void |
setItemDataPopulatorProvider(ItemDataPopulatorProvider itemDataPopulatorProvider) |
void |
setItemTypePopulatorProvider(ItemTypePopulatorProvider itemTypePopulatorProvider) |
void |
setModelService(ModelService modelService) |
void |
setOriginalClonedItemProvider(OriginalClonedItemProvider originalClonedItemProvider) |
void |
setSessionSearchRestrictionsDisabler(SessionSearchRestrictionsDisabler sessionSearchRestrictionsDisabler) |
void |
setTransactionManager(PlatformTransactionManager transactionManager) |
void |
setTypeService(TypeService typeService) |
void |
setUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService) |
void |
setValidationErrorsProvider(ValidationErrorsProvider validationErrorsProvider) |
protected void |
transformValidationException(ModelSavingException e)
Parses the ModelSavingException and transforms it into a validation error.
|
java.util.Map<java.lang.String,java.lang.Object> |
updateItem(java.lang.String uuid,
java.util.Map<java.lang.String,java.lang.Object> itemMap)
Updates a CMS Item given the attribute value map and its uuid.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
validateItem(java.util.Map<java.lang.String,java.lang.Object> itemMap)
Validates and convert the item for the sole purpose of validation.
|
java.util.Map<java.lang.String,java.lang.Object> |
validateItemForCreate(java.util.Map<java.lang.String,java.lang.Object> itemMap)
Validates CMS Items given the attribute value map.
|
java.util.Map<java.lang.String,java.lang.Object> |
validateItemForUpdate(java.lang.String uuid,
java.util.Map<java.lang.String,java.lang.Object> itemMap)
Validates a CMS Item given the attribute value map and its uuid.
|
protected java.lang.ThreadLocal<java.util.Map<java.lang.String,java.lang.Object>> convertedItem
public SearchResult<java.util.Map<java.lang.String,java.lang.Object>> findCMSItems(CMSItemSearchData cmsItemSearchData, PageableData pageableData)
CMSItemFacadefindCMSItems in interface CMSItemFacadecmsItemSearchData - The catalog and filter informationpageableData - The paging informationpublic java.util.List<java.util.Map<java.lang.String,java.lang.Object>> findCMSItems(java.util.List<java.lang.String> uuids)
throws CMSItemNotFoundException
CMSItemFacadefindCMSItems in interface CMSItemFacadeuuids - The list of uuids of the CMSItems to look forCMSItemNotFoundException - if the item is not foundpublic java.util.Map<java.lang.String,java.lang.Object> getCMSItemByUuid(java.lang.String uuid)
throws CMSItemNotFoundException
CMSItemFacadeUniqueItemIdentifierServicegetCMSItemByUuid in interface CMSItemFacadeuuid - - the universal unique identifierMap<String, Object> representation of the CMS ItemCMSItemNotFoundException - - when a CMS Item can not be found for a given uuid.public java.util.Map<java.lang.String,java.lang.Object> createItem(java.util.Map<java.lang.String,java.lang.Object> itemMap)
throws CMSItemNotFoundException
CMSItemFacadecreateItem in interface CMSItemFacadeitemMap - - the Map<String, Object> that contains the attributes values for the new CMSItem.CMSItemNotFoundException - - when a CMS Item can not be found for a given uuid.public java.util.Map<java.lang.String,java.lang.Object> updateItem(java.lang.String uuid,
java.util.Map<java.lang.String,java.lang.Object> itemMap)
throws CMSItemNotFoundException
CMSItemFacadeUniqueItemIdentifierServiceupdateItem in interface CMSItemFacadeuuid - - the universal unique identifieritemMap - - the Map<String, Object> that contains the attributes values for the new CMSItem.CMSItemNotFoundException - - when a CMS Item can not be found for a given uuid.protected void initialUpdateValidation(java.lang.String uuid,
java.util.Map<java.lang.String,java.lang.Object> itemMap)
throws CMSItemNotFoundException
uuid - the item unique identifieritemMap - the itemMap representation of the item model.CMSItemNotFoundException - when the item does not exist.protected java.util.Map<java.lang.String,java.lang.Object> saveItem(java.util.Map<java.lang.String,java.lang.Object> itemMap)
throws CMSItemNotFoundException
itemMap - the itemMap to be savedCMSItemNotFoundExceptionprotected void transformValidationException(ModelSavingException e)
e - the ModelSavingExceptionprotected ItemModel convertAndPopulate(java.util.Map<java.lang.String,java.lang.Object> itemMap)
itemMap - the Map representing the ItemModel to be converted and savedprotected java.util.Map<java.lang.String,java.lang.Object> convertAndPopulate(CMSItemModel itemModel)
itemModel - the itemModel to be converted to the Map.public void deleteCMSItemByUuid(java.lang.String uuid)
throws CMSItemNotFoundException
CMSItemFacadedeleteCMSItemByUuid in interface CMSItemFacadeuuid - - the universal unique identifierCMSItemNotFoundException - - when a CMS Item can not be found for a given uuid.public java.util.Map<java.lang.String,java.lang.Object> validateItemForUpdate(java.lang.String uuid,
java.util.Map<java.lang.String,java.lang.Object> itemMap)
throws CMSItemNotFoundException
CMSItemFacadeUniqueItemIdentifierServicevalidateItemForUpdate in interface CMSItemFacadeuuid - - the universal unique identifieritemMap - - the Map<String, Object> that contains the attributes values for the new CMSItem.CMSItemNotFoundException - - when a CMS Item can not be found for a given uuid.public java.util.Map<java.lang.String,java.lang.Object> validateItemForCreate(java.util.Map<java.lang.String,java.lang.Object> itemMap)
throws CMSItemNotFoundException
CMSItemFacadevalidateItemForCreate in interface CMSItemFacadeitemMap - - the Map<String, Object> that contains the attributes values for the new CMSItem.CMSItemNotFoundException - - when a CMS Item can not be found for a given uuid.protected java.util.Map<java.lang.String,java.lang.Object> validateItem(java.util.Map<java.lang.String,java.lang.Object> itemMap)
itemMap - the item model representation as a mapCMSItemNotFoundException - when any item in its map does not exist.protected CMSItemNotFoundException createCMSItemNotFoundException(java.lang.String uuid)
CMSItemNotFoundException.uuid - The string representing the UUID of the item not found.protected CMSItemConverter getCmsItemConverter()
public void setCmsItemConverter(CMSItemConverter cmsItemConverter)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected UniqueItemIdentifierService getUniqueItemIdentifierService()
public void setUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService)
protected void setCatalogInSession(java.util.Map<java.lang.String,java.lang.Object> source)
throws CMSItemNotFoundException
source - CMSItemNotFoundExceptionprotected void setCloneContext(java.util.Map<java.lang.String,java.lang.Object> source)
source - protected ItemTypePopulatorProvider getItemTypePopulatorProvider()
public void setItemTypePopulatorProvider(ItemTypePopulatorProvider itemTypePopulatorProvider)
protected CMSItemSearchService getCmsItemSearchService()
public void setCmsItemSearchService(CMSItemSearchService cmsItemSearchService)
protected Validator getCmsItemSearchDataValidator()
public void setCmsItemSearchDataValidator(Validator cmsItemSearchDataValidator)
protected FacadeValidationService getFacadeValidationService()
public void setFacadeValidationService(FacadeValidationService facadeValidationService)
protected Converter<CMSItemSearchData,CMSItemSearchData> getCmsItemSearchDataConverter()
public void setCmsItemSearchDataConverter(Converter<CMSItemSearchData,CMSItemSearchData> cmsItemSearchDataConverter)
protected ValidationErrorsProvider getValidationErrorsProvider()
public void setValidationErrorsProvider(ValidationErrorsProvider validationErrorsProvider)
protected PlatformTransactionManager getTransactionManager()
public void setTransactionManager(PlatformTransactionManager transactionManager)
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
protected CatalogVersionService getCatalogVersionService()
public void setCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService)
protected CMSAdminSiteService getCmsAdminSiteService()
protected TypeService getTypeService()
public void setTypeService(TypeService typeService)
public SessionSearchRestrictionsDisabler getSessionSearchRestrictionsDisabler()
public void setSessionSearchRestrictionsDisabler(SessionSearchRestrictionsDisabler sessionSearchRestrictionsDisabler)
protected OriginalClonedItemProvider getOriginalClonedItemProvider()
public void setOriginalClonedItemProvider(OriginalClonedItemProvider originalClonedItemProvider)
protected ItemDataPopulatorProvider getItemDataPopulatorProvider()
public void setItemDataPopulatorProvider(ItemDataPopulatorProvider itemDataPopulatorProvider)
Copyright © 2018 SAP SE. All Rights Reserved.