Class 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 Detail

      • BundleUIAccessRightService

        public BundleUIAccessRightService()
    • Method Detail

      • 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
      • 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.