Package com._1c.g5.v8.dt.bm.index.rights
Class BaseRightsDescription
- java.lang.Object
-
- com._1c.g5.v8.dt.bm.index.rights.BaseRightsDescription
-
- All Implemented Interfaces:
IRightsDescription
- Direct Known Subclasses:
InvertedRightsDescription
,RightsDescription
public abstract class BaseRightsDescription extends Object implements IRightsDescription
The base abstract implementation ofIRightsDescription
to store object rights and top objects that has at least one Rls.- See Also:
RightsDescription
,InvertedRightsDescription
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Long,Map<String,Boolean>>
objectsRights
The object rightsprotected Set<Long>
topObjectsWithRls
The set of the top object ids that has at least one Rls
-
Constructor Summary
Constructors Constructor Description BaseRightsDescription(Map<Long,Map<String,Boolean>> objectsRights, 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 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.boolean
hasTopObjectsRls(long bmObjectId)
Determines whether the object with the given id has at least one Rls.boolean
isIndependentRightsOfChildObjects()
Gets the value of the 'independentRightsOfChildObjects' flag.boolean
isSetForAttributesByDefault()
Gets the value of the 'setForAttributesByDefault' flag.boolean
isSetForNewObjects()
Gets the value of the 'setForNewObjects' flag.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.bm.index.rights.IRightsDescription
getNumberOfCustomRightsSetForAttributesByDefault, getNumberOfCustomRightsSetForNewObjects, getTopObjectsWithNonDefaultRights
-
-
-
-
Constructor Detail
-
BaseRightsDescription
public BaseRightsDescription(Map<Long,Map<String,Boolean>> objectsRights, 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
topObjectsWithRls
- 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
-
getRights
public Map<String,Boolean> getRights(long bmObjectId)
Description copied from interface:IRightsDescription
Gets the rights of the object.- Specified by:
getRights
in 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:IRightsDescription
Gets the set of object ids the rights specified for.- Specified by:
getObjectIds
in interfaceIRightsDescription
- Returns:
- the set of object ids, can not be
null
-
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 interfaceIRightsDescription
- 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 andfalse
otherwise
-
isSetForNewObjects
public boolean isSetForNewObjects()
Description copied from interface:IRightsDescription
Gets the value of the 'setForNewObjects' flag.- Specified by:
isSetForNewObjects
in interfaceIRightsDescription
- Returns:
true
if the 'setForNewObjects' flag is set andfalse
otherwise
-
isSetForAttributesByDefault
public boolean isSetForAttributesByDefault()
Description copied from interface:IRightsDescription
Gets the value of the 'setForAttributesByDefault' flag.- Specified by:
isSetForAttributesByDefault
in interfaceIRightsDescription
- Returns:
true
if the 'setForAttributesByDefault' flag is set andfalse
otherwise
-
isIndependentRightsOfChildObjects
public boolean isIndependentRightsOfChildObjects()
Description copied from interface:IRightsDescription
Gets the value of the 'independentRightsOfChildObjects' flag.- Specified by:
isIndependentRightsOfChildObjects
in interfaceIRightsDescription
- Returns:
true
if the 'independentRightsOfChildObjects' flag is set andfalse
otherwise
-
-