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

public class BundleUIAccessRightService extends DefaultUIAccessRightService
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.
  • 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:
      isWritable in interface UIAccessRightService
      Overrides:
      isWritable in class DefaultUIAccessRightService
      Parameters:
      type - item type
      item - item instance
      propDescr - item attribute to check access for
      creationMode - creation mode or not
      Returns:
      true if user has write access, false otherwise
    • isAttributeWritable

      protected boolean isAttributeWritable(TypedObject item, UIAccessRightDependency dependency)
    • 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

      protected List<UIAccessRightDependency> getDependencies()
    • setDependencies

      public void setDependencies(List<UIAccessRightDependency> dependencies)