|
||||||||||
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
ARoad0.AcsAddon.Accbee.Ubuntu.gBase.ExecutableUbuntuImpl
public class ExecutableUbuntuImpl
This class is responsible for modeling a Linux Ubuntu executable, which may have Linux/Unix setUID and setGID capabilities. To be more general, the changing capability is modelized, with EnforceGID and EnforceUID. As every actor, it implements EligibleParty to have rights on resources through aclEntries. It uses an embedded instance of CAgoUserImplUbuntu to handle the AGO 'Other' rights and sticky bit in a Linux/Unix operating system. This class is declared in the ACS vocabulory by the key ACSFactoryUtilityImpl.ACSADDON_EXTENSION_CLASSES.
It is a javabean with the following bound properties: 'EnforceUID', 'EnforceGID'. 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. All variables are protected. This class has no subclass in this package.
Field Summary | |
---|---|
static ExecutableUbuntuImpl |
EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for temporary values. |
protected boolean |
EnforceGID_
|
protected boolean |
EnforceUID_
|
protected java.lang.String |
exeType_
|
static java.io.ObjectStreamField[] |
serialPersistentFields
variable for the JDK 2 serialization |
private static long |
serialVersionUID__
|
Fields inherited from class ARoad0.AcsAddon.Accbee.Ubuntu.gBase.ActorUbuntuImpl |
---|
agoHandler_ |
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 | |
---|---|
ExecutableUbuntuImpl()
|
|
ExecutableUbuntuImpl(ImmutableName _name,
ACS _acs,
Directory _parent,
UserID _owner,
java.lang.String _resourceType,
ImmutableActor _bridgeRef)
Used by the beamer editor for the ACS resources list, from the 'New' button, and by the gWork.AcsFactoryUbuntu. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Adds a listener to the bean. |
java.lang.Object |
clone()
Clones without register the new object in the ACSs. |
java.lang.Object |
copy(ImmutableName _name,
ACS _acs,
Directory _parent,
java.lang.Boolean _toRegisterInManager)
UNUSED. |
protected ExecutableUbuntuImpl |
copyOwnVariables(ExecutableUbuntuImpl _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)
UNUSED. |
boolean |
equals(java.lang.Object _obj)
Does not compare the comment. |
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 view rights of an ACSObject in an ACS Addon. |
boolean |
getEnforceGID()
|
boolean |
getEnforceUID()
|
java.lang.String |
getExeType()
|
long |
getSerialVersionUID()
For the java serialization. |
int |
hashCode()
|
void |
removePropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Removes a listener to the bean. |
void |
setEnforceGID(boolean _b)
Noop if the resource type contains 'byAcsCreator' or 'immutable'. |
void |
setEnforceUID(boolean _b)
Noop if the resource type contains 'byAcsCreator' or 'immutable'. |
void |
setEorCurrentGroupIDForUser(ImmutableGroupID _g)
Check getEnforceGID() then call the super method. |
void |
setEorCurrentUserIDForUser(ImmutableUserID _u)
Checks getEnforceUID() then calls the super method. |
void |
setExeType(java.lang.String _p)
Fire an event 'ExeType'. |
java.lang.String |
toString()
Gets the name last component of the instance. |
Methods inherited from class ARoad0.AcsAddon.Accbee.Ubuntu.gBase.ActorUbuntuImpl |
---|
addPropertyChangeListener, copyOwnVariables, finalizeForBase, fireL_inheritedOtherRights, getAGOAccessFromTheParentOther, getL_inheritedGroupRights, getL_inheritedOtherRights, getL_otherRights, removePropertyChangeListener, setAGOAccessFromTheParentOther, setEorUserID, setIsRightProxy, setL_groupRights, setL_otherRights |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ARoad0.AcsAddon.Accbee.Ubuntu.gBaseInterface.ResourceUbuntu |
---|
fireL_inheritedOtherRights, getAGOAccessFromTheParentOther, getL_inheritedGroupRights, getL_inheritedOtherRights, getL_otherRights, setAGOAccessFromTheParentOther, setL_otherRights |
Methods inherited from interface ARoad0.gBaseInterface.Actor |
---|
setEorACSBridgeTarget, setEorL_SecondaryGroupForUser, setIsRightProxy |
Methods inherited from interface ARoad0.gBaseInterface.Resource |
---|
addAclEntry, removeAclEntry, resetInheritedAclEntryRights, resetInheritedPrivilegeRights, selectInheritedPrivilege, setEorGroupID, setEorUserID, setL_groupRights, setL_ownerRights, setL_rootRights, setResourceType |
Methods inherited from interface ARoad0.gBaseInterface.PrivilegeTarget |
---|
addEorPrivilegeForTypeToTarget, removeEorPrivilegeToTarget |
Methods inherited from interface ARoad0.gBaseInterface.EligibleParty |
---|
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 |
Methods inherited from interface ARoad0.gBaseInterface.BaseBeanManager |
---|
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
private static final long serialVersionUID__
protected boolean EnforceGID_
protected boolean EnforceUID_
protected java.lang.String exeType_
public static final ExecutableUbuntuImpl EMPTY_INSTANCE
public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail |
---|
public ExecutableUbuntuImpl()
public ExecutableUbuntuImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType, ImmutableActor _bridgeRef) 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._bridgeRef
- another-ACS Actor for which this instance is a bridge;
may be null.
CreateError
- see super(_name, _acs, _parent, _actor_name, _bridgeRef) exception.Method Detail |
---|
public java.lang.Object copy(ImmutableName _name, ACS _acs, Directory _parent, java.lang.Boolean _toRegisterInManager) throws CreateError
copy
in interface Copyable
copy
in class ActorUbuntuImpl
_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 EligibleParty
copyWithoutInternalAcl
in interface Resource
copyWithoutInternalAcl
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
- 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 void setExeType(java.lang.String _p)
setExeType
in interface ExecutableUbuntu
_p
- type of executable.
Different to type_ from EP and resourceType from Resource.public final java.lang.String getExeType()
getExeType
in interface ExecutableUbuntu
public void setEnforceUID(boolean _b) throws UpDateError
setEnforceUID
in interface ExecutableUbuntu
_b
- true if the userID is always its userID whatever the
caller userID (this is the setUID bit on *NX systems).
UpDateError
- if the EnforceUID property is immutable.public final boolean getEnforceUID()
getEnforceUID
in interface ExecutableUbuntu
public void setEnforceGID(boolean _b) throws UpDateError
setEnforceGID
in interface ExecutableUbuntu
_b
- true if the userID is always its userID whatever the
caller userID. This is the setUID bit on Linux/Unix systems.
UpDateError
- if the EnforceGID property is immutable.public final boolean getEnforceGID()
getEnforceGID
in interface ExecutableUbuntu
public void setEorCurrentUserIDForUser(ImmutableUserID _u) throws UpDateError
setEorCurrentUserIDForUser
in interface Actor
setEorCurrentUserIDForUser
in class ActorUbuntuImpl
_u
- the current userID of the actor. May be null.
UpDateError
- if getEnforceUID() is true.public void setEorCurrentGroupIDForUser(ImmutableGroupID _g) throws UpDateError
setEorCurrentGroupIDForUser
in interface Actor
setEorCurrentGroupIDForUser
in class ActorUbuntuImpl
_g
- the current groupID of the actor. May be null.
UpDateError
- if getEnforceGID() is true.public void addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
addPropertyChangeListener
in interface BaseBeanManager
addPropertyChangeListener
in interface BoundBean
addPropertyChangeListener
in class ActorUbuntuImpl
_propertyName
- 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 ActorUbuntuImpl
_propertyName
- name of the property_l
- PropertyChangeListener to removepublic long getSerialVersionUID()
BasicImpl
getSerialVersionUID
in interface ImmutableBasic
getSerialVersionUID
in class ActorUbuntuImpl
public java.lang.Object clone()
clone
in class ActorUbuntuImpl
java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object _obj)
ActorUbuntuImpl
equals
in interface BaseObject
equals
in class ActorUbuntuImpl
_obj
- to compare
public int hashCode()
hashCode
in interface BaseObject
hashCode
in class ActorImpl
public java.lang.String toString()
ResourceImpl
toString
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: 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(). Calls the super method first.
getAddonInnerPropertiesToListen
in interface ACSObjectAddon
getAddonInnerPropertiesToListen
in class ActorUbuntuImpl
AcsAddon.getAddonParentPropertiesToListen()
protected ExecutableUbuntuImpl copyOwnVariables(ExecutableUbuntuImpl _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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |