ARoad0.gBaseInterface
Interface ImmutableResource

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

public interface ImmutableResource
extends ImmutableBasic, ImmutablePrivilegeTarget

This interface is the immutable version of Resource. The resource may have a parent in a resource tree in this ACS, As a general resource, it is accessed from EligibleParties (userID, groupID, actor) through AclEntries belonging to this ACS or to another one. As a resource with AGO rights, it has an userID (account) and a groupID (group) in this ACS, and rights for them in this ACS. As a PrivilegeTarget, it handles the Privileges. This interface has several subinterfaces in this package. Directories, files, executable progams are examples of resources.


Method Summary
 boolean containsAclEntryToEP(EligibleParty _ep)
          True if an EligibleParty is associated to the resource through an AclEntry.
 boolean getActorActivated()
           
 boolean getAGOAccessFromTheParentAccount()
           
 boolean getAGOAccessFromTheParentGroup()
           
 ImmutableGroupID getEorGroupID()
           
 java.util.List<AclEntry> getEorImmutableL_TargetInheritedAclEntries()
          Gets all the immutable list of the inherited AclEntries of the target.
 java.util.Set getEorL_EPthroughAclEntry()
          Get all the EligibleParty associated to the resource through at least one AclEntry.
 ImmutableUserID getEorUserID()
          Get the userID, following the AGO rights.
 AclEntry[] getL_aclEntry()
          Get the list where each AclEntry delivers rights to an EligibleParty to access or to deny access to this Resource.
 ImmutableName[] getL_AcsControllers()
          Gets the open ACS that manages an external AclEntry or Linked Privilege for this resource.
 StringRight[] getL_groupRights()
          Get the rights of the resource group.
 StringRight[] getL_inheritedGroupRights()
          Get the inherited rights from the parent of the resource group.
 StringRight[] getL_inheritedOwnerRights()
          Get the inherited rights from the parent of the resource owner.
 StringRight[] getL_ownerRights()
          Get the rights of the resource owner.
 StringRight[] getL_rootRights()
          Get the rights of the root, following AGO rights concept.
 java.util.Map<java.lang.String,ImmutableName[]> getM_ConstrainedChildACS()
          A constrained (opened or closed) child ACS has one or several of the following relations to this Resource: , or .
 java.util.Map<java.lang.String,StringRight[]> getM_TargetInheritedACLRights()
          Gets the internal map of the inherited AclEntry rights, where the default key is the name of the EligibleParty having the rights on the target, extended with, as last component, the parent order of the target parent which has given the rights.
 java.lang.String getResourceType()
          Get resource type, as for exemple "executable" or "file".
 boolean hasTheAccountAndGroupOfParent()
          If there is no parent, return true to avoid useless processing.
 AclEntry selectInheritedAclEntry(AclEntry _acl, java.lang.String _type)
          Returns the AclEntry to use as inherited AclEntry in a child.
 
Methods inherited from interface ARoad0.gBaseInterface.ImmutableBasic
getComment, getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getImpliedViews, getIS_Name, getL_AcsOfSoftReferences, getL_SoftAlias, getPropertyChangeListeners, getSerialVersionUID, getVirtualFolders
 
Methods inherited from interface ARoad0.gBaseInterface.Copyable
copy
 
Methods inherited from interface ARoad0.gBaseInterface.ImmutablePrivilegeTarget
getEorImmutableL_TargetInheritedLinkedPrivileges, getEorL_TargetPrivilegeForLinks, getEorL_TargetPrivilegeForTypes, getEorL_TargetPrivileges, getM_TargetInheritedLinkedPRIRights, getType, selectInheritedPrivilege
 
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

getL_AcsControllers

ImmutableName[] getL_AcsControllers()
Gets the open ACS that manages an external AclEntry or Linked Privilege for this resource. The resource ACS forbids to have both external ACL and external privilege.

Returns:
the open ACS controller names. May be null, never empty nor with null items.

getEorUserID

ImmutableUserID getEorUserID()
Get the userID, following the AGO rights.

Returns:
owns this resource, in the main ACS. May be null.

getL_ownerRights

StringRight[] getL_ownerRights()
Get the rights of the resource owner.

Returns:
array of positive access rights for the UserID which owns this resource, in the main ACS. May be empty, but not null.

getEorGroupID

ImmutableGroupID getEorGroupID()
Returns:
primary group which owns this resource, in the main ACS. May be null.

getL_groupRights

StringRight[] getL_groupRights()
Get the rights of the resource group.

Returns:
array of positive access rights for the GroupID which owns this resource, in the main ACS. May be empty, but not null.

getL_rootRights

StringRight[] getL_rootRights()
Get the rights of the root, following AGO rights concept.

Returns:
array of access rights for the root UserID, in the main ACS, following the Unix/Linux scheme. May be empty, but not null.

getResourceType

java.lang.String getResourceType()
Get resource type, as for exemple "executable" or "file".

Returns:
String of resource type.

getL_aclEntry

AclEntry[] getL_aclEntry()
Get the list where each AclEntry delivers rights to an EligibleParty to access or to deny access to this Resource.

Returns:
the AclEntry list. May be null.

containsAclEntryToEP

boolean containsAclEntryToEP(EligibleParty _ep)
True if an EligibleParty is associated to the resource through an AclEntry.

Parameters:
_ep - to test. May be null.
Returns:
true if _ep is referenced in at least one aclEntry in this resource.

hasTheAccountAndGroupOfParent

boolean hasTheAccountAndGroupOfParent()
If there is no parent, return true to avoid useless processing.

Returns:
true if this instance has the same userID and main group than its direct parent.

getAGOAccessFromTheParentAccount

boolean getAGOAccessFromTheParentAccount()
Returns:
true if the parent authorizes its userID to have access to this instance.

getAGOAccessFromTheParentGroup

boolean getAGOAccessFromTheParentGroup()
Returns:
true if the parent authorizes its groupID to have access to this instance.

getEorL_EPthroughAclEntry

java.util.Set getEorL_EPthroughAclEntry()
Get all the EligibleParty associated to the resource through at least one AclEntry.

Returns:
EligibleParties, through external object references. May be empty.

getActorActivated

boolean getActorActivated()
Returns:
boolean true if this resource is an actor.

getL_inheritedOwnerRights

StringRight[] getL_inheritedOwnerRights()
Get the inherited rights from the parent of the resource owner.

Returns:
an array of access rights for the UserID which owns this resource, in the main ACS. May be empty but not null.

getL_inheritedGroupRights

StringRight[] getL_inheritedGroupRights()
Get the inherited rights from the parent of the resource group.

Returns:
an array of access rights for the GroupID which contains this resource, in the main ACS. May be empty but not null.

getEorImmutableL_TargetInheritedAclEntries

java.util.List<AclEntry> getEorImmutableL_TargetInheritedAclEntries()
Gets all the immutable list of the inherited AclEntries 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 AclEntries. May be empty or null.

getM_TargetInheritedACLRights

java.util.Map<java.lang.String,StringRight[]> getM_TargetInheritedACLRights()
Gets the internal map of the inherited AclEntry rights, where the default key is the name of the EligibleParty having the rights on the target, extended with, as last component, the parent order of the target 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. A subclass may use the constructor TreeMap(Comparator comparator) to set an ordering other than the natural ordering of the keys. The map value is always a non-null StringRight array of inherited rights, and it may be empty. Called for the gWork consumers, but only in the AcsAddons implementing the ACL inheritance. An AcsAddon may choose to not use this property.

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

selectInheritedAclEntry

AclEntry selectInheritedAclEntry(AclEntry _acl,
                                 java.lang.String _type)
Returns the AclEntry to use as inherited AclEntry in a child. Empty method which has to be overridden by any AcsAddon handling the ACL inheritance.

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

getM_ConstrainedChildACS

java.util.Map<java.lang.String,ImmutableName[]> getM_ConstrainedChildACS()
A constrained (opened or closed) child ACS has one or several of the following relations to this Resource:

, or .

Each relation is associated to a key with the same name.

Returns:
a map of 3 ACS name lists for the 3 keys , and . May be empty but never null.