ARoad0.gBase
Class StringMetaRightImpl

java.lang.Object
  extended by ARoad0.gBase.StringMetaRightImpl
All Implemented Interfaces:
BaseObject, BoundBean, FinalizedObject, FinalizedObjectForUser, StringMetaRight, StringRight, java.io.Serializable, java.lang.Comparable

public final class StringMetaRightImpl
extends java.lang.Object
implements StringMetaRight

This class is responsible for managing the canonical (or generic) rights for all the base objects. A metaright is a StringRight, so it provides rights in a rights network, but without link to an ACS. It handles the links to the StringRights in every rights network managed by an ACS. A metaright has a position in a matrix (power,field). So each metaright has:

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

- a field, which is the name of a column where the closer 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.

A metaright may be used as a right in an ACS, to avoid StringRight creation and to have a pool of rights for several ACS. A metaright is never typed and may be classed. Most of denying rights have 'deny_' as first caracters in their right, and 'none' is the single exception. Note: the implementation class is not a subclass of StringRightImpl, to be faster, and it uses an embedded StringRightImpl instance, following the 'composition' pattern. It is a javabean with the following bound properties: 'Comment', 'Parent', 'Slave', 'Desactivated', 'UpperRights', 'LowerRights', 'ACSRights'. The listeners are proper to this instance, outside gBase, transient (not serialized in this instance backup). They are called in any order. They receive only a copy of the new value, to protect the property. All the exceptions from the listeners are catched in the updating methods, and a dialog box is displayed to inform the user.

See Also:
UtilityImpl.getFirstIncreasingRightsChain(ARoad0.gBaseInterface.StringRight, ARoad0.gBaseInterface.StringRight, ARoad0.gBaseInterface.StringRight), Serialized Form

Field Summary
static StringMetaRightImpl EMPTY_INSTANCE
          A reusable empty instance for initialization, to avoid the use of 'new' for temporary values.
private  int field_
          This is the field, which is the colomn value in the matrix (power, field) which helps to locate the metaright.
private  boolean grant_
          boolean true if the metaright is in a granting right, not a denying one.
private static int INCREMENT_CAPACITY
           
private  boolean inFloatingSubNetwork_
          boolean true if the metaright is in a floating subnetwork for an ACS, without any association outside the subnetwork.
private static int INITIAL_CAPACITY
           
private  java.util.Set l_ACSRightsChangeSupport_
          list of PropertyChangeListeners for the property 'ACSRights'.
protected  java.util.HashMap m_ACSRights_
          This is the ACS StringRights which are strictly equivallent to this StringMetaRight in each open ACS.
private  int power_
          This is the power, which is the line value in the matrix (power, field) which helps to locate the metaright.
static java.io.ObjectStreamField[] serialPersistentFields
          standardized variable for the JDK 2 serialization
private static long serialVersionUID
           
protected  StringRightImpl sRight_
          The right, as an embedded instance.
 
Constructor Summary
StringMetaRightImpl()
          Constructor used by EMPTY_INSTANCE.
StringMetaRightImpl(java.lang.String _kernelRight, java.lang.String _targetClass, java.lang.Integer _internalKey, java.lang.Integer _power, java.lang.Integer _field, boolean _grant)
          Effective constructor.
 
Method Summary
protected  void addACSRight(StringRightImpl _right)
          Add an ACS right which is associated to this metaright in an ACS.
protected  void addLowerRight(StringMetaRight _right)
          Add a lower metaright which are strictly lesser than this metaright without any intermediate right, following the network of metarights.
 void addPropertyChangeListener(java.beans.PropertyChangeListener _l)
          Add a listener to the bean, for all the bound properties.
 void addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
          Add a listener to the bean.
 void addUpperRight(StringMetaRight _right)
          Add an upper metaright which are strictly greater than this metaright without any intermediate right, following the network of metarights.
 int compareTo(java.lang.Object _o)
          Compare two StringRight instances through the internal key and, if not null, acsname comparisons, whatever the right, power and field.
 boolean equals(java.lang.Object _obj)
          Compares the two StringMetaRights without comparison of the property m_ACSRights_, since a deserialized metaright in an ACS rights array, may have a null m_ACSRights_ althought it has be to considered as equal to the reference metaright from BaseManagerImpl.
protected  void finalizeClosedRight()
          This method is to use only for closed rights in the relevant ACS list, to set an empty instance.
 void finalizeForBase()
          UNUSED METHOD.
 void finalizeForUser()
          UNUSED METHOD.
protected  void firePropertyChange(java.lang.String _propertyName, java.lang.Object _oldValue, java.lang.Object _newValue)
          Fire an event to every registered listener, in any order.
 ImmutableName getAcsName()
           
 StringRight[] getACSRightsForOneACS(ImmutableName _aCSname)
          Get the StringRights which are equivallent to this MetaStringRight in one ACS.
 java.lang.String getComment()
           
 StringMetaRight getEorMetaRight()
          Get the global Access Road right which is a generic description of this ACS right.
 int getField()
          Get the field, which is the colomn value in the matrix (power, field) which helps to locate the metaright.
 ImmutableName getFullName()
          Get the full name of the right, which is unique for the program.
 boolean getInFloatingSubNetwork()
           
 int getInternalKey()
           
 StringRight[] getLowerRights()
          Get the set of lower metarights which are strictly lesser than this metaright without any intermediate right, following the network of metarights.
 java.util.Map<java.lang.String,StringRight[]> getM_ACSRights()
          Get the ACS StringRights which are equivallent to this MetaStringRight in each ACS.
 ImmutableName getName()
          Get the BaseObject name of the metaright, that is its full name.
 java.lang.String getNickName()
          Gets a short name limited to 5 characters if positive, 16 first characters if starts with '|' and positive, and 7 if negative, for displaying this right in the views.
 int getPower()
          Get the power, which is the line value in the matrix (power, field) which helps to locate the metaright.
 java.lang.String getRight()
          If the metaright is non-classed, the result contains the kernel right only.
 long getSerialVersionUID()
           
 java.lang.String getTargetClass()
           
 java.lang.String getTargetClassType()
           
 StringRight[] getUpperRights()
          Get the set of upper metarights which are strictly greater than this metaright without any intermediate right, following the network of metarights.
 int hashCode()
           
 boolean isDesactivated()
          Get if the right is desactivated.
 boolean isEmpty()
           
 boolean isGrantingRight()
           
 boolean isParent()
           
 boolean isSlave()
          A slave right has a strong link with a parent right.
 boolean isTargetClassed()
           
 boolean isTargetClassTyped()
           
 boolean isUnused()
          When some relevant ACS are closed, the link to them remain in this metaright.
protected  void removeACSRight(StringRightImpl _right)
          Remove an ACS right which is associated to this metaright.
protected  void removeLowerRight(StringMetaRight _right)
          Remove a lower metaright which are strictly lesser than this metaright without any intermediate right, following the network of metarights.
 void removePropertyChangeListener(java.beans.PropertyChangeListener _l)
          Remove a listener to the bean, for all the bound properties.
 void removePropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
          Remove a listener to the bean.
 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 setComment(java.lang.String _s)
          Set any comment related to this right.
 void setDesactivated(boolean _b)
          Set that the right is desactivated.
protected  void setField(int _f)
          Set the field, which is the colomn value in the matrix (power, field) which helps to locate the metaright.
 void setInFloatingSubNetwork(boolean _b)
          It is not a bound property, since it is set only at the creation.
 void setParent(boolean _b)
          UNUSED, the value is always false.
protected  void setPower(int _p)
          Set the power, which is the line value in the matrix (power, field) which helps to locate the metaright.
 void setSlave(boolean _b)
          UNUSED, the value is always false.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

INITIAL_CAPACITY

private static final int INITIAL_CAPACITY
See Also:
Constant Field Values

INCREMENT_CAPACITY

private static final int INCREMENT_CAPACITY
See Also:
Constant Field Values

sRight_

protected StringRightImpl sRight_
The right, as an embedded instance.


power_

private int power_
This is the power, which is the line value in the matrix (power, field) which helps to locate the metaright.


field_

private int field_
This is the field, which is the colomn value in the matrix (power, field) which helps to locate the metaright.


m_ACSRights_

protected transient java.util.HashMap m_ACSRights_
This is the ACS StringRights which are strictly equivallent to this StringMetaRight in each open ACS. This map is transient to avoid problems at the serialization. Caution: getM_ACSRights() has not these keys and values. There, the key is an ACS name, and the value is a StringRightImpl or a Set of them.


inFloatingSubNetwork_

private boolean inFloatingSubNetwork_
boolean true if the metaright is in a floating subnetwork for an ACS, without any association outside the subnetwork.


grant_

private boolean grant_
boolean true if the metaright is in a granting right, not a denying one.


l_ACSRightsChangeSupport_

private transient java.util.Set l_ACSRightsChangeSupport_
list of PropertyChangeListeners for the property 'ACSRights'. No use of SwingChangePropertySupport class (bug in hasListeners() method). The other bound properties are managed by sRight_.


EMPTY_INSTANCE

public static final StringMetaRightImpl EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for temporary values. Caution: never change the state of the returned instance.


serialPersistentFields

public static final java.io.ObjectStreamField[] serialPersistentFields
standardized variable for the JDK 2 serialization

Constructor Detail

StringMetaRightImpl

public StringMetaRightImpl()
Constructor used by EMPTY_INSTANCE.


StringMetaRightImpl

public StringMetaRightImpl(java.lang.String _kernelRight,
                           java.lang.String _targetClass,
                           java.lang.Integer _internalKey,
                           java.lang.Integer _power,
                           java.lang.Integer _field,
                           boolean _grant)
                    throws CreateError
Effective constructor. Does not call BaseManagerImpl.newMetaRight(this), so it has to be done after the construction for any new non-basic metaright. Called by ACSFactoryUtilityImpl.initializeBasicMetaRights() and ACSImpl.closeRights().

Parameters:
_kernelRight - is the right if the StringRight is not typed, or otherwise it is the beginning of the right. Never null.
_targetClass - is the target class, non-null only when this StringRight is typed. Do not use the 'Immutable' version of the interface. A typical value is "ARoad0.gBaseInterface.Directory".
_internalKey - is the internal key which allows rights comparisons. From 1 to 99999.
_power - is the line value in the matrix (power, field). From 1 to 99. Not null.
_field - is the colomn value in the matrix (power, field). From 1 to 99. Not null.
_grant - is true if it is a granting metaright. False for a denying right.
Throws:
CreateError - if the StringRightImpl constructor - the instance must then be deleted !
Method Detail

getAcsName

public final ImmutableName getAcsName()
Specified by:
getAcsName in interface StringRight
Returns:
an empty name.

getFullName

public final ImmutableName getFullName()
Get the full name of the right, which is unique for the program. The name is composed of: <FOR>:: target class wrapped with spaces, or ' all ' <VALUE>:: right

here, ':: ' is added by gBase.NameImpl.toString(). This name is used only outside gBase, following BaseObject interface. All the denying rights have 'deny_' as first caracters in their right.

Specified by:
getFullName in interface BaseObject
Specified by:
getFullName in interface StringRight
Returns:
ImmutableName of the right, which is empty if it is an empty right

getName

public final ImmutableName getName()
Get the BaseObject name of the metaright, that is its full name.

Specified by:
getName in interface BaseObject
Returns:
getFullName()
See Also:
getFullName(), BaseUtilityImpl.getRightFromNameAsString(java.lang.String, ARoad0.gBaseInterface.ACSRun)

getNickName

public final java.lang.String getNickName()
Gets a short name limited to 5 characters if positive, 16 first characters if starts with '|' and positive, and 7 if negative, for displaying this right in the views.

The exception is for the administrative rights where the 15 first characters are put in the nick name:

If right_ is '|modify_security_descriptor|', the nick name is '|modify_security|'.

If right_ is 'read', the nick name is the same. If right_ is 'read&execute', the nick name is 'read&'. If right_ contains '_', the nick name 2 last characters are '_%' where '%' is here the character at the right of the last '_' in right_. For example, 'write_for_directory' gives 'wri_d'. The nick name for a negative right starts with 'd_', if the right starts by 'deny_'. The other parts of the nick name are like for a positive right. If right is 'deny_read', the nick name is 'd_read'. If the right is 'deny_write_for_directory', the nick name is 'd_wri_d'. If the negative right does not start with 'deny_', it is processed like a positive right and the nick name size is limited to 5. This short name is NOT unique for the Access Road program, nor for the ACS if it is an ACS object.

Specified by:
getNickName in interface BaseObject
Specified by:
getNickName in interface StringRight
Returns:
the nick name. Never null.

getInternalKey

public final int getInternalKey()
Specified by:
getInternalKey in interface StringRight
Returns:
the internal key

isTargetClassed

public final boolean isTargetClassed()
Specified by:
isTargetClassed in interface StringRight
Returns:
true if the right is always associated to a class for a target, as for exemple 'delete_Actor' for the class Actor.

isTargetClassTyped

public final boolean isTargetClassTyped()
Specified by:
isTargetClassTyped in interface StringRight
Returns:
boolean true if the right is always associated to a type for a target class, as for exemple in LCA Lotus Notes 'read_javascript' for the class Actor.

isGrantingRight

public boolean isGrantingRight()
Specified by:
isGrantingRight in interface StringRight
Returns:
true if the metaright is a granting right - the opposite one is a denying right.

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface StringRight
Returns:
true if the embedded StringRightImpl is equals to an empty instance

getRight

public final java.lang.String getRight()
If the metaright is non-classed, the result contains the kernel right only. If the metaright is classed, the result contains the kernel right and the class target.

Specified by:
getRight in interface StringRight
Returns:
the right to apply

getTargetClass

public final java.lang.String getTargetClass()
Specified by:
getTargetClass in interface StringRight
Returns:
the complete name of the class from which the type is provided. Null if the right is not typed.

getTargetClassType

public final java.lang.String getTargetClassType()
Specified by:
getTargetClassType in interface StringRight
Returns:
null since a metaright has no type.

setComment

public void setComment(java.lang.String _s)
Set any comment related to this right. It is a bound property.

Specified by:
setComment in interface StringRight
Parameters:
_s - is an user comment which is associated to the right.

getComment

public final java.lang.String getComment()
Specified by:
getComment in interface StringRight
Returns:
the comment which is associated to the right. May be null.

addUpperRight

public final 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_all'. An upper right cannot be an administrative right (that is, having a strenght superior to 90000) if this instance is not an administrative right. It is a bound property.

Specified by:
addUpperRight in interface StringMetaRight
Parameters:
_right - is directly included in this right. Never null.
Throws:
BaseError - if the right is null, if this instance is a slave, or if the upper right is not superior to this instance, or an upper right is an administration right while the new right is not, or the number of upper rights is already 5.

removeUpperRight

public final 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. May be called by the greater metaright finalizeForUser() method. It is a bound property.

Specified by:
removeUpperRight in interface StringMetaRight
Parameters:
_right - is directly included in this right. Never null.
_caller - is the object which calls this method; used to identify the upper right finalizing operation with _caller == _right.

getUpperRights

public final StringRight[] getUpperRights()
Get the set of upper metarights which are strictly greater than this metaright without any intermediate right, following the network of metarights.

Specified by:
getUpperRights in interface StringRight
Returns:
an array of connected StringMetaRightImpl[] which are strictly greater than this right. Never null but may be empty.

getLowerRights

public final StringRight[] getLowerRights()
Get the set of lower metarights which are strictly lesser than this metaright without any intermediate right, following the network of metarights.

Specified by:
getLowerRights in interface StringRight
Returns:
an array of connected StringMetaRightImpl[] which are strictly lesser than this right. Never null but may be empty.

getEorMetaRight

public final StringMetaRight getEorMetaRight()
Get the global Access Road right which is a generic description of this ACS right. Metarights are used in the rights comparision and analysis to compare rights from different ACS.

Specified by:
getEorMetaRight in interface StringRight
Returns:
itself.

isParent

public final boolean isParent()
Specified by:
isParent in interface StringRight
Returns:
true if the right is a parent of lower rights - the slaves - in a multi-level right.

isSlave

public final boolean isSlave()
A slave right has a strong link with a parent right.

Specified by:
isSlave in interface StringRight
Returns:
true if the right has an unique upper right - the parent - in a multi-level right.

setParent

public final void setParent(boolean _b)
                     throws BaseError
UNUSED, the value is always false. Set the right as parent of some lower rights - the slaves - in a multi-level right. There is no inverse method. This method has to be used before the registration of the lower rights. Caution: some lower rights may be not slaves, so this instance may be not parent for all its lower rights.

Specified by:
setParent in interface StringRight
Parameters:
_b - is true to set the right as a parent of slave rights
Throws:
BaseError - if there are lower rights.

setSlave

public final void setSlave(boolean _b)
                    throws BaseError
UNUSED, the value is always false. Set that the right has an unique upper right - the parent, already registered - in a multi-level right.

Specified by:
setSlave in interface StringRight
Parameters:
_b - is true to set the right as a slave of a parent right
Throws:
BaseError - if there is more than one upper right, or if it is not a parent.

setDesactivated

public final void setDesactivated(boolean _b)
Set that the right is desactivated. Used to create a list of flat rights with one single desactivated root. All the associated open ACS rights are desactivated.

Specified by:
setDesactivated in interface StringRight
Parameters:
_b - is true to desactivate the right

isDesactivated

public final boolean isDesactivated()
Get if the right is desactivated.

Specified by:
isDesactivated in interface StringRight

addPropertyChangeListener

public final void addPropertyChangeListener(java.beans.PropertyChangeListener _l)
Add a listener to the bean, for all the bound properties.

Specified by:
addPropertyChangeListener in interface BoundBean
Parameters:
_l - PropertyChangeListener to add. Caution: the listener must NOT have specific hashCode() and equals() methods, to work with HashSet in the removing operations.

addPropertyChangeListener

public final void addPropertyChangeListener(java.lang.String _propertyName,
                                            java.beans.PropertyChangeListener _l)
Add a listener to the bean. For the properties: 'Comment', 'Parent', 'Slave', 'Desactivated', 'LowerRights', 'UpperRights', 'ACSRights'.

Specified by:
addPropertyChangeListener in interface BoundBean
Parameters:
_propertyName - String is the name of the property
_l - PropertyChangeListener to add. Caution: the listener must NOT have specific hashCode() and equals() methods, to work with HashSet in the removing operations.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener _l)
Remove a listener to the bean, for all the bound properties. Used by ViewInBaseImpl.

Specified by:
removePropertyChangeListener in interface BoundBean
Parameters:
_l - PropertyChangeListener to remove

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String _propertyName,
                                         java.beans.PropertyChangeListener _l)
Remove a listener to the bean. For the properties: 'Comment', 'Parent', 'Slave', 'Desactivated', 'LowerRights', 'UpperRights', 'ACSRights'.

Specified by:
removePropertyChangeListener in interface BoundBean
Parameters:
_propertyName - String is the name of the property
_l - PropertyChangeListener to remove

equals

public final boolean equals(java.lang.Object _obj)
Compares the two StringMetaRights without comparison of the property m_ACSRights_, since a deserialized metaright in an ACS rights array, may have a null m_ACSRights_ althought it has be to considered as equal to the reference metaright from BaseManagerImpl.

Specified by:
equals in interface BaseObject
Specified by:
equals in interface StringRight
Overrides:
equals in class java.lang.Object
Parameters:
_obj - to compare
Returns:
boolean true only if the variables are the same

hashCode

public final int hashCode()
Specified by:
hashCode in interface BaseObject
Specified by:
hashCode in interface StringRight
Overrides:
hashCode in class java.lang.Object
Returns:
hashcode value for this instance.

compareTo

public final int compareTo(java.lang.Object _o)
                    throws java.lang.ClassCastException
Compare two StringRight instances through the internal key and, if not null, acsname comparisons, whatever the right, power and field. All metarights are superior to any acsright.

Specified by:
compareTo in interface StringRight
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
_o - to compare
Returns:
0 if the rights have the same internal key and acsname, a negative integer if this object is lesser than the argument, and a positive integer if this object is greater than the argument.
Throws:
java.lang.ClassCastException - - if the specified object's type prevents it from being compared to this current Object

getSerialVersionUID

public long getSerialVersionUID()
Returns:
long serial version UID for serialization of the class

toString

public final java.lang.String toString()
Specified by:
toString in interface StringRight
Overrides:
toString in class java.lang.Object
Returns:
the full name as String.

getPower

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

Specified by:
getPower in interface StringMetaRight
Returns:
a bigger value as the power of the right is higher

getField

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

Specified by:
getField in interface StringMetaRight
Returns:
the number of a column where the near metarights are grouped, all from a limited set of ACS.

getM_ACSRights

public final java.util.Map<java.lang.String,StringRight[]> getM_ACSRights()
Get the ACS StringRights which are equivallent to this MetaStringRight in each ACS. Include the closed-ACS rights.

Specified by:
getM_ACSRights in interface StringMetaRight
Returns:
Map where the key is an ACS name as String, and the value is an array of StringRightImpls. May be empty.

getACSRightsForOneACS

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

Specified by:
getACSRightsForOneACS in interface StringMetaRight
Parameters:
_aCSname - an ACS name
Returns:
an array of StringRightImpls. May be empty. Never null.

getInFloatingSubNetwork

public final boolean getInFloatingSubNetwork()
Specified by:
getInFloatingSubNetwork in interface StringMetaRight
Returns:
boolean true if the metaright is in a floating subnetwork for a specific ACS, without any association to most of the metarights.

setInFloatingSubNetwork

public void setInFloatingSubNetwork(boolean _b)
It is not a bound property, since it is set only at the creation.

Specified by:
setInFloatingSubNetwork in interface StringMetaRight
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

public final 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.

Specified by:
isUnused in interface StringMetaRight
Returns:
boolean true if the metaright has no ACS rights associated to it.

finalizeForUser

public final void finalizeForUser()
                           throws UpDateError
UNUSED METHOD. Calls finalizeForBase().

Specified by:
finalizeForUser in interface FinalizedObjectForUser
Specified by:
finalizeForUser in interface StringRight
Throws:
UpDateError - if the base does not known the right (if it is a clone, typically).

finalizeForBase

public final void finalizeForBase()
                           throws UpDateError
UNUSED METHOD. This method removes the StringMetaRight from the base list, finalizes the associated rights, and removes from the lower and upper metarights. This method is called by finalize(), but finalize() may be not called. An unused object has to be deleted to inform the other objects, and this method HAS TO BE CALLED before deleting the instance. Sees finalizeClosedRight() for closing a deprecated right without updating the external references.

Specified by:
finalizeForBase in interface FinalizedObject
Throws:
UpDateError - if the base does not known the right (if it is a clone, typically).

setPower

protected void setPower(int _p)
Set the power, which is the line value in the matrix (power, field) which helps to locate the metaright.


setField

protected void setField(int _f)
Set the field, which is the colomn value in the matrix (power, field) which helps to locate the metaright.


addACSRight

protected final void addACSRight(StringRightImpl _right)
Add an ACS right which is associated to this metaright in an ACS. Called by the ACS right constructor and at the ACS opening by ACSImpl.checkClosedRights(). This metaright may have already some right(s) associated to the same ACS. It is a bound property.

Parameters:
_right - which associates this metaright to it. No action if null.

removeACSRight

protected void removeACSRight(StringRightImpl _right)
Remove an ACS right which is associated to this metaright. Called by the ACS right finalizeForUser() method and ACSImpl.closeAcsRights(). It is a bound property.

Parameters:
_right - directly associates this right to it. No action if null or unknown.

addLowerRight

protected final void addLowerRight(StringMetaRight _right)
Add a lower metaright which are strictly lesser than this metaright without any intermediate right, following the network of metarights. Called by the lower metaright addUpperRight() method. It is a bound property.

Parameters:
_right - is directly included in this right. Never null.

removeLowerRight

protected void removeLowerRight(StringMetaRight _right)
Remove a lower metaright which are strictly lesser than this metaright without any intermediate right, following the network of metarights. Called by the lower metaright removeUpperRight() method and by the lower metaright finalizeForUser() method. It is a bound property.

Parameters:
_right - is directly included in this right. Never null.

firePropertyChange

protected final void firePropertyChange(java.lang.String _propertyName,
                                        java.lang.Object _oldValue,
                                        java.lang.Object _newValue)
Fire an event to every registered listener, in any order. For the properties: 'ACSRights'. Called by addACSRight() and removeACSRight(). Used as the same method in java.beans.PropertyChangeSupport, which is not used because hasListeners() has a bug in JDK 1.3.0-C of SUN.

Parameters:
_propertyName - name of the changing property
_oldValue - of the property
_newValue - of the property. No operation if equal to _oldValue and not null.

finalizeClosedRight

protected final void finalizeClosedRight()
This method is to use only for closed rights in the relevant ACS list, to set an empty instance. It cuts all the Object External References, without updating these objects as finalizeForUser() does, and finalize the embedded StringRightImpl. It set to null all variables, so the instance becames empty. It is called by ACSImpl.checkClosedAclEntriesTo(). Call StringRightImpl.finalizeClosedRight().