Package com._1c.g5.v8.dt.bm.index.rights
Class SingleObjectRightsDescription
java.lang.Object
com._1c.g5.v8.dt.bm.index.rights.SingleObjectRightsDescription
- All Implemented Interfaces:
IRightsDescription
The implementation of
IRightsDescription for a single object.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSingleObjectRightsDescription(Map<String, Boolean> objectRights, boolean isSetForNewObjects, boolean isSetForAttributesByDefault, boolean isIndependentRightsOfChildObjects) Creates a new instance ofSingleObjectRightsDescriptionfor a single object.SingleObjectRightsDescription(Map<String, Boolean> objectRights, boolean hasRls, boolean isSetForNewObjects, boolean isSetForAttributesByDefault, boolean isIndependentRightsOfChildObjects) Creates a new instance ofSingleObjectRightsDescriptionfor a single top object. -
Method Summary
Modifier and TypeMethodDescriptionintgetNumberOfCustomRightsSetForAttributesByDefault(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.intgetNumberOfCustomRightsSetForNewObjects(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.intgetNumberOfSetRights(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.Gets the set of object ids the rights specified for.getRights(long bmObjectId) Gets the rights of the object.Gets top objects ids with own non default rights or having descendants with non default rights.booleanhasTopObjectsRls(long bmObjectId) Determines whether the object with the given id has at least one Rls.booleanGets the value of the 'independentRightsOfChildObjects' flag.booleanGets the value of the 'setForAttributesByDefault' flag.booleanGets the value of the 'setForNewObjects' flag.
-
Field Details
-
objectRights
The object rights
-
-
Constructor Details
-
SingleObjectRightsDescription
public SingleObjectRightsDescription(Map<String, Boolean> objectRights, boolean isSetForNewObjects, boolean isSetForAttributesByDefault, boolean isIndependentRightsOfChildObjects) Creates a new instance ofSingleObjectRightsDescriptionfor a single object.- Parameters:
objectRights- the object rights, can not benullisSetForNewObjects- the 'setForNewObjects' flagisSetForAttributesByDefault- the 'setForAttributesByDefault' flagisIndependentRightsOfChildObjects- the 'independentRightsOfChildObjects' flag
-
SingleObjectRightsDescription
public SingleObjectRightsDescription(Map<String, Boolean> objectRights, boolean hasRls, boolean isSetForNewObjects, boolean isSetForAttributesByDefault, boolean isIndependentRightsOfChildObjects) Creates a new instance ofSingleObjectRightsDescriptionfor a single top object.- Parameters:
objectRights- the object rights, can not benullhasRls- the 'hasRls' flagisSetForNewObjects- the 'setForNewObjects' flagisSetForAttributesByDefault- the 'setForAttributesByDefault' flagisIndependentRightsOfChildObjects- the 'independentRightsOfChildObjects' flag
-
-
Method Details
-
getRights
Description copied from interface:IRightsDescriptionGets the rights of the object.- Specified by:
getRightsin interfaceIRightsDescription- Parameters:
bmObjectId- the unique identifier of the object rights get for- Returns:
- the object rights, may be
null
-
getObjectIds
Description copied from interface:IRightsDescriptionGets the set of object ids the rights specified for.- Specified by:
getObjectIdsin interfaceIRightsDescription- Returns:
- the set of object ids, can not be
null
-
getTopObjectsWithNonDefaultRights
Description copied from interface:IRightsDescriptionGets top objects ids with own non default rights or having descendants with non default rights.- Specified by:
getTopObjectsWithNonDefaultRightsin interfaceIRightsDescription- 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:IRightsDescriptionReturns 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:
getNumberOfCustomRightsSetForNewObjectsin interfaceIRightsDescription- 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:IRightsDescriptionReturns 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:
getNumberOfCustomRightsSetForAttributesByDefaultin interfaceIRightsDescription- 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:IRightsDescriptionReturns 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:
getNumberOfSetRightsin interfaceIRightsDescription- 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:IRightsDescriptionDetermines whether the object with the given id has at least one Rls.- Specified by:
hasTopObjectsRlsin interfaceIRightsDescription- Parameters:
bmObjectId- the unique identifier of the object the 'Has Rls' condition is checked for- Returns:
trueif the object has at least one Rls andfalseotherwise
-
isSetForNewObjects
public boolean isSetForNewObjects()Description copied from interface:IRightsDescriptionGets the value of the 'setForNewObjects' flag.- Specified by:
isSetForNewObjectsin interfaceIRightsDescription- Returns:
trueif the 'setForNewObjects' flag is set andfalseotherwise
-
isSetForAttributesByDefault
public boolean isSetForAttributesByDefault()Description copied from interface:IRightsDescriptionGets the value of the 'setForAttributesByDefault' flag.- Specified by:
isSetForAttributesByDefaultin interfaceIRightsDescription- Returns:
trueif the 'setForAttributesByDefault' flag is set andfalseotherwise
-
isIndependentRightsOfChildObjects
public boolean isIndependentRightsOfChildObjects()Description copied from interface:IRightsDescriptionGets the value of the 'independentRightsOfChildObjects' flag.- Specified by:
isIndependentRightsOfChildObjectsin interfaceIRightsDescription- Returns:
trueif the 'independentRightsOfChildObjects' flag is set andfalseotherwise
-