Class OfferCustomPersistenceHandler
java.lang.Object
org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
org.broadleafcommerce.openadmin.server.service.handler.ClassCustomPersistenceHandlerAdapter
org.broadleafcommerce.admin.server.service.handler.OfferCustomPersistenceHandler
- All Implemented Interfaces:
CustomPersistenceHandler
,org.springframework.core.Ordered
@Component("blOfferCustomPersistenceHandler")
public class OfferCustomPersistenceHandler
extends ClassCustomPersistenceHandlerAdapter
Created by Jon on 11/23/15.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected OfferCustomServiceExtensionManager
protected static final String
protected static final String
protected boolean
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected SandBoxHelper
protected static final String
protected static final String
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 TypeMethodDescriptionprotected void
protected void
addIsActiveStatus
(RecordHelper helper, Entity entity) protected FieldMetadata
protected Property
protected FieldMetadata
protected Property
buildIsActiveProperty
(boolean isActive) protected Property
buildOfferItemQualifierRuleTypeProperty
(Property qualifiersCanBeQualifiers, Property qualifiersCanBeTargets) protected Property
buildOfferItemTargetRuleTypeProperty
(Property stackable) protected FieldMetadata
protected Property
buildQualifiersCanBeQualifiersProperty
(Property offerItemQualifierRuleType) protected FieldMetadata
protected Property
buildQualifiersCanBeTargetsProperty
(Property offerItemQualifierRuleType) protected FieldMetadata
protected Property
buildStackableProperty
(Property offerItemTargetRuleType) canHandleFetch
(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an fetch request from the admincanHandleInspect
(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an inspect request from the admincanHandleUpdate
(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an update request from the adminfetch
(PersistencePackage persistencePackage, CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) inspect
(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper) protected boolean
isQualifierTargetType
(Property offerItemQualifierRuleType) protected boolean
isQualifierType
(Property offerItemQualifierRuleType) protected boolean
isTargetType
(Property offerItemQualifierRuleType) protected String
stripTrailingZeros
(String value, String decimalSeparator) update
(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) protected void
validateOfferValue
(Entity entity) Methods inherited from class org.broadleafcommerce.openadmin.server.service.handler.ClassCustomPersistenceHandlerAdapter
classIsAssignableFrom, classMatches
Methods inherited from class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
add, canHandleAdd, canHandleRemove, getClassForName, getMetadata, getOrder, getPolymorphicClasses, getResultSet, isAdornedListOperation, isAssignableFrom, isBasicOperation, isMapOperation, meetsCustomCriteria, remove, willHandleSecurity
-
Field Details
-
SHOW_ADVANCED_VISIBILITY_OPTIONS
- See Also:
-
QUALIFIERS_CAN_BE_QUALIFIERS
- See Also:
-
QUALIFIERS_CAN_BE_TARGETS
- See Also:
-
OFFER_ITEM_QUALIFIER_RULE_TYPE
- See Also:
-
STACKABLE
- See Also:
-
OFFER_ITEM_TARGET_RULE_TYPE
- See Also:
-
IS_ACTIVE
- See Also:
-
IS_TIERED_OFFER
- See Also:
-
OFFER_VALUE
- See Also:
-
DISCOUNT_TYPE
- See Also:
-
isActiveFilter
@Value("${admin.offer.isactive.filter:false}") protected boolean isActiveFilter -
extensionManager
-
sandBoxHelper
-
-
Constructor Details
-
OfferCustomPersistenceHandler
public OfferCustomPersistenceHandler()
-
-
Method Details
-
canHandleInspect
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with an inspect request from the admin- Specified by:
canHandleInspect
in interfaceCustomPersistenceHandler
- Overrides:
canHandleInspect
in classCustomPersistenceHandlerAdapter
- Parameters:
persistencePackage
- details about the inspect operation- Returns:
- whether or not this handler supports inspects
-
canHandleFetch
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with an fetch request from the admin- Specified by:
canHandleFetch
in interfaceCustomPersistenceHandler
- Overrides:
canHandleFetch
in classCustomPersistenceHandlerAdapter
- Parameters:
persistencePackage
- details about the fetch operation- Returns:
- whether or not this handler supports fetches
-
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
-
inspect
public DynamicResultSet inspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper) throws ServiceException - Specified by:
inspect
in interfaceCustomPersistenceHandler
- Overrides:
inspect
in classCustomPersistenceHandlerAdapter
- Throws:
ServiceException
-
buildAdvancedVisibilityOptionsFieldMetaData
-
buildIsActiveFieldMetaData
-
buildQualifiersCanBeQualifiersFieldMetaData
-
buildQualifiersCanBeTargetsFieldMetaData
-
buildStackableFieldMetaData
-
fetch
public DynamicResultSet fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
fetch
in interfaceCustomPersistenceHandler
- Overrides:
fetch
in classCustomPersistenceHandlerAdapter
- Throws:
ServiceException
-
stripTrailingZeros
-
addIsActiveFiltering
-
addIsActiveStatus
-
buildIsActiveProperty
-
buildAdvancedVisibilityOptionsProperty
-
buildQualifiersCanBeQualifiersProperty
-
buildQualifiersCanBeTargetsProperty
-
buildStackableProperty
-
isQualifierType
-
isTargetType
-
isQualifierTargetType
-
update
public Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
update
in interfaceCustomPersistenceHandler
- Overrides:
update
in classCustomPersistenceHandlerAdapter
- Throws:
ServiceException
-
validateOfferValue
- Throws:
ValidationException
-
buildOfferItemQualifierRuleTypeProperty
-
buildOfferItemTargetRuleTypeProperty
-