|
||||||||||
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.AcsAddon.Accbee.Ubuntu.gBase.ResourceUbuntuImpl
public class ResourceUbuntuImpl
This class is responsible for modeling a Linux Ubuntu resource. It uses an embedded instance of CAgoUserUbuntuImpl to handle the AGO 'Other' rights and sticky bit in a Linux/Unix operating system. It has an umask from its UserIDUbuntu, to set the default AGO rights. 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 in the 'set' method, and a dialog box is displayed to inform the user. This class has no subclass in this package. All variables are protected.
Field Summary | |
---|---|
protected CAgoUserUbuntuImpl |
agoHandler_
|
static ResourceUbuntuImpl |
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.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 | |
---|---|
ResourceUbuntuImpl()
Default constructor. |
|
ResourceUbuntuImpl(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. |
|
ResourceUbuntuImpl(ImmutableName _name,
ACS _acs,
Directory _parent,
UserID _owner,
java.lang.String _resourceType,
boolean _toRegisterInManager)
Used by the other constructor. |
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 ResourceUbuntuImpl |
copyOwnVariables(ResourceUbuntuImpl _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 PropertyChangeEvent for 'OtherRights' to listen from an ACSObject, because these events may 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 |
setEorUserID(ImmutableUserID _u)
Changes the AGO rights from the _u umask, through the call to setL_xxxRights(). |
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.Resource |
---|
addAclEntry, copyWithoutInternalAcl, removeAclEntry, resetInheritedAclEntryRights, resetInheritedPrivilegeRights, selectInheritedPrivilege, setEorGroupID, setL_ownerRights, setL_rootRights, setResourceType |
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, getPropertyChangeListeners, getVirtualFolders |
Methods inherited from interface ARoad0.gBaseInterface.PrivilegeTarget |
---|
addEorPrivilegeForTypeToTarget, removeEorPrivilegeToTarget |
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.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 ResourceUbuntuImpl EMPTY_INSTANCE
public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail |
---|
public ResourceUbuntuImpl()
public ResourceUbuntuImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType) throws CreateError
_name
- of the resource_acs
- main ACS of the resource_parent
- of the resource; may be null._owner
- owns the resource; may be null._resourceType
- the resource type which drives the rights and the immutability
of the instance. If null, the value is set to "CreateError
- if ACSImpl.newEorResource() throws it;
the instance has then to be deleted !public ResourceUbuntuImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType, boolean _toRegisterInManager) throws CreateError
_name
- of the resource_acs
- main ACS of the resource_parent
- owns the resource; may be null._owner
- owns the resource; may be null._resourceType
- the resource type which drives the rights and the immutability
of the instance. If null, the value is set to "_toRegisterInManager
- false if this method must not register
the instance in its ACS.
CreateError
- if ACSImpl.newEorResource() throws it;
the instance has then to be deleted !BaseUtilityUbuntuImpl.subtractUMask(java.util.Set, ARoad0.gBaseInterface.ImmutableACS, ARoad0.gBaseInterface.ImmutableResource, java.lang.String)
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 ResourceImpl
java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object _obj)
equals
in interface BaseObject
equals
in class ResourceImpl
_obj
-
public void finalizeForBase() throws UpDateError
finalizeForBase
in interface FinalizedObject
finalizeForBase
in class ResourceImpl
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 ResourceImpl
_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 ResourceImpl
_propertyName
- String is the name of the property_l
- PropertyChangeListener to removepublic long getSerialVersionUID()
BasicImpl
getSerialVersionUID
in interface ImmutableBasic
getSerialVersionUID
in class ResourceImpl
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: is optional, 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.
When the map value starts with 'ACS', the ACS method to call has the ACSObject as one argument. Otherwise, the ACS or the ACSObject method has no argument. Called by ARoad0.gBase.UtilityImpl.add/removeAddonParentPropertyChangeListener().
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 ResourceImpl
_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.protected ResourceUbuntuImpl copyOwnVariables(ResourceUbuntuImpl _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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |