Class TranslationCustomPersistenceHandler
java.lang.Object
org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
org.broadleafcommerce.openadmin.server.service.handler.TranslationCustomPersistenceHandler
- All Implemented Interfaces:
CustomPersistenceHandler
,org.springframework.core.Ordered
@Component("blTranslationCustomPersistenceHandler")
public class TranslationCustomPersistenceHandler
extends CustomPersistenceHandlerAdapter
Custom persistence handler for Translations, it verifies on "add" that the combination of the 4 "key" fields
is not repeated (as in a software-enforced unique index, which is not utilized because of sandboxing and multitenancy concerns).
- Author:
- gdiaz
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SandBoxHelper
protected SystemPropertiesService
protected TranslationService
Fields inherited from interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler
DEFAULT_ORDER
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) canHandleAdd
(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an add request from the admincanHandleUpdate
(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an update request from the adminprotected Boolean
classMatches
(PersistencePackage persistencePackage) update
(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) Methods inherited from class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
canHandleFetch, canHandleInspect, canHandleRemove, fetch, getClassForName, getMetadata, getOrder, getPolymorphicClasses, getResultSet, inspect, isAdornedListOperation, isAssignableFrom, isBasicOperation, isMapOperation, meetsCustomCriteria, remove, willHandleSecurity
-
Field Details
-
spService
-
translationService
-
sandBoxHelper
-
-
Constructor Details
-
TranslationCustomPersistenceHandler
public TranslationCustomPersistenceHandler()
-
-
Method Details
-
classMatches
-
canHandleAdd
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with an add request from the admin- Specified by:
canHandleAdd
in interfaceCustomPersistenceHandler
- Overrides:
canHandleAdd
in classCustomPersistenceHandlerAdapter
- Parameters:
persistencePackage
- details about the add operation- Returns:
- whether or not this handler supports adds
-
canHandleUpdate
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with an update request from the admin- Specified by:
canHandleUpdate
in interfaceCustomPersistenceHandler
- Overrides:
canHandleUpdate
in classCustomPersistenceHandlerAdapter
- Parameters:
persistencePackage
- details about the update operation- Returns:
- whether or not this handler supports updatess
-
add
public Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
add
in interfaceCustomPersistenceHandler
- Overrides:
add
in classCustomPersistenceHandlerAdapter
- Throws:
ServiceException
-
update
public Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
update
in interfaceCustomPersistenceHandler
- Overrides:
update
in classCustomPersistenceHandlerAdapter
- Throws:
ServiceException
-