Class PreferenceAccessInjector

    • Constructor Detail

      • PreferenceAccessInjector

        public PreferenceAccessInjector()
    • Method Detail

      • isInheritable

        public boolean isInheritable​(InheritedAccessEnabled access)
        Description copied from class: AccessTypeInjector
        Determines if a particular access can be inherited according to this injector
        Overrides:
        isInheritable in class AccessTypeInjector
        Parameters:
        access - the permission to decide whether is inheritable or not
        Returns:
        true if the access is inheritable, false otherwise
      • getRole

        public Role getRole​(InheritedAccessEnabled access)
        Description copied from class: AccessTypeInjector
        Returns the role which the access given as parameter is assigned to. In general, the most part of inheritable accesses have Role as their parent entity. If not, this method must be overridden to retrieve the Role property for their particular case.
        Overrides:
        getRole in class AccessTypeInjector
        Parameters:
        access - An inheritable access
        Returns:
        the Role owner of the access
      • getRoleProperty

        public String getRoleProperty()
        Description copied from class: AccessTypeInjector
        Returns the role property related to the entity represented by the injector.
        Overrides:
        getRoleProperty in class AccessTypeInjector
        Returns:
        the role property that can be retrieved according to the entity of the injector.
      • addEntityWhereClause

        public String addEntityWhereClause​(String whereClause)
        Description copied from class: AccessTypeInjector
        Includes in the where clause some filtering needed for same cases.
        Overrides:
        addEntityWhereClause in class AccessTypeInjector
        Parameters:
        whereClause - The initial where clause
        Returns:
        Entity where clause with the filtering included
      • getSecuredElementIdentifier

        public String getSecuredElementIdentifier​(InheritedAccessEnabled access)
        Description copied from class: AccessTypeInjector
        Returns the id of the secured object for the given inheritable access.
        Overrides:
        getSecuredElementIdentifier in class AccessTypeInjector
        Parameters:
        access - An object of an inheritable class,i.e., a class that implements InheritedAccessEnabled.
        Returns:
        A String with the id of the secured object
      • getSkippedProperties

        public List<String> getSkippedProperties()
        Description copied from class: AccessTypeInjector
        Retrieves the properties of the entity related to the injector that will not be copied when updating an access by propagation.
        Overrides:
        getSkippedProperties in class AccessTypeInjector
        Returns:
        the list of the properties that will not be copied