ARoad0.gBaseInterface
Interface ImmutablePrivilegeTarget

All Superinterfaces:
ACSObject, BaseBeanManager, BaseObject, BoundBean, java.lang.Comparable, FinalizedObject, FinalizedObjectForUser, ImmutableLeaf, ImmutableTarget, PrivilegeUser
All Known Subinterfaces:
Actor, ActorMySQL, ActorUbuntu, BasesSetMySQL, Directory, DirectoryMySQL, DirectoryUbuntu, ExecutableUbuntu, ImmutableActor, ImmutableDirectory, ImmutableResource, ImmutableVirtualFolder, PrivilegeTarget, Resource, ResourceMySQL, ResourceUbuntu, VirtualFolder, VirtualFolderMySQL
All Known Implementing Classes:
ActorImpl, ActorMySQLImpl, ActorUbuntuImpl, BasesSetMySQLImpl, DirectoryImpl, DirectoryMySQLImpl, DirectoryUbuntuImpl, ExecutableUbuntuImpl, ResourceImpl, ResourceMySQLImpl, ResourceUbuntuImpl, VirtualFolderImpl, VirtualFolderMySQLImpl

public interface ImmutablePrivilegeTarget
extends PrivilegeUser, ImmutableTarget, ImmutableLeaf

This interface is responsible for modeling the target which is connected to Privileges. A privilege instance is contolled by the ACS, and it is then appliable to any couple (source, target) which belong to the ACS. There are different types of privilege (defined in PrivilegeAbst class) and interfaces. Fires the event 'InheritedTargetPrivileges' when the parent changes them. See the Copyright.

See Also:
to understand the different types of privilege

Method Summary
 java.util.List<PrivilegeForLinks> getEorImmutableL_TargetInheritedLinkedPrivileges()
          Gets all the immutable list of the inherited linked privileges of the target.
 java.util.List getEorL_TargetPrivilegeForLinks()
          Gets all the privilegeForLinks linked to this instance; not the privilegeForTypes.
 java.util.List getEorL_TargetPrivilegeForTypes()
          Gets all the privilegeForTypes of this target.
 java.util.List getEorL_TargetPrivileges()
          Gets all the direct privileges linked to this target, not the inherited ones.
 java.util.Map<java.lang.String,StringRight[]> getM_TargetInheritedLinkedPRIRights()
          Gets the internal map of the inherited linked privilege rights, where the default key is the name of the EligibleParty having the rights, extended with, as last component, the parent order of the direct or indirect parent which has given the rights.
 java.lang.String getType()
          The type is generally defined by the user.
 PrivilegeForLinks selectInheritedPrivilege(PrivilegeForLinks _lpri, java.lang.String _type)
          Returns the Privilege to use as inherited Privilege in a child.
 
Methods inherited from interface ARoad0.gBaseInterface.ImmutableTarget
getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getL_AcsOfSoftReferences, getL_SoftAlias
 
Methods inherited from interface ARoad0.gBaseInterface.BaseBeanManager
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface ARoad0.gBaseInterface.ImmutableLeaf
compareTo, getEorParent
 
Methods inherited from interface ARoad0.gBaseInterface.ACSObject
getAcsName, getEorACS
 
Methods inherited from interface ARoad0.gBaseInterface.BaseObject
equals, getFullName, getName, getNickName, hashCode
 
Methods inherited from interface ARoad0.gBaseInterface.BoundBean
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface ARoad0.gBaseInterface.FinalizedObjectForUser
finalizeForUser
 
Methods inherited from interface ARoad0.gBaseInterface.FinalizedObject
finalizeForBase
 

Method Detail

getType

java.lang.String getType()
The type is generally defined by the user. It is used by PrivilegeForType instances. If the user does not change it, it is equal to the resource type if the object is a Resource, or to the EP type if it is an EP.

Specified by:
getType in interface ImmutableTarget
Returns:
String of type, as for exemple "executable" or "file". Not null.

getEorL_TargetPrivileges

java.util.List getEorL_TargetPrivileges()
Gets all the direct privileges linked to this target, not the inherited ones. There is two types of privilege links (allowed or not by the ACS):

- PrivilegeForLinks: linked privilege established for a couple (ACSObject, privilege),

- PrivilegeForType: typed privilege, where the ACSObject and the privilege has a common type, but without the TYPED_FOR_SEED and TYPED_CLASSED_SPECIFIC privileges.

Returns:
List of Privileges. May be empty, but never null.

getEorL_TargetPrivilegeForTypes

java.util.List getEorL_TargetPrivilegeForTypes()
Gets all the privilegeForTypes of this target. Does not include the TYPED_FOR_SEED and the TYPED_CLASSED_SPECIFIC privileges.

Returns:
List of PrivilegeForTypes. May be empty, but never null.

getEorL_TargetPrivilegeForLinks

java.util.List getEorL_TargetPrivilegeForLinks()
Gets all the privilegeForLinks linked to this instance; not the privilegeForTypes. Return only the direct privileges, even if the privilege cascading is activated.

Returns:
List of PrivilegeForLinks. May be empty, but never null.

getEorImmutableL_TargetInheritedLinkedPrivileges

java.util.List<PrivilegeForLinks> getEorImmutableL_TargetInheritedLinkedPrivileges()
Gets all the immutable list of the inherited linked privileges of the target. To use by the consumers in the gWork packages, which deny any access if the returned value is null.

Returns:
immutable list of Linked Privileges. May be empty but never null.

getM_TargetInheritedLinkedPRIRights

java.util.Map<java.lang.String,StringRight[]> getM_TargetInheritedLinkedPRIRights()
Gets the internal map of the inherited linked privilege rights, where the default key is the name of the EligibleParty having the rights, extended with, as last component, the parent order of the direct or indirect parent which has given the rights. For instance, the direct parent has the string '1', and its direct parent has the string '2' as parent order in the last name component, and so on. This property is not displayed to the user. A subclass may change the key form. The map value is always a non-empty StringRight array of inherited rights. Called for the gWork consumers, but only in the AcsAddons implementing the privilege inheritance. An AcsAddon may choose to not use this property.

Returns:
unmodifiable map of inherited rights from the linked privileges. May be null but never empty.

selectInheritedPrivilege

PrivilegeForLinks selectInheritedPrivilege(PrivilegeForLinks _lpri,
                                           java.lang.String _type)
Returns the Privilege to use as inherited Privilege in a child. Empty method which has to be overridden into an AcsAddon handling the privilege inheritance.

Parameters:
_lpri - the initial Privilege which may be given to the child
_type - type of a child, as Resource
Returns:
the inherited Privilege if the child inherits this initial Privilege, or null