Class 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 Detail

      • DefaultPlatformObjectFacadeStrategy

        public DefaultPlatformObjectFacadeStrategy()
    • 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 interface com.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 interface com.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 interface com.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 interface com.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 interface com.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 interface com.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 interface com.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 interface com.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
      • isModified

        public <T> boolean isModified​(T object)
        Specified by:
        isModified in interface com.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 interface com.hybris.cockpitng.dataaccess.facades.object.ObjectCRUDHandler
        Throws:
        com.hybris.cockpitng.dataaccess.facades.object.exceptions.ObjectNotFoundException
      • canHandle

        public boolean canHandle​(java.lang.Object object)
        Specified by:
        canHandle in interface com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeStrategy
      • getObjectId

        public java.lang.String getObjectId​(java.lang.Object object)
        Specified by:
        getObjectId in interface com.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)
      • setItemModificationHistoryService

        public void setItemModificationHistoryService​(ItemModificationHistoryService itemModificationHistoryService)
      • setTypeFacade

        public void setTypeFacade​(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
      • 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)