ARoad0.gBaseInterface
Interface DetailledName

All Superinterfaces:
FinalizedObject, FinalizedObjectForUser
All Known Subinterfaces:
AclEntry, ImmutableAclEntry, ImmutablePrivilege, PreviousDetailledName, Privilege, PrivilegeForLinks, PrivilegeForType
All Known Implementing Classes:
AclEntryImpl, PrivilegeAbst, PrivilegeForLinksImpl, PrivilegeForTypeImpl

public interface DetailledName
extends FinalizedObjectForUser

This is an interface to inform that it is an object with a detailled name which gives the key components of the object. Allows a clearer presentation of an object in the explorer and into the beamer. The beamer tests if an object is a DetailledName, and if yes, displays the detailled name rather than the name. Used for the AclEntries and the Privileges. To allow to get the BaseObject without errors, a detailled name needs to be completed by the ACS name. However, an external entity needs to include its ACS into its detailled name. The classes AclEntryImpl and PrivilegeAbstract implements the method getNameFromDetailledName().

To know if the detailled name is about an AclEntry or a Privilege, the following rules are applied:

- a detailled name contains at least one sequence '||' and at most one sequence '>>', - an AclEntry detailled name contains the one sequence '>>', and '>>' is before the first '||' sequence. - a Privilege detailled name may not contain the sequence '>>', and otherwise, '>>' is after the last '||' sequence.

For a type privilege, the possible forms are:

- privilegeType || nickName || first right || source type >> target type For a linked privilege, the possible forms are:

- privilegeType || nickName || first right, for a internal privilege,

- ACS: ACS_name | privilegeType || nickName || first right, for a external privilege.

The form of the detailled name for an internal ACL is:

- incomplete Eligible Party name >> incomplete Resource name || grant OR deny || first condition group last component.

The last part '|| first condition group last component' is there only if there is a condition group. The form of the detailled name for an external ACL is:

- ACS: ACS_name | (full or incomplete) Eligible Party name >> (full or incomplete) Resource name || grant OR deny || <Source ACS group> OR <Target ACS group> || first condition group last component.

An Eligible Party or Resource name is incomplete if it belongs to the AclEntry ACS. The condition group is put in the name or the detailled name only for a flexible conditional AclEntry. '<Source ACS group>' is used when the condition group belongs to the source (Eligible Party) ACS. Due to the method setValue() of CollectionPropertyEditor, there are 3 constraints:

- an array or a collection of DetailledName cannot be updated with a global 'set' method, nor a 'choiceMethodForNew' parameter. Some 'add/remove' methods are mandatory if there is no constructor/finalizing method.

- a DetailledName instance can be deleted through a 'finalizeForUser' method like a Privilege, or through any other method the BeanInfo property descriptor specifies, like an AclEntry where a Resource method is unused.

- it it not possible to use the beamer 'Prev.' to get the values of the previous property the beamer displays.


Method Summary
 java.lang.String getDetailledName()
          This method returns the detailled name for the explorer, which gives the key components of the object.
 java.lang.String getDetailledNameFromName(ImmutableName _name)
          Gets the detailled name from the BaseObject name.
 ImmutableName[] getKeyPropertiesFromDetailledName(java.lang.String _detailledName)
          Extracts the key property names from the detailled name of an object.
 ImmutableName getNameFromDetailledName(ImmutableACS _acs, java.lang.String _detailledName)
          Extracts the BaseObject name from the detailled name of an object.
 
Methods inherited from interface ARoad0.gBaseInterface.FinalizedObjectForUser
finalizeForUser
 
Methods inherited from interface ARoad0.gBaseInterface.FinalizedObject
finalizeForBase
 

Method Detail

getDetailledName

java.lang.String getDetailledName()
This method returns the detailled name for the explorer, which gives the key components of the object. On the contrary of getName(), it may do not contain the ACS name, and returns a string which is more easily readable by the Access Road user. An external object has a detailled name starting with 'ACS: acs_name | '.


getDetailledNameFromName

java.lang.String getDetailledNameFromName(ImmutableName _name)
                                          throws BaseError
Gets the detailled name from the BaseObject name. The format of the returned value depends on the class of the BaseObject.

Parameters:
_name - name of the BaseObject
Returns:
the detailled name
Throws:
BaseError
See Also:
PrivilegeAbst.buildUpDetailledName(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String), AclEntryImpl.buildUpDetailledName(ARoad0.gBaseInterface.ImmutableName, ARoad0.gBaseInterface.ImmutableName, boolean, java.lang.String)

getKeyPropertiesFromDetailledName

ImmutableName[] getKeyPropertiesFromDetailledName(java.lang.String _detailledName)
                                                  throws BaseError
Extracts the key property names from the detailled name of an object.

Parameters:
_detailledName - is the viewable name of the object
Returns:
array of properties which describes the object, and the items are implementation dependant.
Throws:
BaseError

getNameFromDetailledName

ImmutableName getNameFromDetailledName(ImmutableACS _acs,
                                       java.lang.String _detailledName)
                                       throws BaseError
Extracts the BaseObject name from the detailled name of an object. This is a pseudo-static method, since it does not depend on the instance.

Parameters:
_acs - ACS of the BaseObject
_detailledName - the viewable name of the object
Returns:
name of the object
Throws:
BaseError