Class DefaultPlatformObjectFacadeStrategy
- java.lang.Object
-
- com.hybris.backoffice.cockpitng.dataaccess.facades.object.DefaultPlatformObjectFacadeStrategy
-
- All Implemented Interfaces:
com.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
,com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeStrategy
- Direct Known Subclasses:
SAPRFCDestinationObjectFacadeStrategy
public class DefaultPlatformObjectFacadeStrategy extends java.lang.Object implements com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeStrategy
-
-
Constructor Summary
Constructors Constructor Description DefaultPlatformObjectFacadeStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canHandle(java.lang.Object object)
protected boolean
canPersistSingleElement(java.lang.Object value)
<T> T
clone(T objectToClone, com.hybris.cockpitng.dataaccess.context.Context ctx)
protected EnumerationValueModel
convert(HybrisEnumValue value)
<T> T
create(java.lang.String typeId, com.hybris.cockpitng.dataaccess.context.Context ctx)
<T> com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<T>
delete(java.util.Collection<T> objects, com.hybris.cockpitng.dataaccess.context.Context ctx)
<T> void
delete(T object, com.hybris.cockpitng.dataaccess.context.Context ctx)
protected <T> void
executeWithWorkflowTemplateActivation(java.util.function.Consumer<java.util.Collection<T>> consumer, java.util.Collection<T> toConsume, com.hybris.cockpitng.dataaccess.context.Context invocationCtx, java.util.function.Function<ItemModel,WorkflowTemplateActivationAction> actionMapper)
com.hybris.cockpitng.dataaccess.facades.clone.CloneStrategyRegistry
getCloneStrategyRegistry()
protected com.hybris.cockpitng.labels.LabelService
getLabelService()
java.lang.String
getObjectId(java.lang.Object object)
com.hybris.cockpitng.validation.ValidationHandler
getValidationHandler()
<T> boolean
isModified(T object)
<T> boolean
isNew(T object)
<T> T
load(java.lang.String objectId, com.hybris.cockpitng.dataaccess.context.Context ctx)
protected void
logItemDeletion(java.util.Collection<?> deletedObjects)
<T> T
reload(T object, com.hybris.cockpitng.dataaccess.context.Context ctx)
<T> com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<T>
save(java.util.Collection<T> objects, com.hybris.cockpitng.dataaccess.context.Context ctx)
Persist objects by given collection data.<T> T
save(T objectToSave, com.hybris.cockpitng.dataaccess.context.Context ctx)
void
setCloneStrategyRegistry(com.hybris.cockpitng.dataaccess.facades.clone.CloneStrategyRegistry cloneStrategyRegistry)
void
setItemModificationHistoryService(ItemModificationHistoryService itemModificationHistoryService)
void
setLabelService(com.hybris.cockpitng.labels.LabelService labelService)
void
setModelService(ModelService modelService)
void
setPlatformFacadeStrategyHandleCache(PlatformFacadeStrategyHandleCache platformFacadeStrategyHandleCache)
void
setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
void
setTypeService(TypeService typeService)
void
setValidationHandler(com.hybris.cockpitng.validation.ValidationHandler validationHandler)
void
setWorkflowTemplateActivationService(WorkflowTemplateActivationService workflowTemplateActivationService)
-
-
-
Method Detail
-
load
public <T> T load(java.lang.String objectId, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectNotFoundException
- Specified by:
load
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectNotFoundException
-
delete
public <T> void delete(T object, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectDeletionException
- Specified by:
delete
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectDeletionException
-
delete
public <T> com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<T> delete(java.util.Collection<T> objects, com.hybris.cockpitng.dataaccess.context.Context ctx)
- Specified by:
delete
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
-
logItemDeletion
protected void logItemDeletion(java.util.Collection<?> deletedObjects)
-
create
public <T> T create(java.lang.String typeId, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectCreationException
- Specified by:
create
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectCreationException
-
save
public <T> T save(T objectToSave, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectSavingException
- Specified by:
save
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectSavingException
-
save
public <T> com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<T> save(java.util.Collection<T> objects, com.hybris.cockpitng.dataaccess.context.Context ctx)
Persist objects by given collection data. Since 1808 this method is transactional.- Specified by:
save
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
- Parameters:
objects
- the data for updating objects in system. Each object is saved separately in a dedicated transaction.ctx
- context specifying the loaded attributes of the returned object as well as application settings- Returns:
- ObjectFacadeOperationResult object
-
clone
public <T> T clone(T objectToClone, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectCloningException
- Specified by:
clone
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectCloningException
-
executeWithWorkflowTemplateActivation
protected <T> void executeWithWorkflowTemplateActivation(java.util.function.Consumer<java.util.Collection<T>> consumer, java.util.Collection<T> toConsume, com.hybris.cockpitng.dataaccess.context.Context invocationCtx, java.util.function.Function<ItemModel,WorkflowTemplateActivationAction> actionMapper)
-
canPersistSingleElement
protected boolean canPersistSingleElement(java.lang.Object value)
-
isNew
public <T> boolean isNew(T object)
- Specified by:
isNew
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
-
isModified
public <T> boolean isModified(T object)
- Specified by:
isModified
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
-
reload
public <T> T reload(T object, com.hybris.cockpitng.dataaccess.context.Context ctx) throws com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectNotFoundException
- Specified by:
reload
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
- Throws:
com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectNotFoundException
-
convert
protected EnumerationValueModel convert(HybrisEnumValue value)
-
canHandle
public boolean canHandle(java.lang.Object object)
- Specified by:
canHandle
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeStrategy
-
getObjectId
public java.lang.String getObjectId(java.lang.Object object)
- Specified by:
getObjectId
in interfacecom.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
-
getLabelService
protected com.hybris.cockpitng.labels.LabelService getLabelService()
-
setLabelService
public void setLabelService(com.hybris.cockpitng.labels.LabelService labelService)
-
setModelService
public void setModelService(ModelService modelService)
-
setTypeService
public void setTypeService(TypeService typeService)
-
setPlatformFacadeStrategyHandleCache
public void setPlatformFacadeStrategyHandleCache(PlatformFacadeStrategyHandleCache platformFacadeStrategyHandleCache)
-
setItemModificationHistoryService
public void setItemModificationHistoryService(ItemModificationHistoryService itemModificationHistoryService)
-
setTypeFacade
public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
-
setWorkflowTemplateActivationService
public void setWorkflowTemplateActivationService(WorkflowTemplateActivationService workflowTemplateActivationService)
-
getValidationHandler
public com.hybris.cockpitng.validation.ValidationHandler getValidationHandler()
-
setValidationHandler
public void setValidationHandler(com.hybris.cockpitng.validation.ValidationHandler validationHandler)
-
getCloneStrategyRegistry
public com.hybris.cockpitng.dataaccess.facades.clone.CloneStrategyRegistry getCloneStrategyRegistry()
-
setCloneStrategyRegistry
public void setCloneStrategyRegistry(com.hybris.cockpitng.dataaccess.facades.clone.CloneStrategyRegistry cloneStrategyRegistry)
-
-