public class PromotionUserRestriction extends GeneratedPromotionUserRestriction
AbstractPromotionRestriction.RestrictionResultGenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationExceptionDEFAULT_INITIAL_ATTRIBUTES, POSITIVE, USERSDESCRIPTIONPATTERN, PROMOTION, RENDEREDDESCRIPTION, RESTRICTIONTYPELANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
PromotionUserRestriction() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildDataUniqueKey(SessionContext ctx,
java.lang.StringBuilder builder)
Build a unique data driven key.
|
protected boolean |
checkGroupForPrincipal(SessionContext ctx,
PrincipalGroup restrictedGroup,
java.util.Collection<PrincipalGroup> groups) |
AbstractPromotionRestriction.RestrictionResult |
evaluate(SessionContext ctx,
java.util.Collection<Product> products,
java.util.Date date,
AbstractOrder order)
Evaluate this restriction.
|
protected java.lang.Object[] |
getDescriptionPatternArguments(SessionContext ctx) |
java.lang.String |
getUserNames(SessionContext ctx) |
protected boolean |
isInUserCollection(SessionContext ctx,
User user)
Test if the user is restricted by this PromotionRestriction.
|
protected boolean |
isInUserCollectionRecursive(SessionContext ctx,
Principal principal,
User user) |
getDefaultAttributeModes, getUsers, getUsers, isPositive, isPositive, isPositiveAsPrimitive, isPositiveAsPrimitive, setPositive, setPositive, setPositive, setPositive, setUsers, setUsersdeepClone, deepCloneAttributes, evaluate, getAllRestrictionType, getRenderedDescription, getRestrictionType, toStringgetAllDescriptionPattern, getAllDescriptionPattern, getAllRestrictionType, getDescriptionPattern, getDescriptionPattern, getPromotion, getPromotion, getRenderedDescription, getRestrictionType, setAllDescriptionPattern, setAllDescriptionPattern, setDescriptionPattern, setDescriptionPattern, setPromotion, setPromotioncreateItem, getInitialProperties, getNonInitialAttributesgetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getImplementation, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyaddLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isMarkModifiedDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, useTA, writeReplacesetTenantpublic AbstractPromotionRestriction.RestrictionResult evaluate(SessionContext ctx, java.util.Collection<Product> products, java.util.Date date, AbstractOrder order)
AbstractPromotionRestrictionAbstractPromotionRestriction.RestrictionResult.ADJUSTED_PRODUCTS.evaluate in class AbstractPromotionRestrictionctx - The hybris contextproducts - The collection of Product instancesdate - The date to use in any evaluationsorder - The order (optional)AbstractPromotionRestriction.RestrictionResult indicating the result of the evaluationprotected boolean isInUserCollection(SessionContext ctx, User user)
ctx - The contextuser - The user to testprotected boolean isInUserCollectionRecursive(SessionContext ctx, Principal principal, User user)
protected boolean checkGroupForPrincipal(SessionContext ctx, PrincipalGroup restrictedGroup, java.util.Collection<PrincipalGroup> groups)
protected void buildDataUniqueKey(SessionContext ctx, java.lang.StringBuilder builder)
AbstractPromotionRestrictionbuildDataUniqueKey in class AbstractPromotionRestrictionctx - The hybris contextbuilder - A StringBuilder used to build up the immutable keyprotected java.lang.Object[] getDescriptionPatternArguments(SessionContext ctx)
getDescriptionPatternArguments in class AbstractPromotionRestrictionpublic java.lang.String getUserNames(SessionContext ctx)
Copyright © 2018 SAP SE. All Rights Reserved.