|
||||||||||
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
public class UserIDImpl
This class is responsible for modeling an account in an ACS, as a kind of GroupIDMember that owns some resources and a primary groupID. It has some current actors, that are programs starting their execution under it. It is a javabean with the following bound properties: 'l_UserIDCurrentActors', 'l_UserIDOwnResources', 'PrimGroup', 'Order'. The listeners are proper to this instance, outside gBase, transient (not serialized in this instance backup). They are called in any order. Excepted for 'PrimGroup', 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.
This class has several subclasses in this package and in the AcsAddon packages. Most of the variables are protected.
Field Summary | |
---|---|
static UserIDImpl |
EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for default values. |
protected Actor[] |
l_currentActors_
|
protected Resource[] |
l_ownResources_
|
protected int |
order_
|
protected GroupID |
primGroup_
|
static java.io.ObjectStreamField[] |
serialPersistentFields
variable for the JDK 2 serialization |
private static long |
serialVersionUID__
|
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 | |
---|---|
UserIDImpl()
simple constructor |
|
UserIDImpl(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. |
|
UserIDImpl(ImmutableName _name,
ACS _acs,
java.lang.String _epType,
boolean _isAdmin,
boolean _toRegisterInManager)
Used for the creation of an UserID. |
Method Summary | |
---|---|
protected void |
addCurrentActor(Actor _act)
A current actor is running under this userID whatever its caller. |
void |
addGroupToGM(GroupID _grp)
Overrides the super class method. |
protected void |
addOwnResource(Resource _res)
Invoked by Resource.setEorUserID(). |
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 UserIDImpl |
copyOwnVariables(UserIDImpl _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 removes the userID from the ACS lists, but there is no guaranee that the JVM calls this method before the end of the application. |
void |
finalizeForBase()
super.finalizeForBase() removes the userID in the ACS lists (main and controllers), and removes it in the resources connected through an aclEntry. |
protected void |
finalizeFromDeserialization()
This method finalizes each group in the groups set, since it is used after a deserialization. |
Actor[] |
getEorL_UserIDCurrentActors()
A current actor is running under this userID whatever its caller. |
Resource[] |
getEorL_UserIDOwnResources()
An own resource is a same-ACS resource that have this as userID. |
GroupID |
getEorPrimGroup()
The primary group is used by an Actor that has a current UserID, to set the primary group as current GroupID of the Actor. |
int |
getOrder()
|
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String _propertyName)
Returns the change listeners for a property. |
long |
getSerialVersionUID()
For the java serialization. |
int |
hashCode()
|
boolean |
ownsResource(Resource _res)
|
protected void |
removeCurrentActor(Actor _act)
Invoked by Actor.finalizeForBase(), Actor.setEorCurrentUserID() or by gWork. |
void |
removeGroupToGM(ImmutableGroupID _grp)
Remove a group for which this GroupIDMember is a member, and remove it as primary group. |
protected void |
removeOwnResource(Resource _res)
Invoked by Resource.setEorUserID(), Resource.finalizeForBase() Fires an event on "l_UserIDOwnResources". |
protected void |
removePrimGroup()
Removes the current primary group in the current actors which have it as their current group. |
void |
removePropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Removes a listener to the bean. |
void |
setEorPrimGroup(GroupID _g)
Sets a primary group, and it must have this instance as member. |
void |
setOrder(int _i)
Sets the strengh of the UserID which determines its priority order in access control decisions. |
java.lang.String |
toString()
Gets the name last component of the instance. |
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 |
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, 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 |
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 GroupID primGroup_
protected int order_
protected Resource[] l_ownResources_
protected Actor[] l_currentActors_
public static final UserIDImpl EMPTY_INSTANCE
public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail |
---|
public UserIDImpl()
public UserIDImpl(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
- ACS owning the userID_epType
- is the eligible party 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
CreateError
- if ACS.newEorEligibleParty() throws it - the instance
must then be deleted !public UserIDImpl(ImmutableName _name, ACS _acs, java.lang.String _epType, boolean _isAdmin, boolean _toRegisterInManager) throws CreateError
_name
- ImmutableName of the eligible party to create_acs
- Main ACS of the eligible party to create_epType
- is the eligible party 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_toRegisterInManager
- false if this method must not register
the instance in its ACS.
CreateError
- if ACS.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 EligiblePartyImpl
_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 EligiblePartyImpl
_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 setEorPrimGroup(GroupID _g) throws UpDateError
setEorPrimGroup
in interface UserID
_g
- GroupID that is the primary group of the userID. May be null.
UpDateError
- if _g does not belong to the main ACS
of this resource or cannot be a primary group, or does not contain this instance,
or if the type is immutable after the first creation.public GroupID getEorPrimGroup()
getEorPrimGroup
in interface ImmutableUserID
public void setOrder(int _i) throws UpDateError
setOrder
in interface UserID
_i
- order of the userID
UpDateError
- if immutablepublic int getOrder()
getOrder
in interface ImmutableUserID
public void addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
addPropertyChangeListener
in interface BaseBeanManager
addPropertyChangeListener
in interface BoundBean
addPropertyChangeListener
in class GroupIDMemberImpl
_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 GroupIDMemberImpl
_propertyName
- name of the property_l
- PropertyChangeListener to removepublic java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String _propertyName)
getPropertyChangeListeners
in interface ImmutableBasic
getPropertyChangeListeners
in class GroupIDMemberImpl
_propertyName
- name of the listened property.
public long getSerialVersionUID()
BasicImpl
getSerialVersionUID
in interface ImmutableBasic
getSerialVersionUID
in class GroupIDMemberImpl
protected void addOwnResource(Resource _res)
_res
- owned by this userID.protected void addCurrentActor(Actor _act)
_act
- currently attached to this userID.public void addGroupToGM(GroupID _grp)
addGroupToGM
in interface GroupIDMember
addGroupToGM
in class GroupIDMemberImpl
_grp
- to add. No action if it is null, or with null name.protected void removePrimGroup()
public Actor[] getEorL_UserIDCurrentActors()
getEorL_UserIDCurrentActors
in interface ImmutableUserID
public Resource[] getEorL_UserIDOwnResources()
getEorL_UserIDOwnResources
in interface ImmutableUserID
public boolean ownsResource(Resource _res)
ownsResource
in interface ImmutableUserID
protected void finalize() throws java.lang.Throwable
finalize
in class GroupIDMemberImpl
java.lang.Throwable
java.lang.Throwable
public void finalizeForBase() throws UpDateError
finalizeForBase
in interface FinalizedObject
finalizeForBase
in class GroupIDMemberImpl
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 GroupIDMemberImpl
public java.lang.Object clone()
clone
in class GroupIDMemberImpl
public boolean equals(java.lang.Object _obj)
EligiblePartyImpl
equals
in interface BaseObject
equals
in class GroupIDMemberImpl
_obj
- Object to compare
public int hashCode()
hashCode
in interface BaseObject
hashCode
in class GroupIDMemberImpl
public java.lang.String toString()
BasicImpl
toString
in class GroupIDMemberImpl
protected UserIDImpl copyOwnVariables(UserIDImpl _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 void removeOwnResource(Resource _res) throws UpDateError
_res
- Resource to remove in this userID
UpDateError
- if _res is null or unknownprotected void removeCurrentActor(Actor _act) throws UpDateError
_act
- to remove in this userID
UpDateError
- if _act is null or unknownpublic final void removeGroupToGM(ImmutableGroupID _grp)
removeGroupToGM
in interface GroupIDMember
removeGroupToGM
in class GroupIDMemberImpl
_grp
- to remove
java.lang.InternalError
- if _grp is not found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |