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 Stringprotected OfferCustomServiceExtensionManagerprotected static final Stringprotected static final Stringprotected booleanprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected SandBoxHelperprotected static final Stringprotected static final StringFields inherited from interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler
DEFAULT_ORDERFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddIsActiveStatus(RecordHelper helper, Entity entity) protected FieldMetadataprotected Propertyprotected FieldMetadataprotected PropertybuildIsActiveProperty(boolean isActive) protected PropertybuildOfferItemQualifierRuleTypeProperty(Property qualifiersCanBeQualifiers, Property qualifiersCanBeTargets) protected PropertybuildOfferItemTargetRuleTypeProperty(Property stackable) protected FieldMetadataprotected PropertybuildQualifiersCanBeQualifiersProperty(Property offerItemQualifierRuleType) protected FieldMetadataprotected PropertybuildQualifiersCanBeTargetsProperty(Property offerItemQualifierRuleType) protected FieldMetadataprotected PropertybuildStackableProperty(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 booleanisQualifierTargetType(Property offerItemQualifierRuleType) protected booleanisQualifierType(Property offerItemQualifierRuleType) protected booleanisTargetType(Property offerItemQualifierRuleType) protected StringstripTrailingZeros(String value, String decimalSeparator) update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) protected voidvalidateOfferValue(Entity entity) Methods inherited from class org.broadleafcommerce.openadmin.server.service.handler.ClassCustomPersistenceHandlerAdapter
classIsAssignableFrom, classMatchesMethods 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:CustomPersistenceHandlerIs this persistence handler capable of dealing with an inspect request from the admin- Specified by:
canHandleInspectin interfaceCustomPersistenceHandler- Overrides:
canHandleInspectin classCustomPersistenceHandlerAdapter- Parameters:
persistencePackage- details about the inspect operation- Returns:
- whether or not this handler supports inspects
-
canHandleFetch
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with an fetch request from the admin- Specified by:
canHandleFetchin interfaceCustomPersistenceHandler- Overrides:
canHandleFetchin classCustomPersistenceHandlerAdapter- Parameters:
persistencePackage- details about the fetch operation- Returns:
- whether or not this handler supports fetches
-
canHandleUpdate
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with an update request from the admin- Specified by:
canHandleUpdatein interfaceCustomPersistenceHandler- Overrides:
canHandleUpdatein 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:
inspectin interfaceCustomPersistenceHandler- Overrides:
inspectin classCustomPersistenceHandlerAdapter- Throws:
ServiceException
-
buildAdvancedVisibilityOptionsFieldMetaData
-
buildIsActiveFieldMetaData
-
buildQualifiersCanBeQualifiersFieldMetaData
-
buildQualifiersCanBeTargetsFieldMetaData
-
buildStackableFieldMetaData
-
fetch
public DynamicResultSet fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
fetchin interfaceCustomPersistenceHandler- Overrides:
fetchin 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:
updatein interfaceCustomPersistenceHandler- Overrides:
updatein classCustomPersistenceHandlerAdapter- Throws:
ServiceException
-
validateOfferValue
- Throws:
ValidationException
-
buildOfferItemQualifierRuleTypeProperty
-
buildOfferItemTargetRuleTypeProperty
-