|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectARoad0.gBase.BasicImpl
ARoad0.gBase.ResourceImpl
public class ResourceImpl
This class is responsible for modeling a resource, that is an access target, in an access control system on which it is registered. The resource may have a parent in the resource tree of this ACS. The resource is accessed from EligibleParties (userID, groupID, actor) through AclEntries belonging to this ACS or to another one. The resource has an userID (account) and a groupID (group) in this ACS. It has AG rights for them and for the super-administrator of the ACS. The resource is a PrivilegeTarget for PrivilegeForTypes and PrivilegeForLinks.
Directory may manage container-for-target cascading rights to its Resource children, both for the Account/Group rights, the AclEntry rights and the Privilege rights. But only one of these three inheritances is possible in a given ACS. The generic packages handle fully only the AG inherited rights. For the AcsAddons handling of the AclEntry or the Privilege inherited rights, the generic gBase package provides the basic methods on Resource to set and get the inherited rights. The generic gBase package provides also the handling of the listeners for the two property changes 'InheritedTargetPrivileges' and 'InheritedTargetAclEntries', but without any firing of these changes. The generic gWork package handles these three inherited rights in the access path search. An AcsAddon package, to fully process these two inherited rights, has then only to code how the Directory subclass updates the inherited rights in its children, and to code the LinkRightsImpl subclass for overriding some of the 'ThroughNodesTree' methods which implemente the algorithms for the rights inheritance.
All the rights and the type are constrained by the ACS. If 'immutable' is in the Resource type, the class rejects any updating on the userID, groupID, parent and all the rights. Nonetheless, an AclEntry may be added wihtout any removing. If 'byAcsCreator' is in the type, the same behavior is set, and in addition, the user cannot finalize this instance.
It is a javabean with the following bound properties: 'AclRights', 'UserID', 'GroupID', 'RootRights', 'GroupRights', 'OwnerRights', 'EPsThroughAclEntry', 'AcsControllers', 'FromTheParentAccount', 'FromTheParentGroup', 'InheritedOwnerRights', 'InheritedGroupRights', 'OneTargetTypedPrivilege', 'OneTargetLinkedPrivilege', and from the subclasses in the AcsAddon, 'InheritedTargetPrivileges', 'InheritedTargetAclEntries'. 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 'set' method, and a dialog box is displayed to inform the user.
This class has several subclasses in this package and in the AcsAddon packages. Most of the variables are protected.
Field Summary | |
---|---|
protected boolean |
actorActivated_
Protected variables |
static ResourceImpl |
EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for temporary values. |
protected GroupID |
groupID_
|
protected AclEntry[] |
l_aclEntry_
|
protected StringRight[] |
l_groupRights_
|
protected java.util.ArrayList<AclEntry> |
l_inheritedT_AclEntries_
List of the current inherited AclEntry. |
protected ImmutableName[] |
l_OpenAcsControllerNames_
Array of ACS that control this resource through external AclEntries or external LINKED_FOR_ONE_TO_ONE privileges. |
protected StringRight[] |
l_ownerRights_
|
protected boolean[] |
l_parentTreeAGRightsAllowToGoAcross_
2 booleans for Account/Group inheritance rights, in this order. |
protected StringRight[] |
l_rootRights_
|
protected java.util.Map<java.lang.String,StringRight[]> |
m_inheritedT_ACLRights_
TreeMap of inherited AclEntry rights. by default, it is not displayed to the user in the generic BeanInfo class. |
protected Directory |
parent_
|
static java.io.ObjectStreamField[] |
serialPersistentFields
Properties for the serialization |
private static long |
serialVersionUID__
Private variables |
protected UserID |
userID_
|
Fields inherited from class ARoad0.gBase.BasicImpl |
---|
aCS_, aCS_Name_, aliasHandler_, changeSupport_, comment_, folderMember_, INCREMENT_CAPACITY, INITIAL_CAPACITY, INITIAL_CAPACITY_2, iS_Name_, m_ConstrainedChildACS_, name_, PRIME, privHandler_, type_ |
Constructor Summary | |
---|---|
ResourceImpl()
Default constructor. |
|
ResourceImpl(ImmutableName _name,
ACS _acs,
Directory _parent,
UserID _owner,
java.lang.String _resourceType)
Used by the beamer editor for the ACS resources list, from the 'New' button, and by the gWork.AcsFactory. |
|
ResourceImpl(ImmutableName _name,
ACS _acs,
Directory _parent,
UserID _owner,
java.lang.String _resourceType,
boolean _toRegisterInManager)
Used for the creation of a resource with its type. |
Method Summary | |
---|---|
AclEntry |
addAclEntry(ImmutableACS _aclAcs,
ImmutableEligibleParty _ep,
StringRight[] _l_right,
java.lang.Boolean _positiveRight,
ImmutableGroupID _conditionGroup)
Creates a new AclEntry which delivers rights to an eligible party to access or to deny access to this resource. |
protected void |
addAcsController(Name _ACSname)
Called by addAclEntry() and addEorPrivilegeForLinksToTarget(). |
protected void |
addEorPrivilegeForLinksToTarget(PrivilegeForLinks _priv)
Sets a privilege as applicable to this access target, without right inheritance. |
void |
addEorPrivilegeForTypeToTarget(PrivilegeForType _priv)
Sets a privilege as applicable to this access target. |
void |
addPropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Adds a listener to the bean. |
java.lang.Object |
clone()
Clones without registering of the new object in the ACSs. |
int |
compareTo(java.lang.Object o)
The comparison is based on the name compareTo() method of each resource when they are not equals, except when there is a node. |
boolean |
containsAclEntryToEP(EligibleParty _ep)
Tests if an EligibleParty is associated to the resource through an AclEntry. |
java.lang.Object |
copy(ImmutableName _name,
ACS _acs,
Directory _parent,
java.lang.Boolean _toRegisterInManager)
Provides a copy of the instance with another name. |
protected ResourceImpl |
copyOwnAcl(ResourceImpl _result,
boolean _withoutInternalAcl,
boolean _withoutExternalAcl)
This method provides a copy of the AclEntries, all the AclEntries (see restrictions) or only the external ones. |
protected ResourceImpl |
copyOwnVariables(ResourceImpl _result,
boolean _withoutInternalAcl)
This method provides a copy of the instance variables. |
java.lang.Object |
copyWithoutInternalAcl(ImmutableName _name,
ACS _acs,
Directory _parent,
java.lang.Boolean _toRegisterInManager)
Provides a copy of the instance as Copyable.copy(), but without copying the internal aclEntries. |
boolean |
equals(java.lang.Object _obj)
Does not compare the comment. |
void |
finalizeForBase()
This method removes the resource from the ACS lists (main and controllers), from its parent, its userID and its groupID. |
protected void |
finalizeFromDeserialization()
NO USE. |
protected void |
fireL_inheritedGroupRights(StringRight[] _l_old,
StringRight[] _l_new)
Fires the event 'InheritedGroupRights', from the parent of the resource group. |
protected void |
fireL_inheritedOwnerRights(StringRight[] _l_old,
StringRight[] _l_new)
Fires the event 'InheritedOwnerRights', from the parent of the resource owner. |
boolean |
getActorActivated()
Used by ACS.getEorM_OwnActors(), and by ACSTreeBaseListenerImpl for detecting the case of a wrong actor creation. |
boolean |
getAGOAccessFromTheParentAccount()
Note: the access from the parent userID depends only to the userID rights. |
boolean |
getAGOAccessFromTheParentGroup()
|
ImmutableGroupID |
getEorGroupID()
|
java.util.List<AclEntry> |
getEorImmutableL_TargetInheritedAclEntries()
Gets the immutable list of all the inherited AclEntries of the target. |
java.util.List<PrivilegeForLinks> |
getEorImmutableL_TargetInheritedLinkedPrivileges()
Gets all the immutable list of the inherited linked privileges of the target. |
java.util.Set<ImmutableEligibleParty> |
getEorL_EPthroughAclEntry()
Gets all the EligibleParties associated to the Resource through at least one AclEntry. |
java.util.ArrayList<AclEntry> |
getEorL_TargetInheritedAclEntries()
Gets a reference on all the inherited AclEntries of this target. |
java.util.List<PrivilegeForLinks> |
getEorL_TargetInheritedLinkedPrivileges()
Gets all the inherited linked privileges of this target. |
java.util.List<PrivilegeForLinks> |
getEorL_TargetPrivilegeForLinks()
Gets all the privilegeForLinks linked to this target, not the privilegeForTypes. |
java.util.List<PrivilegeForType> |
getEorL_TargetPrivilegeForTypes()
Gets all the PrivilegeForTypes of this target. |
java.util.List<Privilege> |
getEorL_TargetPrivileges()
Gets all the direct privileges linked to this target, not the inherited ones. |
ImmutableNode |
getEorParent()
Gets the current parent node of the resource |
ImmutableUserID |
getEorUserID()
Get the userID, following the AGO rights. |
AclEntry[] |
getL_aclEntry()
Gets the AclEntries of this resource. |
ImmutableName[] |
getL_AcsControllers()
Gets the open ACS that manages an external AclEntry or Linked Privilege for this resource. |
StringRight[] |
getL_groupRights()
caution: does not take these rights in account if the parent tree does not allow any access while AG rights inheritance is managed. |
StringRight[] |
getL_inheritedGroupRights()
Gets the inherited rights from the parent of the resource group. |
StringRight[] |
getL_inheritedOwnerRights()
Gets the inherited rights from the parent of the resource owner. |
StringRight[] |
getL_ownerRights()
Gets 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,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.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.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String _propertyName)
Returns the change listeners for a property. |
java.lang.String |
getResourceType()
The resource types are generally defined at the ACS level. |
long |
getSerialVersionUID()
For the java serialization. |
int |
hashCode()
|
boolean |
hasTheAccountAndGroupOfParent()
If there is no parent, return true to avoid useless processing. |
protected void |
removeACL(ImmutableACS _aclAcs,
ImmutableEligibleParty _ep,
boolean _positiveRight,
ImmutableGroupID _conditionGroup)
Deletes an inner AclEntry which delivers rights to an EligibleParty to access or to deny access to this Resource. |
void |
removeAclEntry(ImmutableACS _aclAcs,
ImmutableEligibleParty _ep,
boolean _positiveRight,
ImmutableGroupID _conditionGroup)
Deletes an aclEntry which delivers rights to an eligible party to access or to deny access to this resource. |
protected void |
removeAcsController(ImmutableName _ACSname)
Called by removeAclEntry() and removeEorPrivilegeToTarget(). |
protected void |
removeEorGroupID()
Removes the groupID of the resource. |
void |
removeEorPrivilegeToTarget(Privilege _priv)
Unregisters the privilege when it is no more used by this privilege target. |
protected void |
removeEorUserID()
Removes the userID of the resource. |
void |
removePropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Removes a listener to the bean. |
void |
resetInheritedAclEntryRights(AclEntry _acl)
Resets the inherited AclEntry rights after an user edition. |
void |
resetInheritedPrivilegeRights(PrivilegeForLinks _lpri)
Resets the inherited Privilege rights after an user edition. |
AclEntry |
selectInheritedAclEntry(AclEntry _acl,
java.lang.String _type)
Returns the AclEntry to use as inherited AclEntry in a child. |
PrivilegeForLinks |
selectInheritedPrivilege(PrivilegeForLinks _lpri,
java.lang.String _type)
Returns the Privilege to use as inherited Privilege in a child. |
protected void |
setAGOAccessFromTheParentAccount(boolean _b)
Called by DirectoryImpl.setL_ownerRights(). |
protected void |
setAGOAccessFromTheParentGroup(boolean _b)
Called by DirectoryImpl.setL_groupRights(). |
void |
setEorGroupID(ImmutableGroupID _g)
Defines the main group owning this resource as an access target. |
void |
setEorParent(Node _par,
java.lang.Object _caller)
Deprecated. finalizeForBase() uses parent_.removeEorChild() |
void |
setEorUserID(ImmutableUserID _u)
Sets the userID of the resource, and set the current userID in the own actors if it was the previous userID. |
void |
setL_groupRights(StringRight[] _s)
Sets the rights for the members of the groupID which owns this resource. |
void |
setL_ownerRights(StringRight[] _s)
Sets the rights for the account which owns this resource. |
void |
setL_rootRights(StringRight[] _s)
Sets the rights for the userID 'root'. |
void |
setResourceType(java.lang.String _st)
Sets the type which drives the immutablility and the allowed rights of the object. |
java.lang.String |
toString()
Gets the name last component of the instance. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableResource |
---|
getM_ConstrainedChildACS |
Methods inherited from interface ARoad0.gBaseInterface.Basic |
---|
finalizeForUser, setComment |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableBasic |
---|
getComment, getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getImpliedViews, getIS_Name, getL_AcsOfSoftReferences, getL_SoftAlias, getVirtualFolders |
Methods inherited from interface ARoad0.gBaseInterface.ImmutablePrivilegeTarget |
---|
getType |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableTarget |
---|
getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getL_AcsOfSoftReferences, getL_SoftAlias |
Methods inherited from interface ARoad0.gBaseInterface.ACSObject |
---|
getAcsName, getEorACS |
Methods inherited from interface ARoad0.gBaseInterface.BaseObject |
---|
getFullName, getName, getNickName |
Field Detail |
---|
protected boolean actorActivated_
protected StringRight[] l_rootRights_
protected StringRight[] l_groupRights_
protected StringRight[] l_ownerRights_
protected UserID userID_
protected GroupID groupID_
protected Directory parent_
protected boolean[] l_parentTreeAGRightsAllowToGoAcross_
private static final long serialVersionUID__
protected AclEntry[] l_aclEntry_
protected java.util.Map<java.lang.String,StringRight[]> m_inheritedT_ACLRights_
protected java.util.ArrayList<AclEntry> l_inheritedT_AclEntries_
protected ImmutableName[] l_OpenAcsControllerNames_
public static final ResourceImpl EMPTY_INSTANCE
public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail |
---|
public ResourceImpl()
public ResourceImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType) throws CreateError
_name
- ImmutableName of the resource_acs
- main ACS of the resource_parent
- of the resource; may be null._owner
- owns the resource; may be null._resourceType
- is the resource type which drives the rights and the immutability
of the instance. If null, the value is set to "<undefined>".
CreateError
- if ACSImpl.newEorResource() throws it;
the instance has then to be deleted !public ResourceImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType, boolean _toRegisterInManager) throws CreateError
_name
- non-null ImmutableName of the resource to create_acs
- main ACS of the resource to create_parent
- has the resource as child; may be null or immutable._owner
- owns the resource; if null, the parent account is used if any._resourceType
- is the resource type which drives the rights and the immutability
of the instance. If null, the value is set to "<undefined>"._toRegisterInManager
- false if this method must not register
the instance in its ACS.
CreateError
- if ACSImpl.newEorResource() throws it, if
_parent is not a DirectoryImpl or does not allow an adding of child,
if the parent type is '<byAcsCreator> fffff',
if the resource has a strong type but is not under the right parent -
the instance has then to be deleted! - or if _bridgeRef does not belong to another ACS
- the new instance is then finalized before the exception is thrown.Method Detail |
---|
public java.lang.Object copy(ImmutableName _name, ACS _acs, Directory _parent, java.lang.Boolean _toRegisterInManager) throws CreateError
For aclEntries, if _result ACS is not this resource ACS, and if the aclEntry ACS is this resource ACS, sets _result ACS as the aclEntry ACS of the copied acl. Caution: does not copy an aclEntry if:
- _acs is not this resource ACS,
- the acl eligible party ACS is this resource ACS,
- and there is no matched EligibleParty (with the same last components) in _acs
Calls copyOwnVariables(). This method is overridden by the subclasses.
copy
in interface Copyable
copy
in class BasicImpl
_name
- copy name. Usually creates as an extension of _parent name._acs
- main ACS of the copy to create. May not be the ACS of this instance._parent
- DirectoryImpl which belongs to _acs and will have the copy.
May be null._toRegisterInManager
- false if this method must not register
the instance in the ACS.
CreateError
- of the constructor with the same parameters,
or if _parent ACS is not _acs, or addAclEntry() exceptions.public java.lang.Object copyWithoutInternalAcl(ImmutableName _name, ACS _acs, Directory _parent, java.lang.Boolean _toRegisterInManager) throws CreateError
copyWithoutInternalAcl
in interface Resource
_name
- copy name. Usually creates as an extension of _parent name._acs
- main ACS of the copy to create. May not be the ACS of this instance._parent
- is not used, wathever the value._toRegisterInManager
- false if this method must not register
the instance in the ACS.
CreateError
- of the constructor with the same parameters,
or if _parent ACS is not _acs, or addAclEntry() exceptions.public final void setEorParent(Node _par, java.lang.Object _caller) throws BaseError
_par
- is the new parent of this leaf, as an external
object reference. The new parent is updated. May be null._caller
- of this method; if it is the parent or this instance, the
parent is not updated
BaseError
- if the parent is not own by the same acs, or
InternalError if parent.setEorL_Children() throws a BaseError, or
if it is immutable for its parent.public final ImmutableNode getEorParent()
getEorParent
in interface ImmutableLeaf
public ImmutableName[] getL_AcsControllers()
getL_AcsControllers
in interface ImmutableResource
public void setEorUserID(ImmutableUserID _u) throws UpDateError
setEorUserID
in interface Resource
_u
- owns this resource, in the main ACS. May be null.
UpDateError
- if _u does not belong to this resource main ACS, or
if it is immutable for its userID.public ImmutableUserID getEorUserID()
ImmutableResource
getEorUserID
in interface ImmutableResource
public void setL_ownerRights(StringRight[] _s) throws UpDateError
setL_ownerRights
in interface Resource
_s
- array of acsrights and/or metarights. May be null.
UpDateError
- if the owner rights are immutable,
if there are more than 20 increasing chains to analyze from one lesser right.public final StringRight[] getL_ownerRights()
getL_ownerRights
in interface ImmutableResource
public void setEorGroupID(ImmutableGroupID _g) throws UpDateError
setEorGroupID
in interface Resource
_g
- GroupID which owns this resource, in the main ACS. May be null.
UpDateError
- if _g does not belong to the main ACS
of this resource, or if it is immutable for its groupID.public ImmutableGroupID getEorGroupID()
getEorGroupID
in interface ImmutableResource
public void setL_groupRights(StringRight[] _s) throws UpDateError
setL_groupRights
in interface Resource
_s
- array of acsrights and/or metarights. May be null.
UpDateError
- if the group rights are immutable,
or if there are more than 20 increasing chains to analyze from one lesser right.public final StringRight[] getL_groupRights()
getL_groupRights
in interface ImmutableResource
public final boolean hasTheAccountAndGroupOfParent()
hasTheAccountAndGroupOfParent
in interface ImmutableResource
public boolean getAGOAccessFromTheParentAccount()
getAGOAccessFromTheParentAccount
in interface ImmutableResource
public boolean getAGOAccessFromTheParentGroup()
getAGOAccessFromTheParentGroup
in interface ImmutableResource
public StringRight[] getL_inheritedOwnerRights()
getL_inheritedOwnerRights
in interface ImmutableResource
public StringRight[] getL_inheritedGroupRights()
getL_inheritedGroupRights
in interface ImmutableResource
public void setL_rootRights(StringRight[] _s) throws UpDateError
setL_rootRights
in interface Resource
_s
- array of acsrights and/or metarights. May be null.
UpDateError
- if the root rights are immutable.public final StringRight[] getL_rootRights()
ImmutableResource
getL_rootRights
in interface ImmutableResource
public void setResourceType(java.lang.String _st) throws UpDateError
setResourceType
in interface Resource
_st
- type of the resource.
UpDateError
- if the type is null, starts with public java.lang.String getResourceType()
getResourceType
in interface ImmutableResource
public AclEntry addAclEntry(ImmutableACS _aclAcs, ImmutableEligibleParty _ep, StringRight[] _l_right, java.lang.Boolean _positiveRight, ImmutableGroupID _conditionGroup) throws CreateError
The control of the ACS policy is done in the AclEntry constructor and the ACS. For the creation of the ACL by the user, if there is no rights to select, BaseObjectHandler.setRestrictedSelectedArguments() sets an array with a null object as first value, and this method produces an exception. On the other hand, an association may use a null value for the rights array, and this is allowed to create an ACL without rights. There is an error mesage to the user if the resource or the EP is immutable. The creation of the inherited AclEntry in a child is not handled by the generic gBase package, while the rights updating of the inherited AclEntry is handled by the generic classes AclEntryImpl, ResourceImpl and DirectoryImpl. The sequence of calls from this method is the following:
- new AclEntryImpl,
- ACS.newAclEntry(),
- EligibleParty.addEorAclEntryToEP(),
- updating of l_aclEntry_,
- addAcsController(),
- firePropertyChange().
'AclRights' and 'EPsThroughAclEntry' are bound properties. The 'AclRights' event sends some copies of the old and the new array of AclEntry. 'AclRights' must be also the bound property name of the rights in AclEntryImpl, to allow the work of GUI1 classes, and the sended values are then a StringRight array. 'AclRights' is listen by every gWork.RightsMediatorImpl where the view depends on the AclEntries of this resource.
addAclEntry
in interface Resource
_aclAcs
- ImmutableACS which owns the new AclEntry, and to be recorded
as an ACS controller of this resource if it is not its main ACS._ep
- EligibleParty connected to the resource through a new aclEntry.
It has to not be immutable, but may be created by the program._l_right
- is an array of positive or negative rights of _ep on this resource
(that is, if READ is a right, _ep can read on the resource). May be null._positiveRight
- is true if the rights are set to authorize (grant),
and false if they are set to forbid (deny)._conditionGroup
- first condition group. May be null.
java.lang.InternalError
- if this resource has a null name or a null ACS,
or if _ep is not an EligiblePartyImpl nor an ActorImpl.
CreateError
- if _ep or _aclAcs is null, or if _ep is already recorded
in this resource with the same ACS, or thrown by the AclEntry constructor or
ACS.newEorAclEntry().public void removeAclEntry(ImmutableACS _aclAcs, ImmutableEligibleParty _ep, boolean _positiveRight, ImmutableGroupID _conditionGroup) throws UpDateError
removeAclEntry
in interface Resource
_aclAcs
- ImmutableACS which owns the AclEntry, and is recorded
as an ACS controller of this resource._ep
- eligible party connected to the resource through an AclEntry._positiveRight
- is true if the rights are oriented to authorize,
and false if they are oriented to forbid._conditionGroup
- first condition group. May be null.
UpDateError
- if _ep is null, unknown, if _aclAcs is closed or unknown,
or if the type does not allow this operation.public final AclEntry[] getL_aclEntry()
getL_aclEntry
in interface ImmutableResource
public boolean containsAclEntryToEP(EligibleParty _ep)
containsAclEntryToEP
in interface ImmutableResource
_ep
- EligibleParty to test. May be null.
public java.util.Set<ImmutableEligibleParty> getEorL_EPthroughAclEntry()
getEorL_EPthroughAclEntry
in interface ImmutableResource
public java.util.List<PrivilegeForLinks> getEorL_TargetPrivilegeForLinks()
getEorL_TargetPrivilegeForLinks
in interface ImmutablePrivilegeTarget
public java.util.List<PrivilegeForType> getEorL_TargetPrivilegeForTypes()
getEorL_TargetPrivilegeForTypes
in interface ImmutablePrivilegeTarget
public java.util.List<Privilege> getEorL_TargetPrivileges()
- 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.
getEorL_TargetPrivileges
in interface ImmutablePrivilegeTarget
public void addEorPrivilegeForTypeToTarget(PrivilegeForType _priv) throws BaseError
addEorPrivilegeForTypeToTarget
in interface PrivilegeTarget
_priv
- to register in the target
BaseError
- if this instance is not a privilege target,
if the privilege second type is not authorized for this target.public void removeEorPrivilegeToTarget(Privilege _priv) throws BaseError
removeEorPrivilegeToTarget
in interface PrivilegeTarget
_priv
- to remove
BaseError
- if the privilege or this source is unknown, or from removeAcsController().public java.util.List<PrivilegeForLinks> getEorImmutableL_TargetInheritedLinkedPrivileges()
getEorImmutableL_TargetInheritedLinkedPrivileges
in interface ImmutablePrivilegeTarget
public java.util.Map<java.lang.String,StringRight[]> getM_TargetInheritedLinkedPRIRights()
getM_TargetInheritedLinkedPRIRights
in interface ImmutablePrivilegeTarget
public java.util.List<AclEntry> getEorImmutableL_TargetInheritedAclEntries()
getEorImmutableL_TargetInheritedAclEntries
in interface ImmutableResource
getEorL_TargetInheritedAclEntries()
public java.util.Map<java.lang.String,StringRight[]> getM_TargetInheritedACLRights()
getM_TargetInheritedACLRights
in interface ImmutableResource
public boolean getActorActivated()
getActorActivated
in interface ImmutableResource
public void addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
addPropertyChangeListener
in interface BaseBeanManager
addPropertyChangeListener
in interface BoundBean
addPropertyChangeListener
in class BasicImpl
_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.public void removePropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
removePropertyChangeListener
in interface BaseBeanManager
removePropertyChangeListener
in interface BoundBean
removePropertyChangeListener
in class BasicImpl
_propertyName
- String is the name of the property_l
- PropertyChangeListener to removepublic java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String _propertyName)
getPropertyChangeListeners
in interface ImmutableBasic
getPropertyChangeListeners
in class BasicImpl
_propertyName
- name of the listened property.
public java.lang.Object clone()
clone
in class BasicImpl
java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object _obj)
equals
in interface BaseObject
equals
in class BasicImpl
_obj
-
public int hashCode()
hashCode
in interface BaseObject
hashCode
in class BasicImpl
public long getSerialVersionUID()
BasicImpl
getSerialVersionUID
in interface ImmutableBasic
getSerialVersionUID
in class BasicImpl
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface ImmutableLeaf
compareTo
in interface java.lang.Comparable
compareTo
in class BasicImpl
o
- Object to compare must be an ImmutableResource
java.lang.ClassCastException
- - if the specified object's type
prevents it from being compared to this current Objectpublic void finalizeForBase() throws UpDateError
finalizeForBase
in interface FinalizedObject
finalizeForBase
in class BasicImpl
UpDateError
- if the main ACS do not known the resource (if
it is a clone without setName(), typically)public java.lang.String toString()
toString
in class BasicImpl
public void resetInheritedAclEntryRights(AclEntry _acl)
resetInheritedAclEntryRights
in interface Resource
_acl
- inherited AclEntry with updated rights. Never null.public AclEntry selectInheritedAclEntry(AclEntry _acl, java.lang.String _type)
selectInheritedAclEntry
in interface ImmutableResource
_acl
- the initial AclEntry which may be given to the child_type
- type of a child, as Resource
public void resetInheritedPrivilegeRights(PrivilegeForLinks _lpri)
resetInheritedPrivilegeRights
in interface Resource
_lpri
- inherited Privilege with updated rights. Never null.public PrivilegeForLinks selectInheritedPrivilege(PrivilegeForLinks _lpri, java.lang.String _type)
selectInheritedPrivilege
in interface ImmutablePrivilegeTarget
selectInheritedPrivilege
in interface Resource
_lpri
- the initial Privilege which may be given to the child_type
- type of a child, as Resource
public java.util.ArrayList<AclEntry> getEorL_TargetInheritedAclEntries()
getEorImmutableL_TargetInheritedAclEntries()
public java.util.List<PrivilegeForLinks> getEorL_TargetInheritedLinkedPrivileges()
getEorL_TargetInheritedLinkedPrivileges()
protected void setAGOAccessFromTheParentAccount(boolean _b)
_b
- true if the parent authorizes its userID to have access to this instance.protected void setAGOAccessFromTheParentGroup(boolean _b)
_b
- true if the parent authorizes its groupID to have access to this instance.protected final void fireL_inheritedOwnerRights(StringRight[] _l_old, StringRight[] _l_new)
_l_old
- an array of the old access rights for the UserID which owns this resource,
in the main ACS. May be empty._l_new
- an array of the new access rights for the UserID which owns this resource,
in the main ACS. May be empty.protected final void fireL_inheritedGroupRights(StringRight[] _l_old, StringRight[] _l_new)
_l_old
- an array of the old access rights for the UserID which owns this resource,
in the main ACS. May be empty._l_new
- an array of the new access rights for the UserID which owns this resource,
in the main ACS. May be empty.protected ResourceImpl copyOwnVariables(ResourceImpl _result, boolean _withoutInternalAcl) throws CreateError
For AclEntries, if _result ACS is not this resource ACS, and if the AclEntry ACS is this resource ACS, sets _result ACS as the AclEntry ACS of the copied ACL. Caution: does not copy an aclEntry if: - _result ACS is not this resource ACS, - the eligible party ACS is this resource ACS, - and there is no matched EligibleParty (with the same last components) in the _result ACS
_result
- to update with this instance variables copies_withoutInternalAcl
- true if the internal aclEntries
- that is with a resource having the same ACS - must not be copied
CreateError
- of addAclEntry()protected ResourceImpl copyOwnAcl(ResourceImpl _result, boolean _withoutInternalAcl, boolean _withoutExternalAcl) throws CreateError
_result
- to update with this instance AclEntries copies_withoutInternalAcl
- true if the internal aclEntries
- that is with a resource having the same ACS - must not be copied_withoutExternalAcl
- true if the internal aclEntries
- that is with a resource having the same ACS - must not be copied
CreateError
- of addAclEntry()protected void removeEorUserID() throws UpDateError
UpDateError
protected void removeEorGroupID() throws UpDateError
UpDateError
protected final void removeACL(ImmutableACS _aclAcs, ImmutableEligibleParty _ep, boolean _positiveRight, ImmutableGroupID _conditionGroup) throws UpDateError
_aclAcs
- ImmutableACS which owns the AclEntry, and is recorded
as an ACS controller of this resource._ep
- eligible party connected to the resource through an AclEntry.
This method unrecords the relevant aclEntry in _ep, in this resource,
and in the relevant ACS. The ACS of the aclEntry may be unrecorded in this
resource if there are no other aclEntry owned by this ACS in this resource._positiveRight
- is true if the rights are oriented to authorize,
and false if they are oriented to forbid._conditionGroup
- first condition group. May be null.
UpDateError
- if _ep is null, unknown, or if _aclAcs is closed or unknown.protected void finalizeFromDeserialization()
finalizeFromDeserialization
in class BasicImpl
protected void addAcsController(Name _ACSname) throws CreateError
_ACSname
- open ACS which controls this resource. No exception if it is
already known.
CreateError
- if the Name is null, the ACS is closed, or if
it is the main ACS of this resource.protected void removeAcsController(ImmutableName _ACSname) throws UpDateError
_ACSname
- open ACS that controls this resource.
UpDateError
- if _ACSname is null or unknown.protected void addEorPrivilegeForLinksToTarget(PrivilegeForLinks _priv) throws BaseError
_priv
- to register in the target
BaseError
- if this instance is not a privilege target,
if the privilege second type is not authorized for this target, or
from addAcsController().
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |