ARoad0.gBaseInterface
Interface ACSRun

All Superinterfaces:
BaseBeanManager, BaseObject
All Known Subinterfaces:
ACS, ImmutableACS
All Known Implementing Classes:
ACSFactoryImpl, ACSFactoryMySQLImpl, ACSFactoryUbuntuImpl, ACSImpl, ACSMySQLImpl, ACSUbuntuImpl

public interface ACSRun
extends BaseObject, BaseBeanManager

This interface is responsible for returning the first immutable ACS properties and the first rights. It is used to create the acsrights before the selection of the allowed rights for each right type (Group, ACL,...). It contains the associations to handle at the creation or the deletion of some ACSObjects, by the mean of actions to do by the program. It allows to get the ACS vocabulary that defines the AcsAddon classes. This interface is then immplemented by both ACSFactoryImpl and ACSImpl. 'OneRight' is the single bound property.


Method Summary
 void addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
          Add a listener to the bean.
 void addRight(StringRight _right)
          Register a new acsright in this ACS.
 java.lang.String getACSType()
          Returns the ACS type, as ACSImpl.GENERIC, LINUX,...
 StringRight getFirstRightFromMeta(java.lang.String _metaRight)
          Get a right which is registered by this ACS.
 StringRight getFullControlRight()
          Get the first acsright which has 'full_control' as metaright, or this metaright if no acsright complies this condition.
 ImmutableName getISName()
          Get the name of the information system which owns this acs.
 StringRight[] getL_Rights()
          Get all the rights which are allowed in this ACSRun.
 java.util.Map<java.lang.String,java.lang.String[]> getM_AcsVocabulary()
          Gets the ACS vocabulary.
 java.util.Map<java.lang.String,java.lang.String[]> getM_AssociationsOnNewObject()
          Get the associations to handle at the creation or the deletion of some ACSObjects, by the mean of actions to do by the program.
 java.util.Map getM_CommentsOnProperties()
          Gets comments to explain how this ACS simulates a real system/software.
 StringRight getOneRight(ImmutableName _name)
          Get a right which is registered by this ACSRun.
 StringRight getOneRight(java.lang.String _nickName)
          Get a right which is registered by this ACSRun.
 ImmutableName getParentName()
          Get the mandatory parent name for the ACS in the IS nametree.
 void removePropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
          Add a listener to the bean.
 void removeRight(StringRight _right)
          Unregisters a right in this ACSRun.
 
Methods inherited from interface ARoad0.gBaseInterface.BaseObject
equals, getFullName, getName, getNickName, hashCode
 
Methods inherited from interface ARoad0.gBaseInterface.BaseBeanManager
addPropertyChangeListener, removePropertyChangeListener
 

Method Detail

getISName

ImmutableName getISName()
Get the name of the information system which owns this acs.

Returns:
a copy of the IS name. May be empty, but not null.

getACSType

java.lang.String getACSType()
Returns the ACS type, as ACSImpl.GENERIC, LINUX,...

Returns:
the acs type

getParentName

ImmutableName getParentName()
Get the mandatory parent name for the ACS in the IS nametree.

Returns:
the parent name. May be null or empty.

getL_Rights

StringRight[] getL_Rights()
Get all the rights which are allowed in this ACSRun. May be StringMetaRights which then do not belong to this ACSRun.

Returns:
all the acs and meta rights.

getFullControlRight

StringRight getFullControlRight()
Get the first acsright which has 'full_control' as metaright, or this metaright if no acsright complies this condition. 'full_control' metaright has 'deny_all' metaright for opposite, and its single user upper right is 'modify_security_descriptor'.

Returns:
the right. Never null.

getOneRight

StringRight getOneRight(java.lang.String _nickName)
Get a right which is registered by this ACSRun. It may be a StringMetaRight.

Parameters:
_nickName - is the nick name of the right, provided by StringRight.getNickName().
Returns:
the right; null if it does not exist.

getOneRight

StringRight getOneRight(ImmutableName _name)
Get a right which is registered by this ACSRun. It may be a StringMetaRight.

Parameters:
_name - is the name of the right, provided by StringRight.getName().
Returns:
the right; null if it does not exist.

getFirstRightFromMeta

StringRight getFirstRightFromMeta(java.lang.String _metaRight)
Get a right which is registered by this ACS. It may be a StringMetaRight.

Parameters:
_metaRight - is the right of the metaright of the searched right, provided by StringRight.getRight().
Returns:
the right; null if it does not exist.

addRight

void addRight(StringRight _right)
              throws CreateError
Register a new acsright in this ACS. 'OneRight' is a bound property.

Parameters:
_right - is the new right to register. Not null.
Throws:
CreateError - if the right is null, a metaright or if the right is already used.

removeRight

void removeRight(StringRight _right)
                 throws UpDateError
Unregisters a right in this ACSRun. Used by the StringRight.finalizeForUser() method. 'OneRight' is a bound property.

Parameters:
_right - the right to unregister.
Throws:
UpDateError - if the right is null or not known.

addPropertyChangeListener

void addPropertyChangeListener(java.lang.String _propertyName,
                               java.beans.PropertyChangeListener _l)
Add a listener to the bean. Now only for the property 'OneRight'.

Specified by:
addPropertyChangeListener in interface BaseBeanManager

removePropertyChangeListener

void removePropertyChangeListener(java.lang.String _propertyName,
                                  java.beans.PropertyChangeListener _l)
Add a listener to the bean. Now only for the property 'OneRight'.

Specified by:
removePropertyChangeListener in interface BaseBeanManager
Parameters:
_propertyName - name of the property
_l - listener

getM_AssociationsOnNewObject

java.util.Map<java.lang.String,java.lang.String[]> getM_AssociationsOnNewObject()
Get the associations to handle at the creation or the deletion of some ACSObjects, by the mean of actions to do by the program. Actions have numbers from 1 to 9. The criteria is a map key among the followings:

- 'Class'.'Property'..XXX: a new object property has the value XXX;

- 'Class'.'Property'..XXX: a new object property value contains the value XXX;

- 'Class'.'Property'..XXX: a new object property has exactly the class XXX;

- 'Class'.'Property'..XXX: the new object property name starts with the ACS name plus the subname XXX;

- 'Class'..XXX: the new object name of the class starts with the ACS name plus the subname XXX;

- ..XXX: the new object class is exactly ARoad0.gBase.XXX;

- ..XXX: the new object class is a subclass of ARoad0.gBase.XXX.

The allowed String map values depends lightly on the map key. The values define one or several actions to do if the key matches. There are 4 possible formats for the first value of the action N:

- N..XXX which specifies the class name XXX in gBase, without the Impl String,

of an associate object to build up or to finalize when the master is build up

or finalized

- N...YYY which specifies the method YYY to call on the master,

- N...YYY which specifies the method YYY to call on the master ACS,

- N...C.ZZZ which specifies the method ZZZ

to call on the associate previously created by the action number C.

After each first value, there is the optional list of the constraints on the arguments of the constructor (case 1) or the method (cases 2 to 4), and there is one constraint specification per argument. Each argument constraint specification belongs to a set of 13 allowed formats, presented herein for the action N:

- N.'PropertyName'.: null value for the argument having the name 'PropertyName'

- N.'PropertyName'.: the master is the argument

- N.'PropertyName'.: the master value for the same property

- N.'PropertyName'.: the last component in the master name

- N.'PropertyName'.: boolean true if the master is creating, false if it is finalizing

- N.'PropertyName'..XXX: the argument is XXX

- N.'PropertyName'..XXX++YYY: the master value

for the same property, with some optional pre and post String values

- N.'PropertyName'..XXX++YYY:

the last component in the master name, with some optional

pre and post Name values as Strings

- N.'PropertyName'..+YYY

the context in the master name, with a post Name value as String

- N.'PropertyName'..+YYY: the master ACS name,

with a post Name value as String

- N.'PropertyName'..XXX+.C.+YYY: the associate number C

value for the same property, with some optional pre and post String values

- N.'PropertyName'..XXX+.C.+YYY:

the last component in the associate number C name, with a post String value

- N.'PropertyName'...C.+YYY:

the context in the associate number C name, with a post String value

The internal map may contain values where the first 2 characters are not 'N.', but the first no-number value and its followings are returned by this method which is used by StringMapPropertyEditor to edit the internal map.

Returns:
a copied Map where the key is a String, and the value is an array of Strings started by a number between 1 to 9 followed by a point. May be empty, but not null.

getM_CommentsOnProperties

java.util.Map getM_CommentsOnProperties()
Gets comments to explain how this ACS simulates a real system/software. The criteria is an ACS property displaying name. The value is a String array of free user comments on the settings of the related ACS property.

Returns:
a copied Map where the key is a String, and the value is an array of Strings. May be empty, but not null. A value may be empty but is never null.

getM_AcsVocabulary

java.util.Map<java.lang.String,java.lang.String[]> getM_AcsVocabulary()
Gets the ACS vocabulary. This may cover several independant domains:

- the AcsAddon editor, the AcsAddon package editor and the AcsAddon name, in three keys,

- how to name the L_ACS_TREE_UPPER_NODES_FOR_ONE_ACS constants for this ACS, as names of the ACS tree nodes in the proper ACS internal frame. An example is to replace the tree node 'Actors (right user target)' by 'Scripts'.

- what are the gBase classes to use, from the generic package or from the AcsAddon gBase package (see L_CLASSIC_CLASS_KEYS), like when the Addon Ubuntu subclasses ResourceImpl with ResourceUbuntuImpl. The full Java name of the subclass has to be put in the value array.

- If the ACS is an AcsAddon, what are the specific new classes in the AcsAddon gBase package (see ACSADDON_NEW_CLASSES). In this case, the class names are separated by one space, like in 'ExecutableUbuntu XXXXUbuntu YYYYUbuntu', without the full name of the classes.

- If the ACS is an AcsAddon, what are the non-generic rights in the ACSObjects on which the ACS constraints of the specialized rights are applicable, and in that case, what domain is applicable. An example is the domain 'GpORightsSet' for the property 'OtherRights', in Ubuntu, that is declared by the value 'OtherRights.GpORightsSet'.

A new ACSFactory in an AcsAddon package sets its vocabulary in its constructor, so it is possible to call this method just after the construction of the factory.

Returns:
an unmodifiable Map where the key is a String, and the value is a String array. May be null. A map value is never empty but may be null.
See Also:
ACSFactoryUtilityImpl.L_ACS_TREE_UPPER_NODES_FOR_ONE_ACS, ACSFactoryUtilityImpl.L_CLASSIC_CLASS_KEYS, ACSFactoryUtilityImpl.L_ACS_TREE_GENERIC_UPPER_NODES