ARoad0.gBaseInterface
Interface StringMetaRight

All Superinterfaces:
BaseObject, BoundBean, java.lang.Comparable, FinalizedObject, FinalizedObjectForUser, java.io.Serializable, StringRight
All Known Implementing Classes:
StringMetaRightImpl

public interface StringMetaRight
extends StringRight

This interface is responsible for managing the canonical rights for all the base objects, called metarights. As any StringRight, it provides rights in a rights network, but metarights have no links to ACS.

For each ACS, the metaright may be associated to one StringRightImpl in the rights network managed by every ACS.

A metaright has a location in the matrix (power,field) of metarights. So, each metaright has:

- a power, which is bigger as the power of the right is higher

- a field, which is the number of a column where the near metarights are grouped

A metaright may be in a floating subnetwork of one or several ACS rights which are not associated to the main stream of metarights, without any capacity to compare the powers.

Note: the implementation class is not a subclass of StringRightImpl, to be faster.


Method Summary
 void addUpperRight(StringMetaRight _right)
          Add an upper metaright which are strictly greater than this metaright without any intermediate right, following the network of metarights.
 StringRight[] getACSRightsForOneACS(ImmutableName _aCSname)
          Get the StringRights which are equivallent to this MetaStringRight in one ACS.
 int getField()
          Get the field, which is the colomn value in the matrix (power, field) which helps to locate the metaright.
 boolean getInFloatingSubNetwork()
           
 java.util.Map getM_ACSRights()
          Get the ACS StringRights which are strictly equivallent to this MetaStrinRight in each ACS.
 int getPower()
          Get the power, which is the line value in the matrix (power, field) which helps to locate the metaright.
 boolean isUnused()
          When some relevant ACS are closed, the link to them remain in this metaright.
 void removeUpperRight(StringMetaRight _right, java.lang.Object _caller)
          Remove a upper metaright which are strictly greater than this metaright without any intermediate right, following the network of metarights.
 void setInFloatingSubNetwork(boolean _b)
           
 
Methods inherited from interface ARoad0.gBaseInterface.StringRight
compareTo, equals, finalizeForUser, getAcsName, getComment, getEorMetaRight, getFullName, getInternalKey, getLowerRights, getNickName, getRight, getTargetClass, getTargetClassType, getUpperRights, hashCode, isDesactivated, isEmpty, isGrantingRight, isParent, isSlave, isTargetClassed, isTargetClassTyped, setComment, setDesactivated, setParent, setSlave, toString
 
Methods inherited from interface ARoad0.gBaseInterface.BaseObject
getName
 
Methods inherited from interface ARoad0.gBaseInterface.FinalizedObject
finalizeForBase
 
Methods inherited from interface ARoad0.gBaseInterface.BoundBean
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Method Detail

getPower

int getPower()
Get the power, which is the line value in the matrix (power, field) which helps to locate the metaright.

Returns:
a bigger value as the power of the right is higher

getField

int getField()
Get the field, which is the colomn value in the matrix (power, field) which helps to locate the metaright.

Returns:
the number of a column where the near metarights are grouped, from a limited set of ACS.

getM_ACSRights

java.util.Map getM_ACSRights()
Get the ACS StringRights which are strictly equivallent to this MetaStrinRight in each ACS.

Returns:
Map where the key is an ACS name as String, and the value is an array of StringRightImpls. May be empty.

getACSRightsForOneACS

StringRight[] getACSRightsForOneACS(ImmutableName _aCSname)
Get the StringRights which are equivallent to this MetaStringRight in one ACS. Applicable to the rights of a closed ACS.

Parameters:
_aCSname - an ACS name
Returns:
an array of StringRightImpls. May be empty. Never null.

getInFloatingSubNetwork

boolean getInFloatingSubNetwork()
Returns:
true if the metaright is in a floating subnetwork for an ACS, without any association to the main metarights in the network.

setInFloatingSubNetwork

void setInFloatingSubNetwork(boolean _b)
Parameters:
_b - is true if the metaright is in a floating subnetwork for an ACS, without any association to the main metarights in the network.

isUnused

boolean isUnused()
When some relevant ACS are closed, the link to them remain in this metaright. Caution: a metaright may be used in some ACS directly, wihtout any ACS rights.

Returns:
boolean true if the metaright has no ACS rights associated to it.

addUpperRight

void addUpperRight(StringMetaRight _right)
                   throws BaseError
Add an upper metaright which are strictly greater than this metaright without any intermediate right, following the network of metarights. The two rights may have not the same sens, as for 'modify_security_descriptor' and 'deny_full_control'. It is a bound property.

Parameters:
_right - is directly included in this right. Never null.
Throws:
BaseError - if the right is a slave, or the upper right is not superior to this instance, or the parameter is null.

removeUpperRight

void removeUpperRight(StringMetaRight _right,
                      java.lang.Object _caller)
Remove a upper metaright which are strictly greater than this metaright without any intermediate right, following the network of metarights. Called by the greater metaright finalizeForUser() method.

Parameters:
_right - is directly included in this right. Never null.
_caller - is the object which calls this method; used to identify the finalize operation.