|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectARoad0.gBase.BasicImpl
ARoad0.gBase.EligiblePartyImpl
ARoad0.gBase.GroupIDMemberImpl
ARoad0.gBase.UserIDImpl
ARoad0.AcsAddon.Accbee.Ubuntu.gBase.UserIDUbuntuImpl
public class UserIDUbuntuImpl
This class is responsible for modeling an account in an ACS Ubuntu, as a kind of eligible party. As a Linux/Unix account, it has an umask value. The order is a 16-bit user identifier (UID). It is a javabean with the following bound properties:, 'UMask'. 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 private to secure the white box inheritances from this class. Most of the variables are protected. This class has no subclass in this package.
Field Summary | |
---|---|
static UserIDUbuntuImpl |
EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for default values. |
static java.io.ObjectStreamField[] |
serialPersistentFields
variable for the JDK 2 serialization |
private static long |
serialVersionUID__
|
protected java.lang.String |
uMask_
|
Fields inherited from class ARoad0.gBase.UserIDImpl |
---|
l_currentActors_, l_ownResources_, order_, primGroup_ |
Fields inherited from class ARoad0.gBase.GroupIDMemberImpl |
---|
isAdmin_, l_Groups_ |
Fields inherited from class ARoad0.gBase.EligiblePartyImpl |
---|
m_AclEntriesResources_ |
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 | |
---|---|
UserIDUbuntuImpl()
simple constructor. |
|
UserIDUbuntuImpl(ImmutableName _name,
ACS _acs,
java.lang.String _epType,
java.lang.Boolean _isAdmin)
Constructor used in the beamer by the editor for the ACS EP list, from the 'New' button. |
|
UserIDUbuntuImpl(ImmutableName _name,
ACS _acs,
java.lang.String _epType,
boolean _isAdmin,
boolean _toRegisterInManager)
Used for the creation of an userID. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Adds a listener to the bean. |
java.lang.Object |
clone()
Clone without register 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 UserIDUbuntuImpl |
copyOwnVariables(UserIDUbuntuImpl _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)
This method provides a copy of the instance as copy() but without copying the internal aclEntries. |
boolean |
equals(java.lang.Object _obj)
Does not compare the comment. |
protected void |
finalize()
This method sets the properties to null and unregisters the instance, but there is no guaranee that the JVM calls this method before the end of the application. |
void |
finalizeForBase()
This method HAS TO BE USED before deleting the userID. |
protected void |
finalizeFromDeserialization()
Does not call finalizeForBase(). |
long |
getSerialVersionUID()
For the java serialization. |
java.lang.String |
getUMask()
This umask defines some rights to subtract to the 'full control' right, at the creation of a Resource that belongs to this UserID. |
protected boolean |
isMaskWithWXR(java.lang.String _mask)
Called by processUMask(). |
protected boolean |
isNxUMask(java.lang.String _umask)
Check if _umask is '--- --- --- ' to 'rwx rwx rwx ', following Linux/Unix format (from 0 to 777). |
protected java.util.Set<StringRight> |
processNoWXRuMask(java.lang.String _mask,
java.util.Set<StringRight> _l_result)
NO USE. |
java.util.Set<StringRight> |
processUMask(java.lang.String _mask,
boolean _isDirectory,
boolean _isNxDirectory)
Gets the denying rights for a resource and its owner/group/other AGO rights. |
void |
removePropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Removes a listener to the bean. |
void |
setUMask(java.lang.String _umask)
The allowed format is 3 blocks for respectively Account, Group and Other rights. |
java.lang.String |
toString()
Gets the name last component of the instance. |
Methods inherited from class ARoad0.gBase.UserIDImpl |
---|
addCurrentActor, addGroupToGM, addOwnResource, copyOwnVariables, getEorL_UserIDCurrentActors, getEorL_UserIDOwnResources, getEorPrimGroup, getOrder, getPropertyChangeListeners, hashCode, ownsResource, removeCurrentActor, removeGroupToGM, removeOwnResource, removePrimGroup, setEorPrimGroup, setOrder |
Methods inherited from class ARoad0.gBase.GroupIDMemberImpl |
---|
copy, copyOwnVariables, copyWithoutAcl, getEorL_GroupID, isAdmin |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ARoad0.gBaseInterface.UserID |
---|
finalizeForUser, setEorPrimGroup, setOrder |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableUserID |
---|
getEorL_UserIDCurrentActors, getEorL_UserIDOwnResources, getEorPrimGroup, getOrder, ownsResource |
Methods inherited from interface ARoad0.gBaseInterface.GroupIDMember |
---|
addGroupToGM, removeGroupToGM |
Methods inherited from interface ARoad0.gBaseInterface.EligibleParty |
---|
setEPType |
Methods inherited from interface ARoad0.gBaseInterface.Basic |
---|
setComment |
Methods inherited from interface ARoad0.gBaseInterface.PrivilegeSource |
---|
addEorPrivilegeForTypeToSource, removeEorPrivilegeToSource |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableGroupIDMember |
---|
getEorL_GroupID, isAdmin |
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.BoundBean |
---|
addPropertyChangeListener, removePropertyChangeListener |
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 |
Methods inherited from interface ARoad0.gBaseInterface.BaseBeanManager |
---|
addPropertyChangeListener, removePropertyChangeListener |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableTarget |
---|
getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getL_AcsOfSoftReferences, getL_SoftAlias, getType |
Field Detail |
---|
private static final long serialVersionUID__
protected java.lang.String uMask_
public static final UserIDUbuntuImpl EMPTY_INSTANCE
public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail |
---|
public UserIDUbuntuImpl()
public UserIDUbuntuImpl(ImmutableName _name, ACS _acs, java.lang.String _epType, java.lang.Boolean _isAdmin) throws CreateError
_name
- ImmutableName of the userID as a kind of eligible party_acs
- ACSUbuntuImpl owning this userID_epType
- is the EligibleParty type, and may be null if the ACS allows it._isAdmin
- true only if the instance has an administrative role in the ACS,
for the technical administration or the users administration.
CreateError
- if ACSUbuntuImpl.newEorEligibleParty() throws it - the instance
must then be deleted !public UserIDUbuntuImpl(ImmutableName _name, ACS _acs, java.lang.String _epType, boolean _isAdmin, boolean _toRegisterInManager) throws CreateError
_name
- ImmutableName of the userID to create_acs
- ACSUbuntuImpl owning this userID_epType
- is the EligibleParty type, and may be null if the ACS allows it._isAdmin
- true only if the instance has an administrative role in the ACS,
for the technical administration or the users administration._toRegisterInManager
- false if this method must not register
the instance in its ACS.
CreateError
- if ACSUbuntuImpl.newEorEligibleParty() throws it -
the instance must then be deleted !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 UserIDImpl
_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 java.lang.Object copyWithoutInternalAcl(ImmutableName _name, ACS _acs, Directory _parent, java.lang.Boolean _toRegisterInManager) throws CreateError
copyWithoutInternalAcl
in interface EligibleParty
copyWithoutInternalAcl
in class UserIDImpl
_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 void setUMask(java.lang.String _umask) throws UpDateError
setUMask
in interface UserIDUbuntu
_umask
- from '--- --- --- ' to 'rwx rwx rwx ', following Linux/Unix
concept (from 0 to 777), or 3 used acsrights/metarights separated by one space,
or 3 blocks separated by one space and inferior to 4,
containing at most one of the characters 'wxr'.
UpDateError
- for all the wrong formats or if the umask is immutablepublic java.lang.String getUMask()
getUMask
in interface UserIDUbuntu
public void addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
addPropertyChangeListener
in interface BaseBeanManager
addPropertyChangeListener
in interface BoundBean
addPropertyChangeListener
in class UserIDImpl
_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 UserIDImpl
_propertyName
- name of the property_l
- PropertyChangeListener to removepublic long getSerialVersionUID()
BasicImpl
getSerialVersionUID
in interface ImmutableBasic
getSerialVersionUID
in class UserIDImpl
public java.util.Set<StringRight> processUMask(java.lang.String _mask, boolean _isDirectory, boolean _isNxDirectory)
processUMask
in interface UserIDUbuntu
_mask
- part of this userID umask which describes the requirement for owner
or for group or other_isDirectory
- true if the calling resource is a directory, not a Linux/Unix one.
Unused in this method, but it is kept for future uses._isNxDirectory
- true if the calling resource is a Linux/Unix directory.
_isDirectory has to be false.
protected void finalize() throws java.lang.Throwable
finalize
in class UserIDImpl
java.lang.Throwable
java.lang.Throwable
public void finalizeForBase() throws UpDateError
finalizeForBase
in interface FinalizedObject
finalizeForBase
in class UserIDImpl
UpDateError
- if the userID is unknown of the main ACS
(if it is a clone, typically), or if a linked immutable object fires an exceptionprotected void finalizeFromDeserialization()
finalizeFromDeserialization
in class UserIDImpl
public java.lang.Object clone()
clone
in class UserIDImpl
public boolean equals(java.lang.Object _obj)
EligiblePartyImpl
equals
in interface BaseObject
equals
in class UserIDImpl
_obj
- Object to compare
public java.lang.String toString()
BasicImpl
toString
in class UserIDImpl
protected UserIDUbuntuImpl copyOwnVariables(UserIDUbuntuImpl _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
protected java.util.Set<StringRight> processNoWXRuMask(java.lang.String _mask, java.util.Set<StringRight> _l_result)
_mask
- part of this userID umask which describes the requirement for owner,
or for group, or for other_l_result
- set to fill with the denying rights
protected boolean isNxUMask(java.lang.String _umask)
_umask
-
protected boolean isMaskWithWXR(java.lang.String _mask)
_mask
- is a block in an umask, used for defined the denying requirement
for an owner, or group, or other rights in AGO rights
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |