|
||||||||||
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.GroupIDImpl
public class GroupIDImpl
This class is responsible for modeling a GroupIDMember that owns a set of members, and which has Account/Group rights on Resources. Typically, it handles a set of user accounts and groupIDs. The membership links between the groupID and each member are managed by the GroupID. Resources and actors may also be registered as owned by a groupID, in two different lists. An actor may also have a groupID as a current group under which it runs, and such an actor is registered in a third list.
It is a javabean with the following bound properties: 'l_Members', 'l_GroupIDCurrentActors', 'l_GroupIDOwnResources', 'l_GroupIDCurrentActorsAsSecondaryGroup'. 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 several subclasses in this package and in the AcsAddon packages. Most of the variables are protected.
Field Summary | |
---|---|
static GroupIDImpl |
EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for temporary values. |
protected Actor[] |
l_currentActors_
|
protected GroupIDMember[] |
l_Members_
|
protected Resource[] |
l_ownResources_
|
protected Actor[] |
l_secGroupActors_
|
protected int |
order_
|
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 | |
---|---|
GroupIDImpl()
Default constructor |
|
GroupIDImpl(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 'New'. |
|
GroupIDImpl(ImmutableName _name,
ACS _acs,
java.lang.String _epType,
boolean _isAdmin,
boolean _toRegisterInManager)
Used for the creation of a groupID. |
Method Summary | |
---|---|
protected void |
addCurrentActor(Actor _act)
Used by Actor.setEorCurrentGroupID. |
void |
addEorMember(GroupIDMember _gm)
Adds a GroupIDMember as a member of this groupID, and update the member through the addGroupToGM method. |
protected void |
addOwnActorAsSecondaryGroup(Actor _act)
Invoked by Actor.setEorL_SecondaryGroup(). |
protected void |
addOwnResource(Resource _res)
Used by Resource.setEorGroupID(). |
java.lang.Object |
clone()
Clone without register the new object in the ACSs. |
boolean |
containsAsIndirectMember(ImmutableGroupIDMember _ep)
Test if an eligible party is an indirect member of this GroupID, or if it is an hard alias having a reference which is an indirect member. |
boolean |
containsAsIndirectMemberWithoutAliasing(ImmutableGroupIDMember _ep)
Test if an eligible party is an indirect member of this GroupID, and do not test if it is an alias having a reference which is an indirect member. |
boolean |
containsAsMember(ImmutableGroupIDMember _ep)
Tests if an eligible party is a direct member of this GroupID, or if it has an alias which is a direct member. |
boolean |
containsAsMemberWithoutAliasing(ImmutableGroupIDMember _ep)
Deprecated. _ep to test |
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 GroupIDImpl |
copyOwnVariables(GroupIDImpl _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 EligibleParty internal aclEntries. |
boolean |
equals(java.lang.Object _obj)
Does not compare the comment. |
protected void |
finalize()
This method removes the groupID from the ACS lists, but there is no guaranee that the JVM calls this method before the end of the application. |
void |
finalizeForBase()
This method removes the members, and the resources through the variable groupID_ and, for Actors, through currentGroupID_ and l_SecondaryGroup_. |
protected void |
finalizeFromDeserialization()
This method finalizes each group members, since it is used after a deserialization. |
Actor[] |
getEorL_GroupIDCurrentActors()
A current actor runs under this groupID. |
Actor[] |
getEorL_GroupIDCurrentActorsAsSecondaryGroup()
Get the actors in the ACS that have, in the role of a running processes, this group as a secondary groupID. |
Resource[] |
getEorL_GroupIDOwnResources()
A currentGroupID or a secondary groupID is a property of an actor, which is a kind of resource. |
ImmutableGroupIDMember[] |
getEorL_Members()
Get the ordered array of this GroupID members. |
GroupID |
getFirstIntermediateForIndirectMember(ImmutableGroupIDMember _ep)
Gets the first member which contains the argument as member or indirect member. |
static AclEntry[] |
getL_ConditionalACLsOfOneConditionGroupIndirectMember(ImmutableGroupID _grp)
NO USE. |
static ImmutableGroupID[] |
getL_IntermediateGroupsOfAclConditionalGroups(ImmutableAclEntry _acl)
Gets, for a conditional AclEntry, all the effective or potential intermediate GroupIDs, in the chain from the source to each condition group. |
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 |
isConditionalACLtoResetAfterMembershipChangeInThisGroup(ImmutableAclEntry _acl,
ImmutableGroupIDMember _member)
Detects if it is a conditional AclEntry from this group ACS, for which a change in the groupidmember membership relation to this group is able to change the membership chain from the AclEntry source to at least one condition group of the AclEntry. |
boolean |
ownsResource(Resource _res)
|
protected void |
removeCurrentActor(Actor _act)
Used by Actor.finalizeForBase(), Actor.setEorCurrentGroupID(). |
void |
removeEorMember(GroupIDMember _gm)
Removes a groupID member, and update the member through the removeGroupToGM method, if the group is not immutable. |
protected void |
removeOwnActorAsSecondaryGroup(Actor _act)
Invoked by Actor.setEorL_SecondaryGroup() and Actor.finalizeForBase(). |
protected void |
removeOwnResource(Resource _res)
Used by Resource.setEorGroupID() and finalizeForBase(). |
void |
setEorL_Members(GroupIDMember[] _L)
Defines the groupID members, and updates the members through the add/removeGroupToGM methods. |
void |
setOrder(int _i)
Set the order of the GroupID which determines its priority among in access control decisions - on Unix : 16-bit group identifier (GID). |
java.lang.String |
toString()
Gets the name last component of the instance. |
Methods inherited from class ARoad0.gBase.GroupIDMemberImpl |
---|
addGroupToGM, addPropertyChangeListener, copy, copyOwnVariables, copyWithoutAcl, getEorL_GroupID, isAdmin, removeGroupToGM, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ARoad0.gBaseInterface.GroupIDMember |
---|
addGroupToGM, removeGroupToGM |
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.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, addPropertyChangeListener, removePropertyChangeListener, 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, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableTarget |
---|
getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getHasSoftAlias, getL_AcsOfSoftReferences, getL_SoftAlias, getType |
Field Detail |
---|
private static final long serialVersionUID__
protected GroupIDMember[] l_Members_
protected int order_
protected Resource[] l_ownResources_
protected Actor[] l_currentActors_
protected Actor[] l_secGroupActors_
public static final GroupIDImpl EMPTY_INSTANCE
public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail |
---|
public GroupIDImpl()
public GroupIDImpl(ImmutableName _name, ACS _acs, java.lang.String _epType, java.lang.Boolean _isAdmin) throws CreateError
_name
- ImmutableName of the groupID_acs
- ACS of the groupID_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 _name ends with '_tree>', or if
ACSImpl.newEorEligibleParty() throws it - the instance must then be deleted !public GroupIDImpl(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 ACSImpl.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.public void setEorL_Members(GroupIDMember[] _L) throws CreateError
setEorL_Members
in interface GroupID
_L
- is the members of the GroupID. May be null.
The new children array is sorted with ImmutableEligibleParty.compareTo();
null and empty instances are removed.
java.lang.InternalError
- if one element is not known by the
main ACS, if the main ACS has no registered eligible parties.
CreateError
- if a _L element does not belong to the ACS,
or if it is a GroupID which has this instance has
direct or indirect memberpublic void addEorMember(GroupIDMember _gm) throws CreateError
addEorMember
in interface GroupID
_gm
- new member of the GroupID. No action if null, empty.
CreateError
- if _gm is a GroupID which has this instance has
direct or indirect member, if _gm is already a member, or if the _gm type
is not authorized by the ACS, or if the type does not allow the operation,
if this group is immutable, or if it is mutable and not the new member.public void removeEorMember(GroupIDMember _gm) throws CreateError
removeEorMember
in interface GroupID
_gm
- member of the GroupID. No action if unknown, null, empty.
CreateError
- if the type does not allow the operationpublic ImmutableGroupIDMember[] getEorL_Members()
getEorL_Members
in interface ImmutableGroupID
public boolean containsAsMember(ImmutableGroupIDMember _ep)
containsAsMember
in interface ImmutableGroupID
_ep
- to test
public boolean containsAsMemberWithoutAliasing(ImmutableGroupIDMember _ep)
containsAsMemberWithoutAliasing
in interface ImmutableGroupID
public boolean containsAsIndirectMember(ImmutableGroupIDMember _ep)
containsAsIndirectMember
in interface ImmutableGroupID
_ep
- to test
public GroupID getFirstIntermediateForIndirectMember(ImmutableGroupIDMember _ep)
getFirstIntermediateForIndirectMember
in interface ImmutableGroupID
_ep
- to test. May be null.
public boolean containsAsIndirectMemberWithoutAliasing(ImmutableGroupIDMember _ep)
containsAsIndirectMemberWithoutAliasing
in interface ImmutableGroupID
public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String _propertyName)
getPropertyChangeListeners
in interface ImmutableBasic
getPropertyChangeListeners
in class GroupIDMemberImpl
_propertyName
- name of the listened property.
public void setOrder(int _i)
setOrder
in interface GroupID
_i
- is the order of the groupID - on Unix : 16-bit group identifier (GID)public int getOrder()
getOrder
in interface ImmutableGroupID
protected void addOwnActorAsSecondaryGroup(Actor _act)
_act
- Actor for which this groupID is a secondary groupID.
May be null.public Resource[] getEorL_GroupIDOwnResources()
getEorL_GroupIDOwnResources
in interface ImmutableGroupID
public boolean ownsResource(Resource _res)
ownsResource
in interface ImmutableGroupID
public Actor[] getEorL_GroupIDCurrentActors()
getEorL_GroupIDCurrentActors
in interface ImmutableGroupID
public Actor[] getEorL_GroupIDCurrentActorsAsSecondaryGroup()
getEorL_GroupIDCurrentActorsAsSecondaryGroup
in interface ImmutableGroupID
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), if this instance is registered has the
primary group of another-ACS userID, or if it is a conditional group in an
AclEntry which is not well finalizedprotected void finalizeFromDeserialization()
finalizeFromDeserialization
in class GroupIDMemberImpl
public java.lang.Object clone()
clone
in class GroupIDMemberImpl
java.lang.CloneNotSupportedException
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
public long getSerialVersionUID()
BasicImpl
getSerialVersionUID
in interface ImmutableBasic
getSerialVersionUID
in class GroupIDMemberImpl
public static ImmutableGroupID[] getL_IntermediateGroupsOfAclConditionalGroups(ImmutableAclEntry _acl)
_acl
- AclEntry to analyze
public static AclEntry[] getL_ConditionalACLsOfOneConditionGroupIndirectMember(ImmutableGroupID _grp)
_grp
- to analyze. Never null.
public boolean isConditionalACLtoResetAfterMembershipChangeInThisGroup(ImmutableAclEntry _acl, ImmutableGroupIDMember _member)
_acl
- from the _member ACS. Never null._member
- new or previous direct member of this group. Never null.
protected GroupIDImpl copyOwnVariables(GroupIDImpl _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 addOwnResource(Resource _res)
_res
- Resource owned by this groupID. May be null.protected void addCurrentActor(Actor _act)
_act
- Actor currently attached to this groupID. May be null.protected void removeOwnResource(Resource _res) throws UpDateError
_res
- Resource to remove in this groupID
UpDateError
- if _res is null or unknownprotected void removeCurrentActor(Actor _act) throws UpDateError
_act
- Actor to remove in this groupID
UpDateError
- if _act is null or unknownprotected void removeOwnActorAsSecondaryGroup(Actor _act) throws UpDateError
_act
- Actor to remove in this groupID
UpDateError
- if _act is null or unknown, but not if the actor
list is nullprotected void finalize() throws java.lang.Throwable
finalize
in class GroupIDMemberImpl
java.lang.Throwable
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |