ARoad0.gBase
Class DirectoryImpl

java.lang.Object
  extended by ARoad0.gBase.BasicImpl
      extended by ARoad0.gBase.ResourceImpl
          extended by ARoad0.gBase.DirectoryImpl
All Implemented Interfaces:
ACSObject, BaseBeanManager, BaseObject, Basic, BoundBean, Copyable, Directory, FinalizedObject, FinalizedObjectForUser, ImmutableBasic, ImmutableDirectory, ImmutableLeaf, ImmutableNode, ImmutablePrivilegeTarget, ImmutableResource, ImmutableTarget, Leaf, Node, PrivilegeTarget, PrivilegeUser, Resource, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
BasesSetMySQLImpl, DirectoryMySQLImpl, DirectoryUbuntuImpl

public class DirectoryImpl
extends ResourceImpl
implements Directory, java.io.Serializable

This class is responsible for modeling a directory which contains children, as resources and other directories. It manages fully the AG inherited rights of its children. It manages only partially the ACL and PRI inherited rights of its children, and this may be completed by the AcsAddons. There are three flows of data to manage the inherited AclEntries:

- one at the ACL creation/deletion, and this is not done in the generic gBase,

- one at their inner rights editing, and this is the responsability of this class,

- and the last flow, only for the conditional ACL, at the editing of the membership relation between the source and a condition group, and this is the responsability of this class.

In this later case, this is the calling sequence to reset the conditional AclEntry:

- GroupIDImpl.addEorMember(),

- if GroupIDImpl.isConditionalACLtoResetAfterMembershipChangeInThisGroup(),

- AclEntry.resetRightsAsInheritedAclEntry().

There are two flows of data to manage the inherited Privileges:

- one at the privilege creation/deletion, and this is not done in the generic gBase,

- one at their sources editing, and this is the responsability of this class.

A CNodeImpl embedded instance is used to handle the children. All variables are protected. It is a javabean with the following bound properties: 'Children', 'EnforceChildGID'. 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.

See Also:
Directory, Resource, Serialized Form

Field Summary
static DirectoryImpl EMPTY_INSTANCE
          A reusable empty instance for initialization, to avoid the use of 'new' for temporary values.
protected  boolean EnforceChildGID_
           
protected  CNodeImpl nodeHandler_
          children handler of this instance
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
DirectoryImpl()
          The basic constructor
DirectoryImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType)
          This constructor sets this instance as the ACS own resources root if _parent is null.
DirectoryImpl(ImmutableName _name, ACS _acs, Directory _parent, UserID _owner, java.lang.String _resourceType, boolean _toRegisterInManager)
          This constructor sets this instance as own resources root if the ACS has not one yet.
 
Method Summary
protected  void addEorChild(ImmutableLeaf _child)
          Adds a child to this Node.
 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, without children copying because the copy order will not be always correct.
protected  DirectoryImpl copyOwnVariables(DirectoryImpl _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 Copyable.copy(), but without copying the internal aclEntries.
 boolean equals(java.lang.Object _obj)
          Does not compare the comment.
 void finalizeForBase()
          Finalizes the directory and ALL ITS CHILDREN.
protected  void finalizeFromDeserialization()
          This method finalizes all the children, since it is used after a deserialization.
 boolean getEnforceChildGID()
           
 ImmutableResource[] getEorL_Children()
          Gets a sorted array of external object references on the children of this node, which may be leaves (resources) or nodes.
 java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String _propertyName)
          Returns the change listeners for a property.
 long getSerialVersionUID()
          For the java serialization.
 int hashCode()
          Overrides the super method.
protected  void removeEorChild(ImmutableLeaf _child)
          Removes a child from this Node.
 void removePropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
          Removes a listener to the bean.
 void resetInheritedAclEntryRights(AclEntry _acl)
          Resets the inherited AclEntry rights after an user edition.
 void resetInheritedAclEntryRightsOfChildren(AclEntry _acl)
          At each rights changing into a direct ACL, if the ACL inheritance is applicable, reset the inherited AclEntry rights in the children.
 void resetInheritedPrivilegeRights(PrivilegeForLinks _lpri)
          Resets the inherited Privilege rights after an user edition.
 void resetInheritedPrivilegeRightsOfChildren(PrivilegeForLinks _lpri)
          Resets the inherited Privilege rights in the children, if the Privilege inheritance is applicable.
 void setEnforceChildGID(boolean _a)
          Noop if 'resource 1: new child/node inherits the current G, if activated, and G is not the account primary group' is not in the ACS rules.
 void setEorL_Children(ImmutableLeaf[] _l_Child)
          Deprecated. add/removeEorChild methods replaces it
 void setL_groupRights(StringRight[] _s)
          Overrides the super method to call getL_inheritedOwnerRights(), BaseUtilityImpl.withAcrossToDirectoryAGRights(), fireL_inheritedGroupRights() and setAGOAccessFromTheParentGroup() on the children.
 void setL_ownerRights(StringRight[] _s)
          Overrides the super method to change the inherited owner rights on the children.
 java.lang.String toString()
          Gets the name last component of the instance.
 
Methods inherited from class ARoad0.gBase.ResourceImpl
addAclEntry, addAcsController, addEorPrivilegeForLinksToTarget, addEorPrivilegeForTypeToTarget, compareTo, containsAclEntryToEP, copyOwnAcl, copyOwnVariables, fireL_inheritedGroupRights, fireL_inheritedOwnerRights, getActorActivated, getAGOAccessFromTheParentAccount, getAGOAccessFromTheParentGroup, getEorGroupID, getEorImmutableL_TargetInheritedAclEntries, getEorImmutableL_TargetInheritedLinkedPrivileges, getEorL_EPthroughAclEntry, getEorL_TargetInheritedAclEntries, getEorL_TargetInheritedLinkedPrivileges, getEorL_TargetPrivilegeForLinks, getEorL_TargetPrivilegeForTypes, getEorL_TargetPrivileges, getEorParent, getEorUserID, getL_aclEntry, getL_AcsControllers, getL_groupRights, getL_inheritedGroupRights, getL_inheritedOwnerRights, getL_ownerRights, getL_rootRights, getM_TargetInheritedACLRights, getM_TargetInheritedLinkedPRIRights, getResourceType, hasTheAccountAndGroupOfParent, removeACL, removeAclEntry, removeAcsController, removeEorGroupID, removeEorPrivilegeToTarget, removeEorUserID, selectInheritedAclEntry, selectInheritedPrivilege, setAGOAccessFromTheParentAccount, setAGOAccessFromTheParentGroup, setEorGroupID, setEorParent, setEorUserID, setL_rootRights, setResourceType
 
Methods inherited from class ARoad0.gBase.BasicImpl
addAcsOfSoftReferences, addConstrainedChildACS, addEorSoftAlias, addInVFolderList, addInViewList, addPropertyChangeListener, copyOwnVariables, finalize, finalizeForUser, firePropertyChange, getAcsName, getComment, getEorACS, getEorAliasAsInternalHardReference, getEorReferenceAsInternalHardAlias, getFullName, getHasSoftAlias, getImpliedViews, getIS_Name, getL_AcsOfSoftReferences, getL_SoftAlias, getM_ConstrainedChildACS, getName, getNickName, getType, getVirtualFolders, removeAcsOfSoftReferences, removeConstrainedChildACS, removeEorSoftAlias, removeInVFolderList, removeInViewList, removePropertyChangeListener, setComment, setEorAliasAsInternalHardReference, setEorReferenceAsInternalHardAlias, setType
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ARoad0.gBaseInterface.Resource
addAclEntry, removeAclEntry, selectInheritedPrivilege, setEorGroupID, setEorUserID, setL_rootRights, setResourceType
 
Methods inherited from interface ARoad0.gBaseInterface.Basic
finalizeForUser, setComment
 
Methods inherited from interface ARoad0.gBaseInterface.PrivilegeTarget
addEorPrivilegeForTypeToTarget, removeEorPrivilegeToTarget
 
Methods inherited from interface ARoad0.gBaseInterface.ImmutableResource
containsAclEntryToEP, getActorActivated, getAGOAccessFromTheParentAccount, getAGOAccessFromTheParentGroup, getEorGroupID, getEorImmutableL_TargetInheritedAclEntries, getEorL_EPthroughAclEntry, getEorUserID, getL_aclEntry, getL_AcsControllers, getL_groupRights, getL_inheritedGroupRights, getL_inheritedOwnerRights, getL_ownerRights, getL_rootRights, getM_ConstrainedChildACS, getM_TargetInheritedACLRights, getResourceType, hasTheAccountAndGroupOfParent, selectInheritedAclEntry
 
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.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.BaseBeanManager
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface ARoad0.gBaseInterface.ImmutableLeaf
compareTo, getEorParent
 
Methods inherited from interface ARoad0.gBaseInterface.ACSObject
getAcsName, getEorACS
 
Methods inherited from interface ARoad0.gBaseInterface.BaseObject
getFullName, getName, getNickName
 

Field Detail

serialVersionUID__

private static final long serialVersionUID__
See Also:
Constant Field Values

nodeHandler_

protected CNodeImpl nodeHandler_
children handler of this instance


EnforceChildGID_

protected boolean EnforceChildGID_

EMPTY_INSTANCE

public static final DirectoryImpl EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for temporary values. Caution: never change the state of the returned instance.


serialPersistentFields

public static final java.io.ObjectStreamField[] serialPersistentFields
variable for the JDK 2 serialization

Constructor Detail

DirectoryImpl

public DirectoryImpl()
The basic constructor


DirectoryImpl

public DirectoryImpl(ImmutableName _name,
                     ACS _acs,
                     Directory _parent,
                     UserID _owner,
                     java.lang.String _resourceType)
              throws CreateError
This constructor sets this instance as the ACS own resources root if _parent is null. Used by the beamer editor for the ACS resources list, from the 'New' button, or from the gWork.AcsFactory.

Parameters:
_name - of the directory
_acs - is the main ACS of the directory
_parent - of the directory; may be null.
_resourceType - is the type, and may be null if the ACS allows it.
_owner - owns the resource; may be null.
Throws:
CreateError - if ACSImpl.newEorResource() throws it - the instance must then be deleted !

DirectoryImpl

public DirectoryImpl(ImmutableName _name,
                     ACS _acs,
                     Directory _parent,
                     UserID _owner,
                     java.lang.String _resourceType,
                     boolean _toRegisterInManager)
              throws CreateError
This constructor sets this instance as own resources root if the ACS has not one yet. Used for the creation of a copy.

Parameters:
_name - ImmutableName of the directory.
_acs - main ACS of the directory.
_parent - Node which owns the directory.
_owner - owns the resource; may be null.
_resourceType - is the type, and may be null if the ACS allows it.
_toRegisterInManager - false if this method must not register the instance in the ACS.
Throws:
CreateError: - see super(_name, _acs, _parent, _resourceType, _toRegisterInManager) exception
CreateError
Method Detail

copy

public java.lang.Object copy(ImmutableName _name,
                             ACS _acs,
                             Directory _parent,
                             java.lang.Boolean _toRegisterInManager)
                      throws CreateError
This method provides a copy of the instance with another name, without children copying because the copy order will not be always correct. Caution: the user and the group will not be copied if the copy ACS is different and without similar user or group. This method is overridden by the subclasses. Calls copyOwnVariables().

Specified by:
copy in interface Copyable
Overrides:
copy in class ResourceImpl
Parameters:
_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.
Returns:
copy as DirectoryImpl instance
Throws:
CreateError - of the constructor with the same parameters, or if _parent ACS is not _acs, or addAclEntry() exceptions.

copyWithoutInternalAcl

public java.lang.Object copyWithoutInternalAcl(ImmutableName _name,
                                               ACS _acs,
                                               Directory _parent,
                                               java.lang.Boolean _toRegisterInManager)
                                        throws CreateError
This method provides a copy of the instance as Copyable.copy(), but without copying the internal aclEntries. It is used for ACSImpl.copy(), because all the EP must be copied first before the copy of all the resources with their aclEntries. Each internal variable that is an external object reference has a shallow copy (no deep copy), but without copy for the internal aclEntry nor the list of ViewInBase that contains this instance. Called from BaseUtilitiesImpl.copyDirectoriesAndActors(). Calls copyOwnVariables().

Specified by:
copyWithoutInternalAcl in interface Resource
Overrides:
copyWithoutInternalAcl in class ResourceImpl
Parameters:
_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.
Returns:
a new instance of this class
Throws:
CreateError - of the constructor with the same parameters, or if _parent ACS is not _acs, or addAclEntry() exceptions.

setEorL_Children

public final void setEorL_Children(ImmutableLeaf[] _l_Child)
                            throws BaseError
Deprecated. add/removeEorChild methods replaces it

Calls the other setEorL_Children() with the _caller argument equal to this instance to have no action. This method is created for the BeanInfo; it is used by Gui1 beamer which listen the 'Children' changes. Caution: never call this method from a new or a deprecated child of this directory; use then the other method.

Parameters:
_l_Child - array of leaves which are in this directory. May be equal to ResourceImpl.EMPTY_INSTANCE, or null.
Throws:
BaseError - if a leaf is not owned by the main ACS of this directory (or InternalError for several rare conditions)

getEorL_Children

public ImmutableResource[] getEorL_Children()
Gets a sorted array of external object references on the children of this node, which may be leaves (resources) or nodes. The returned type is not immutableLeaf[] to allow BaseUtilityImpl to found the true returned type from the method signature, for BaseObjectHandler when it has to create a new child from the property editor.

Specified by:
getEorL_Children in interface ImmutableDirectory
Returns:
a copy of the array. May be null but not empty.

setEnforceChildGID

public void setEnforceChildGID(boolean _a)
Noop if 'resource 1: new child/node inherits the current G, if activated, and G is not the account primary group' is not in the ACS rules.

Specified by:
setEnforceChildGID in interface Directory
Parameters:
_a - true if the groupID is changed for the newly-created children to this-directory groupID, and the newly-created sub-directories have this property set to true.

getEnforceChildGID

public boolean getEnforceChildGID()
Specified by:
getEnforceChildGID in interface ImmutableDirectory
Returns:
boolean true if the groupID is changed for the newly-created files to this directory groupID, and the newly-created sub-directories have this property set to true.

resetInheritedAclEntryRightsOfChildren

public void resetInheritedAclEntryRightsOfChildren(AclEntry _acl)
At each rights changing into a direct ACL, if the ACL inheritance is applicable, reset the inherited AclEntry rights in the children. There are three flows of data to manage the inherited AclEntries:

- one at the ACL creation/deletion, and this is not done in the generic gBase package,

- one at their inner rights editing,

- and the last flow, only for the condition ACL, at the editing of the membership relation between the source and a condition group.

This method is called for handling the second and the third cases, to update the children of the Directory the AclEntry which is the target of the AclEntry. Not described in the BeanInfo since the user does not call it. Overridden in the AcsAddons. Called by AclEntryImpl.resetRightsAsInheritedAclEntry().

Specified by:
resetInheritedAclEntryRightsOfChildren in interface Directory
Parameters:
_acl - own AclEntry with updated rights

resetInheritedAclEntryRights

public void resetInheritedAclEntryRights(AclEntry _acl)
Resets the inherited AclEntry rights after an user edition. Called by the parent when there is a change in the effective rights of an inherited AclEntry. May be overread only in the AcsAddons handling the ACL inheritance. Not described in the BeanInfo since the user does not call it. Note: the creation of the inherited AclEntry in a child is not handled by the generic gBase package, while the rights updating of the inherited AclEntry is handled. Called by resetInheritedAclEntryRightsOfChildren() and this method from the parent. Overrides the super method and calls it.

Specified by:
resetInheritedAclEntryRights in interface Resource
Overrides:
resetInheritedAclEntryRights in class ResourceImpl
Parameters:
_acl - inherited AclEntry with updated rights

resetInheritedPrivilegeRights

public void resetInheritedPrivilegeRights(PrivilegeForLinks _lpri)
Resets the inherited Privilege rights after an user edition. Called by the parent when there is a change in the effective rights of an inherited Privilege. This is only when it is about a change in the sources. Contrary to AclEntry, the rights are immutable and there is no condition. The subclassing of CPrivilegeUserImpl is possible in an AcsAddon, but it is also possible to overread the same method in a subclass of this class. Not described in the BeanInfo since the user does not call it. Note: the creation of the inherited Privilege in a child is not handled by the generic gBase package, while the rights updating of the inherited Privilege is handled. Called by Directory.resetInheritedPrivilegeRightsOfChildren(). Overridden in DirectoryImpl and called from it.

Specified by:
resetInheritedPrivilegeRights in interface Resource
Overrides:
resetInheritedPrivilegeRights in class ResourceImpl
Parameters:
_lpri - inherited Privilege with updated rights. Never null.

resetInheritedPrivilegeRightsOfChildren

public void resetInheritedPrivilegeRightsOfChildren(PrivilegeForLinks _lpri)
Resets the inherited Privilege rights in the children, if the Privilege inheritance is applicable. There are two flows of data to manage the inherited Privileges:

- one at the privilege creation/deletion, and this is not done in the generic gBase package,

- one at their sources editing,

This method is called for handling the second case, to update the children of the Directory which is the target of the Privilege. Not described in the BeanInfo since the user does not call it. Overridden by the AcsAddons. Called by PrivilegeForLinksImpl.resetRightsAsInheritedPrivilege().

Specified by:
resetInheritedPrivilegeRightsOfChildren in interface Directory
Parameters:
_lpri - inherited Privilege with updated rights

copyOwnVariables

protected DirectoryImpl copyOwnVariables(DirectoryImpl _result,
                                         boolean _withoutInternalAcl)
                                  throws CreateError
This method provides a copy of the instance variables. Does not copy the children. Called by copy(), and by the copyOwnVariables() methods of the subclasses. Calls super.copyOwnVariables(). Caution: the user and the group will not be copied if the copy ACS is different and without similar user or group.

Parameters:
_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
Returns:
updated _result
Throws:
if - super throws it
CreateError

addEorChild

protected void addEorChild(ImmutableLeaf _child)
Adds a child to this Node. A child is not a member. Used by the children constructor. Does not update the parent internal variable in the child. No control on the ACS type policy, since it is done in the ResourceImpl constructor which calls this class for adding a new child. A parent type which contains 'immutable' does not forbid to add children to the parent. Detects the child through a name comparison. Fires the event 'Children'.

Parameters:
_child - is a Resource (not a simple leaf) to put in this Node. No action if null, or already known.
Throws:
java.lang.InternalError - if the leaves list is null, or if _child is not a VirtualFolder. If firePropertyChange() throws an exception, displays an user message.

removeEorChild

protected void removeEorChild(ImmutableLeaf _child)
                       throws UpDateError
Removes a child from this Node. Used by the children finalizing methods. Does not update the parent internal variable in the child. Detects the child presence through a name comparison. If firePropertyChange() throws an exception, displays an user message. No action if the children list is null, to speed up the finalizing of this instance, when children are called to be finalizing.

Parameters:
_child - is a virtual folder which is in this CNode. No action if null.
Throws:
UpDateError - if _child is not known.

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String _propertyName,
                                      java.beans.PropertyChangeListener _l)
Adds a listener to the bean. Used by Gui1.CommonPropertyEditor for the properties: 'Children', 'EnforceChildGID'. Overrides the super method and calls it.

Specified by:
addPropertyChangeListener in interface BaseBeanManager
Specified by:
addPropertyChangeListener in interface BoundBean
Overrides:
addPropertyChangeListener in class ResourceImpl
Parameters:
_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.

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String _propertyName,
                                         java.beans.PropertyChangeListener _l)
Removes a listener to the bean. Used by Gui1.CommonPropertyEditor for the properties: 'Children', 'EnforceChildGID'. Note: using this method does not remove a listener which has been registered through addPropertyChangeListener(PropertyChangeListener _l). Overrides the super method and calls it.

Specified by:
removePropertyChangeListener in interface BaseBeanManager
Specified by:
removePropertyChangeListener in interface BoundBean
Overrides:
removePropertyChangeListener in class ResourceImpl
Parameters:
_propertyName - name of the property
_l - PropertyChangeListener to remove

getPropertyChangeListeners

public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String _propertyName)
Returns the change listeners for a property. Used by the AcsAddons.

Specified by:
getPropertyChangeListeners in interface ImmutableBasic
Overrides:
getPropertyChangeListeners in class ResourceImpl
Parameters:
_propertyName - name of the listened property.
Returns:
the change listeners. May be null.

setL_ownerRights

public void setL_ownerRights(StringRight[] _s)
                      throws UpDateError
Overrides the super method to change the inherited owner rights on the children. Simply calls the super method if the ACS does not manage the AG inherited rights. Called by the ResourceImpl constructor, so nodeHandler_ is null then. Calls BaseUtilityImpl.withAcrossToDirectoryAGRights(), ResourceImpl.setAGAccessFromTheParentAccount() and fireL_inheritedOwnerRights(), and the super method. Fires a PropertyChange for 'OwnerRights'.

Specified by:
setL_ownerRights in interface Resource
Overrides:
setL_ownerRights in class ResourceImpl
Parameters:
_s - array of acsrights and/or metarights. May be null.
Throws:
UpDateError - if the owner rights are immutable.

setL_groupRights

public void setL_groupRights(StringRight[] _s)
                      throws UpDateError
Overrides the super method to call getL_inheritedOwnerRights(), BaseUtilityImpl.withAcrossToDirectoryAGRights(), fireL_inheritedGroupRights() and setAGOAccessFromTheParentGroup() on the children. Simply calls the super method if the ACS does not manage the AG rights inheritance. Called by the ResourceImpl constructor, so nodeHandler_ is null then. Calls the super method. Fires a PropertyChange for 'GroupRights'.

Specified by:
setL_groupRights in interface Resource
Overrides:
setL_groupRights in class ResourceImpl
Parameters:
_s - array of acsrights and/or metarights. May be null.
Throws:
UpDateError - if the group rights are immutable.

finalizeForBase

public void finalizeForBase()
                     throws UpDateError
Finalizes the directory and ALL ITS CHILDREN. If this instance is the current resources root, set it to null. Note: when this method is called by the ResourceImpl constructor, the proper variables of this class are not still initialized.

Specified by:
finalizeForBase in interface FinalizedObject
Overrides:
finalizeForBase in class ResourceImpl
Throws:
UpDateError - if the directory is unknown of the main ACS (if it is a clone without setName(), typically)

clone

public java.lang.Object clone()
Clone without register the new object in the ACSs. Caution: don't use any modifying method that may altere the integrity of the base.

Overrides:
clone in class ResourceImpl
Returns:
Object; is not registred in the ACSs. The names, the aclEntries, the Linux/Unix rights, the ACS controller names are cloned. The external object references are not cloned (see "Eor" in get method). So, the children are not cloned.
Throws:
java.lang.CloneNotSupportedException

equals

public boolean equals(java.lang.Object _obj)
Description copied from class: ResourceImpl
Does not compare the comment. Works even if the instance is user-finalized.

Specified by:
equals in interface BaseObject
Overrides:
equals in class ResourceImpl
Parameters:
_obj - Object
Returns:
true if _obj is a DirectoryImpl instance (or an instance of an extended class) equals to the current one (but test of equals only on names, ACS names of children, and parent name)

hashCode

public final int hashCode()
Overrides the super method.

Specified by:
hashCode in interface BaseObject
Overrides:
hashCode in class ResourceImpl
Returns:
the hashcode value for this object

getSerialVersionUID

public long getSerialVersionUID()
Description copied from class: BasicImpl
For the java serialization.

Specified by:
getSerialVersionUID in interface ImmutableBasic
Overrides:
getSerialVersionUID in class ResourceImpl
Returns:
the static serialVersionUID__ of this class

toString

public java.lang.String toString()
Description copied from class: ResourceImpl
Gets the name last component of the instance. Used in the explorer to display the element. Never null.

Overrides:
toString in class ResourceImpl
Returns:
only the last component of the name. Never null.

finalizeFromDeserialization

protected void finalizeFromDeserialization()
This method finalizes all the children, since it is used after a deserialization. There, the attributes have been deserialized but are not 'true' objects of the base. The instance is NOT removed as a listener, since there is no listener. The internal maps are set to null, but not the private bound properties sets. Does not call finalizeForBase(). Called by EPRViewInBaseImpl only.

Overrides:
finalizeFromDeserialization in class ResourceImpl