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
public class SingleObjectRightsDescription extends Object implements IRightsDescription
The implementation ofIRightsDescriptionfor a single object.- See Also:
BaseRightsDescription
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Boolean>objectRightsThe object rights
-
Constructor Summary
Constructors Constructor Description SingleObjectRightsDescription(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetNumberOfCustomRightsSetForAttributesByDefault(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.Set<Long>getObjectIds()Gets the set of object ids the rights specified for.Map<String,Boolean>getRights(long bmObjectId)Gets the rights of the object.Set<Long>getTopObjectsWithNonDefaultRights()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.booleanisIndependentRightsOfChildObjects()Gets the value of the 'independentRightsOfChildObjects' flag.booleanisSetForAttributesByDefault()Gets the value of the 'setForAttributesByDefault' flag.booleanisSetForNewObjects()Gets the value of the 'setForNewObjects' flag.
-
-
-
Constructor Detail
-
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 Detail
-
getRights
public Map<String,Boolean> getRights(long bmObjectId)
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
public Set<Long> 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
public Set<Long> 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
-
-