Class BundleUIAccessRightService
java.lang.Object
de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
de.hybris.platform.cockpit.services.security.impl.DefaultUIAccessRightService
de.hybris.platform.configurablebundlecockpits.admincockpit.services.security.impl.BundleUIAccessRightService
- All Implemented Interfaces:
UIAccessRightService
Extends the
DefaultUIAccessRightService to add/evaluate a generic handling for the display (writable or not)
of an attribute that is dependent on the another attribute (null or not null) of the same type, e.g. the attribute
'description' of an item is only writable if the attribute 'name' is not null. The list of dependencies is injected
via Spring.-
Field Summary
Fields inherited from class de.hybris.platform.cockpit.services.security.impl.DefaultUIAccessRightService
cockpitUIComponentAccessRightDaoFields inherited from class de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
modelService, typeService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCreates a map based on the injected list of dependencies.protected List<UIAccessRightDependency>protected booleanisAttributeWritable(TypedObject item, UIAccessRightDependency dependency) booleanisWritable(ObjectType type, TypedObject item, PropertyDescriptor propDescr, boolean creationMode) Overrides the super method to evaluate the injected list of dependencies before the standard method is called.voidsetDependencies(List<UIAccessRightDependency> dependencies) Methods inherited from class de.hybris.platform.cockpit.services.security.impl.DefaultUIAccessRightService
canRead, canWrite, canWrite, getBaseTypeCode, getSessionContext, getSystemService, getUserService, isReadable, isReadable, isWritable, isWritable, isWritable, restricts, setCockpitUIComponentAccessRightDao, setSystemService, setUserServiceMethods inherited from class de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
getEnum, getEnums, getLocalizedLabel, getLocalizedLabel, getModelService, getTypeService, setCockpitTypeService, setLabelResolver, setModelService
-
Constructor Details
-
BundleUIAccessRightService
public BundleUIAccessRightService()
-
-
Method Details
-
isWritable
public boolean isWritable(ObjectType type, TypedObject item, PropertyDescriptor propDescr, boolean creationMode) Overrides the super method to evaluate the injected list of dependencies before the standard method is called.- Specified by:
isWritablein interfaceUIAccessRightService- Overrides:
isWritablein classDefaultUIAccessRightService- Parameters:
type- item typeitem- item instancepropDescr- item attribute to check access forcreationMode- creation mode or not- Returns:
trueif user has write access,falseotherwise
-
isAttributeWritable
-
fillDependencyMap
protected void fillDependencyMap()Creates a map based on the injected list of dependencies. It is checked if the attributes that are provided by the list do exist. In case an attribute is not defined in the system it is ignored. -
getDependencies
-
setDependencies
-