|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectARoad0.gBase.BasicImpl
ARoad0.gBase.ResourceImpl
ARoad0.gBase.ActorImpl
ARoad0.AcsAddon.Accbee.Ubuntu.gBase.ActorUbuntuImpl
public class ActorUbuntuImpl
This class is responsible for modeling a Linux Ubuntu actor which may have access to controled resources. It uses an embedded instance of CAgoUserUbuntuImpl to handle the AGO 'Other' rights and sticky bit in a Linux/Unix operating system. It is a javabean with the following bound properties: 'OtherRights', 'FromTheParentOther', 'InheritedOtherRights'. 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, and a dialog box is displayed to inform the user.. This class has subclasses in this package. All variables are protected. This class has no subclass in this package.
Field Summary | |
---|---|
protected CAgoUserUbuntuImpl |
agoHandler_
|
static ActorUbuntuImpl |
EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for temporary values. |
static java.io.ObjectStreamField[] |
serialPersistentFields
variable for the JDK 2 serialization |
private static long |
serialVersionUID__
|
Fields inherited from class ARoad0.gBase.ActorImpl |
---|
bridgeTarget_, currentGroupID_, currentUserID_, isRightProxy_, l_bridgeSources_, l_SecondaryGroup_, m_AclEntriesResources_ |
Fields inherited from class ARoad0.gBase.ResourceImpl |
---|
actorActivated_, groupID_, l_aclEntry_, l_groupRights_, l_inheritedT_AclEntries_, l_OpenAcsControllerNames_, l_ownerRights_, l_parentTreeAGRightsAllowToGoAcross_, l_rootRights_, m_inheritedT_ACLRights_, parent_, 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 | |
---|---|
ActorUbuntuImpl()
Default constructor. |
|
ActorUbuntuImpl(ImmutableName _name,
ACS _acs,
Directory _parent,
UserID _owner,
java.lang.String _resourceType,
ImmutableActor _bridgeTarget)
Registers the new instance in the eligible parties map in the main ACS. |
|
ActorUbuntuImpl(ImmutableName _name,
ACS _acs,
Directory _parent,
UserID _owner,
java.lang.String _resourceType,
ImmutableActor _bridgeTarget,
boolean _toRegisterInManager)
Registers the new instance in the eligible parties map in the main ACS. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener _l)
Adds a listener to the bean, for all the bound properties. |
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. |
java.lang.Object |
copy(ImmutableName _name,
ACS _acs,
Directory _parent,
java.lang.Boolean _toRegisterInManager)
This method provides a copy of the instance with another name. |
protected ActorUbuntuImpl |
copyOwnVariables(ActorUbuntuImpl _result,
boolean _withoutInternalAcl)
This method provides a copy of the instance variables. |
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. |
void |
fireL_inheritedOtherRights(StringRight[] _l_old,
StringRight[] _l_new)
Fires the event 'InheritedOtherRights', from the parent of the resource 'other' category. |
java.util.Map<java.lang.String,java.lang.String> |
getAddonInnerPropertiesToListen()
Gets the specific events to listen from an ACSObject, because these events should change the rights of an ACSObject in an ACS Addon. |
boolean |
getAGOAccessFromTheParentOther()
|
StringRight[] |
getL_inheritedGroupRights()
Gets the inherited rights from the parent of the resource group, including the parent sticky bit. |
StringRight[] |
getL_inheritedOtherRights()
Gets the inherited rights from the parent of the resource for 'other' AGO rights. |
StringRight[] |
getL_otherRights()
Gets the access rights for the EligibleParties which are not the UserID or the GroupID owners of this resource, nor the root UserID. |
long |
getSerialVersionUID()
For the java serialization. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener _l)
Removes a listener to the bean, for all the bound properties. |
void |
removePropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Removes a listener to the bean. |
void |
setAGOAccessFromTheParentOther(boolean _b)
Called indirectly by DirectoryUbuntuImpl.setL_otherRights(). |
void |
setEorCurrentGroupIDForUser(ImmutableGroupID _g)
The current groupID is not null when, typically, the actor is an executable launched under an another groupID. |
void |
setEorCurrentUserIDForUser(ImmutableUserID _u)
The current userID is not null when, typically, the actor is an executable launched under an UserID. |
void |
setEorUserID(ImmutableUserID _u)
Changes the AGO rights from the _u umask, through the call to setL_xxxRights(). |
void |
setIsRightProxy(boolean _b)
Noop if the resource type starts with 'byAcsCreator' or 'immutable'. |
void |
setL_groupRights(StringRight[] _s)
Sets the rights for the members of the groupID which contains this resource. |
void |
setL_otherRights(StringRight[] _s)
Sets the rights for the EligibleParties which are not 'root' nor this-resource UserID, and which are not members of this-resource GroupID. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ARoad0.gBaseInterface.Actor |
---|
setEorACSBridgeTarget, setEorL_SecondaryGroupForUser |
Methods inherited from interface ARoad0.gBaseInterface.Resource |
---|
addAclEntry, copyWithoutInternalAcl, removeAclEntry, resetInheritedAclEntryRights, resetInheritedPrivilegeRights, selectInheritedPrivilege, setEorGroupID, setL_ownerRights, setL_rootRights, setResourceType |
Methods inherited from interface ARoad0.gBaseInterface.PrivilegeTarget |
---|
addEorPrivilegeForTypeToTarget, removeEorPrivilegeToTarget |
Methods inherited from interface ARoad0.gBaseInterface.EligibleParty |
---|
copyWithoutInternalAcl, setEPType |
Methods inherited from interface ARoad0.gBaseInterface.Basic |
---|
finalizeForUser, setComment |
Methods inherited from interface ARoad0.gBaseInterface.PrivilegeSource |
---|
addEorPrivilegeForTypeToSource, removeEorPrivilegeToSource |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableActor |
---|
getEorACSBridgeTarget, getEorCurrentGroupID, getEorCurrentUserID, getEorL_bridgeSources, getEorL_SecondaryGroup, getIsACSBridgeSource, getIsRightProxy, isMemberToSecondaryGroup |
Methods inherited from interface ARoad0.gBaseInterface.ImmutablePrivilegeTarget |
---|
getEorImmutableL_TargetInheritedLinkedPrivileges, getEorL_TargetPrivilegeForLinks, getEorL_TargetPrivilegeForTypes, getEorL_TargetPrivileges, getM_TargetInheritedLinkedPRIRights, getType |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableTarget |
---|
getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getL_AcsOfSoftReferences, getL_SoftAlias |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableLeaf |
---|
compareTo, getEorParent |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableEligibleParty |
---|
getEorL_AclConnectedResources, getEPType, getM_ConstrainedChildACS |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableBasic |
---|
getComment, getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getImpliedViews, getIS_Name, getL_AcsOfSoftReferences, getL_SoftAlias, getPropertyChangeListeners, getVirtualFolders |
Methods inherited from interface ARoad0.gBaseInterface.ImmutablePrivilegeSource |
---|
getEorL_SourcePrivilegeForLinks, getEorL_SourcePrivilegeForTypes, getEorL_SourcePrivileges |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableSource |
---|
getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getL_AcsOfSoftReferences, getL_SoftAlias, getType |
Methods inherited from interface ARoad0.gBaseInterface.ACSObject |
---|
getAcsName, getEorACS |
Methods inherited from interface ARoad0.gBaseInterface.BaseObject |
---|
getFullName, getName, getNickName, hashCode |
Field Detail |
---|
private static final long serialVersionUID__
protected CAgoUserUbuntuImpl agoHandler_
public static final ActorUbuntuImpl EMPTY_INSTANCE
public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail |
---|
public ActorUbuntuImpl()
public ActorUbuntuImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType, ImmutableActor _bridgeTarget) throws CreateError
_name
- of the actor as a resource._acs
- main ACS of the actor._parent
- of the actor._owner
- owns the resource; may be null._resourceType
- is also the EP type, and may be null if the ACS allows it._bridgeTarget
- another-ACS Actor for which this instance is a bridge source;
may be null.
CreateError:
- this(_name, _acs, _parent, _actor_name, _bridgeRef, false).
CreateError
public ActorUbuntuImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType, ImmutableActor _bridgeTarget, boolean _toRegisterInManager) throws CreateError
_name
- of the actor as a resource._acs
- ACSUbuntuImpl of the actor._parent
- the actor parent._owner
- owns the resource; may be null._resourceType
- is also the EP type, and may be null if the ACS allows it._bridgeTarget
- another-ACS Actor for which this instance is a bridge source;
may be null._toRegisterInManager
- false if this method must not register
the instance in its ACS.
CreateError:
- this(_name, _acs, _parent, _actor_name, _bridgeRef, false).
CreateError
Method Detail |
---|
public void setEorUserID(ImmutableUserID _u) throws UpDateError
setEorUserID
in interface Resource
setEorUserID
in class ResourceImpl
_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 void setL_groupRights(StringRight[] _s) throws UpDateError
setL_groupRights
in interface Resource
setL_groupRights
in class ResourceImpl
_s
- array of acsrights and/or metarights. May be null.
UpDateError
- if the new rights contain a 'delete' or 'rename' right,
while its parent does not allow it through its deleting-renaming flag.public final StringRight[] getL_otherRights()
getL_otherRights
in interface ResourceUbuntu
public void setL_otherRights(StringRight[] _s) throws UpDateError
setL_otherRights
in interface ResourceUbuntu
_s
- array of acsrights and/or metarights. May be null.
UpDateError
- if the other rights are immutable,
or if there are more than 20 increasing chains to analyze from one lesser right, or
if the new rights contain a 'delete' or 'rename' right,
while its parent does not allow it through its deleting-renaming flag.public StringRight[] getL_inheritedGroupRights()
getL_inheritedGroupRights
in interface ResourceUbuntu
getL_inheritedGroupRights
in interface ImmutableResource
getL_inheritedGroupRights
in class ResourceImpl
public StringRight[] getL_inheritedOtherRights()
getL_inheritedOtherRights
in interface ResourceUbuntu
public boolean getAGOAccessFromTheParentOther()
getAGOAccessFromTheParentOther
in interface ResourceUbuntu
public java.lang.Object clone()
clone
in class ActorImpl
java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object _obj)
equals
in interface BaseObject
equals
in class ActorImpl
_obj
-
public void finalizeForBase() throws UpDateError
finalizeForBase
in interface FinalizedObject
finalizeForBase
in class ActorImpl
UpDateError
- if the main ACS do not known the resource (if
it is a clone without setName(), typically)public void addPropertyChangeListener(java.beans.PropertyChangeListener _l)
addPropertyChangeListener
in interface BaseBeanManager
addPropertyChangeListener
in interface BoundBean
addPropertyChangeListener
in class BasicImpl
_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 addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
addPropertyChangeListener
in interface BaseBeanManager
addPropertyChangeListener
in interface BoundBean
addPropertyChangeListener
in class ActorImpl
_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.beans.PropertyChangeListener _l)
removePropertyChangeListener
in interface BaseBeanManager
removePropertyChangeListener
in interface BoundBean
removePropertyChangeListener
in class BasicImpl
_l
- PropertyChangeListener to removepublic void removePropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
removePropertyChangeListener
in interface BaseBeanManager
removePropertyChangeListener
in interface BoundBean
removePropertyChangeListener
in class ActorImpl
_propertyName
- String is the name of the property_l
- PropertyChangeListener to removepublic long getSerialVersionUID()
BasicImpl
getSerialVersionUID
in interface ImmutableBasic
getSerialVersionUID
in class ActorImpl
public java.util.Map<java.lang.String,java.lang.String> getAddonInnerPropertiesToListen()
- 'THIS' to say that the single object to listen is the ACSObject,
- 'ACS.method_name' to say that the list of objects to listen is returned by the method 'method_name' in the Addon ACS class.
For each map key, the values have the following format:
'AAA.method_name IF BBB'
where:
- AAA: THIS (mandatory),
- method_name: 'get' method name of the ACSObject that is associated, in the relevant BeanInfo class, to the event to listen (mandatory)
- IF BBB: where BBB is TRUE, or FALSE, or NULL, or NOT-NULL, to say that the event must be listened if and only if the returned value of the method_name is respectively a boolean TRUE, or FALSE, or an object NULL, or NOT-NULL (option).
When the map value starts with 'ACS', the ACS method to call has the ACSObject has one argument. Otherwise, the ACS or the ACSObject method has no argument. Called by ARoad0.gBase.EPRViewInBaseImpl, NoThanViewInBaseImpl and ARoad0.gWork.RightsMediatorImpl, through ARoad0.gBase.UtilityImpl.changeAddonInnerPropertyChangeListener().
getAddonInnerPropertiesToListen
in interface ACSObjectAddon
AcsAddon.getAddonParentPropertiesToListen()
public void setAGOAccessFromTheParentOther(boolean _b)
setAGOAccessFromTheParentOther
in interface ResourceUbuntu
_b
- true if the parent authorizes its 'other' AGO category
to have access to this instance.public final void fireL_inheritedOtherRights(StringRight[] _l_old, StringRight[] _l_new)
fireL_inheritedOtherRights
in interface ResourceUbuntu
_l_old
- an array of the old access rights for the 'other' AGO category,
in the main ACS. May be empty._l_new
- an array of the new access rights for the 'other' AGO category,
in the main ACS. May be empty.public java.lang.Object copy(ImmutableName _name, ACS _acs, Directory _parent, java.lang.Boolean _toRegisterInManager) throws CreateError
copy
in interface Copyable
copy
in class ActorImpl
_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.protected ActorUbuntuImpl copyOwnVariables(ActorUbuntuImpl _result, boolean _withoutInternalAcl) throws CreateError
_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()public void setEorCurrentUserIDForUser(ImmutableUserID _u) throws UpDateError
setEorCurrentUserIDForUser
in interface Actor
setEorCurrentUserIDForUser
in class ActorImpl
_u
- the current userID of the actor. May be null.
UpDateError
- if the resource type starts with 'byAcsCreator' or 'immutable',
or from setEorCurrentUserID().public void setEorCurrentGroupIDForUser(ImmutableGroupID _g) throws UpDateError
setEorCurrentGroupIDForUser
in interface Actor
setEorCurrentGroupIDForUser
in class ActorImpl
_g
- the current groupID of the actor. May be null.
UpDateError
- if the current GroupID is immutable.public void setIsRightProxy(boolean _b) throws UpDateError
setIsRightProxy
in interface Actor
setIsRightProxy
in class ActorImpl
_b
- true if this Actor may be a proxy in the access paths, that is,
as rights user, it gets some rights to the other
rights users which have an 'execute' right on it
UpDateError
- if the right proxy flag is immutable.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |