Class SingleObjectRightsDescription

    • Field Detail

    • Constructor Detail

      • SingleObjectRightsDescription

        public SingleObjectRightsDescription​(Map<String,​Boolean> objectRights,
                                             boolean isSetForNewObjects,
                                             boolean isSetForAttributesByDefault,
                                             boolean isIndependentRightsOfChildObjects)
        Creates a new instance of SingleObjectRightsDescription for a single object.
        Parameters:
        objectRights - the object rights, can not be null
        isSetForNewObjects - the 'setForNewObjects' flag
        isSetForAttributesByDefault - the 'setForAttributesByDefault' flag
        isIndependentRightsOfChildObjects - the 'independentRightsOfChildObjects' flag
      • SingleObjectRightsDescription

        public SingleObjectRightsDescription​(Map<String,​Boolean> objectRights,
                                             boolean hasRls,
                                             boolean isSetForNewObjects,
                                             boolean isSetForAttributesByDefault,
                                             boolean isIndependentRightsOfChildObjects)
        Creates a new instance of SingleObjectRightsDescription for a single top object.
        Parameters:
        objectRights - the object rights, can not be null
        hasRls - the 'hasRls' flag
        isSetForNewObjects - the 'setForNewObjects' flag
        isSetForAttributesByDefault - the 'setForAttributesByDefault' flag
        isIndependentRightsOfChildObjects - the 'independentRightsOfChildObjects' flag
    • Method Detail

      • getRights

        public Map<String,​Boolean> getRights​(long bmObjectId)
        Description copied from interface: IRightsDescription
        Gets the rights of the object.
        Specified by:
        getRights in interface IRightsDescription
        Parameters:
        bmObjectId - the unique identifier of the object rights get for
        Returns:
        the object rights, may be null
      • getTopObjectsWithNonDefaultRights

        public Set<Long> getTopObjectsWithNonDefaultRights()
        Description copied from interface: IRightsDescription
        Gets top objects ids with own non default rights or having descendants with non default rights.
        Specified by:
        getTopObjectsWithNonDefaultRights in interface IRightsDescription
        Returns:
        the set of top object ids with non default rights, can not be null
      • getNumberOfCustomRightsSetForNewObjects

        public int getNumberOfCustomRightsSetForNewObjects​(long topObjectId)
        Description copied from interface: IRightsDescription
        Returns the number of custom rights among child objects (include the specified top object) of the specified top object for which the default right value is determined by "Set rights for new objects" flag.
        Specified by:
        getNumberOfCustomRightsSetForNewObjects in interface IRightsDescription
        Parameters:
        topObjectId - the top object id to get the number of custom rights among child objects
        Returns:
        the number of custom rights among child objects for which the default right value is determined by "Set rights for new objects" flag
      • getNumberOfCustomRightsSetForAttributesByDefault

        public int getNumberOfCustomRightsSetForAttributesByDefault​(long topObjectId)
        Description copied from interface: IRightsDescription
        Returns the number of custom rights among child objects of the specified top object for which the default right value is determined by "Set rights for attributes and tabular sections by default" flag.
        Specified by:
        getNumberOfCustomRightsSetForAttributesByDefault in interface IRightsDescription
        Parameters:
        topObjectId - the top object id to get the number of custom rights among child objects
        Returns:
        the number of custom rights among child objects for which the default right value is determined by "Set rights for attributes and tabular sections by default" flag
      • getNumberOfSetRights

        public int getNumberOfSetRights​(long topObjectId)
        Description copied from interface: IRightsDescription
        Returns the number of set rights among child objects of the specified top object for which the default right value is not determined by "Set rights for new objects" flag or "Set rights for attributes and tabular sections by default" flag.
        Specified by:
        getNumberOfSetRights in interface IRightsDescription
        Parameters:
        topObjectId - the top object id to get the number of set rights among child objects
        Returns:
        the number of set rights among child objects of the specified top object for which the default right value is not determined by "Set rights for new objects" flag or "Set rights for attributes and tabular sections by default" flag
      • hasTopObjectsRls

        public boolean hasTopObjectsRls​(long bmObjectId)
        Description copied from interface: IRightsDescription
        Determines whether the object with the given id has at least one Rls.
        Specified by:
        hasTopObjectsRls in interface IRightsDescription
        Parameters:
        bmObjectId - the unique identifier of the object the 'Has Rls' condition is checked for
        Returns:
        true if the object has at least one Rls and false otherwise
      • isSetForNewObjects

        public boolean isSetForNewObjects()
        Description copied from interface: IRightsDescription
        Gets the value of the 'setForNewObjects' flag.
        Specified by:
        isSetForNewObjects in interface IRightsDescription
        Returns:
        true if the 'setForNewObjects' flag is set and false otherwise
      • isSetForAttributesByDefault

        public boolean isSetForAttributesByDefault()
        Description copied from interface: IRightsDescription
        Gets the value of the 'setForAttributesByDefault' flag.
        Specified by:
        isSetForAttributesByDefault in interface IRightsDescription
        Returns:
        true if the 'setForAttributesByDefault' flag is set and false otherwise
      • isIndependentRightsOfChildObjects

        public boolean isIndependentRightsOfChildObjects()
        Description copied from interface: IRightsDescription
        Gets the value of the 'independentRightsOfChildObjects' flag.
        Specified by:
        isIndependentRightsOfChildObjects in interface IRightsDescription
        Returns:
        true if the 'independentRightsOfChildObjects' flag is set and false otherwise