Package com._1c.g5.v8.dt.bm.index.rights
Class RightsDescription
- java.lang.Object
-
- com._1c.g5.v8.dt.bm.index.rights.BaseRightsDescription
-
- com._1c.g5.v8.dt.bm.index.rights.RightsDescription
-
- All Implemented Interfaces:
IRightsDescription
public class RightsDescription extends BaseRightsDescription
The extension ofBaseRightsDescription
to store top object ids with non default rights.
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.bm.index.rights.BaseRightsDescription
objectsRights, topObjectsWithRls
-
-
Constructor Summary
Constructors Constructor Description RightsDescription(Map<Long,Map<String,Boolean>> objectsRights, Map<Long,Integer> topObjectsWithNonDefaultRights, Map<Long,Integer> numberOfCustomRightsSetForNewObjects, Map<Long,Integer> numberOfCustomRightsSetForAttributesByDefault, Map<Long,Integer> numberOfSetRights, Set<Long> topObjectsWithRls, boolean isSetForNewObjects, boolean isSetForAttributesByDefault, boolean isIndependentRightsOfChildObjects)
Creates a new instance with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNumberOfCustomRightsSetForAttributesByDefault(long topObjectId)
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.int
getNumberOfCustomRightsSetForNewObjects(long topObjectId)
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.int
getNumberOfSetRights(long topObjectId)
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.Set<Long>
getTopObjectsWithNonDefaultRights()
Gets top objects ids with own non default rights or having descendants with non default rights.-
Methods inherited from class com._1c.g5.v8.dt.bm.index.rights.BaseRightsDescription
getObjectIds, getRights, hasTopObjectsRls, isIndependentRightsOfChildObjects, isSetForAttributesByDefault, isSetForNewObjects
-
-
-
-
Constructor Detail
-
RightsDescription
public RightsDescription(Map<Long,Map<String,Boolean>> objectsRights, Map<Long,Integer> topObjectsWithNonDefaultRights, Map<Long,Integer> numberOfCustomRightsSetForNewObjects, Map<Long,Integer> numberOfCustomRightsSetForAttributesByDefault, Map<Long,Integer> numberOfSetRights, Set<Long> topObjectsWithRls, boolean isSetForNewObjects, boolean isSetForAttributesByDefault, boolean isIndependentRightsOfChildObjects)
Creates a new instance with the given parameters.- Parameters:
objectsRights
- the objects rights, can not benull
topObjectsWithNonDefaultRights
- the projection from top object id to number of subobjects with non default rights, can not benull
numberOfCustomRightsSetForNewObjects
- the number of custom rights among child objects (include the top object) for which the default right value is determined by "Set rights for new objects" flagnumberOfCustomRightsSetForAttributesByDefault
- 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" flagnumberOfSetRights
- the number of established rights among child objects (include the 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" flagtopObjectsWithRls
- the set of the top object ids that has at least one Rls, can not benull
isSetForNewObjects
- the 'setForNewObjects' flagisSetForAttributesByDefault
- the 'setForAttributesByDefault' flagisIndependentRightsOfChildObjects
- the 'independentRightsOfChildObjects' flag
-
-
Method Detail
-
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.- 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.- 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.- 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.- 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
-
-