|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectARoad0.gBase.CNodeImpl
public class CNodeImpl
This class is an embedded class responsible for modeling a node which contains children (leaves and nodes) as a private attribute of a composite class instance, called the master instance. The master delegates the processing of its children to an instance of this class. The master class may be a Directory or a VirtualFolder, and it transfers the operations on the children to this class. The children are Resources or VirtualFolders. They all deleted when the node is deleted, on the contrary of the members of a virtual folder, for instance. This class implements the Node interface for its master, but this is not directly controlled by Java since this class does not implement the interface to avoid to be a public class. The Leaf interface is not processed, so the master has to managed it since any node is a leaf.
All variables are private to secure the white box inheritances from this class. It is a javabean with the following bound properties:
- 'Children'.
The listeners are proper to this instance. Excepting for EPRViewInBaseImpl, they are 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 is public to be overriden in the AcsAddons, and in this case, the subclass is only called by some classes in the same package. See the Copyright.
Node
,
Resource
,
VirtualFolder
,
Serialized FormField Summary | |
---|---|
protected java.beans.PropertyChangeSupport |
changeSupport_
manages all the property change listeners of this class and its subclasses |
(package private) static CNodeImpl |
EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for temporary values. |
protected static int |
INCREMENT_CAPACITY
|
protected static int |
INITIAL_CAPACITY
Protected variables |
protected static int |
INITIAL_CAPACITY_2
|
protected ImmutableLeaf[] |
l_Children_
|
protected Node |
master_
|
static java.io.ObjectStreamField[] |
serialPersistentFields
variable for the JDK 2 serialization |
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
protected |
CNodeImpl()
The basic constructor. |
protected |
CNodeImpl(Node _master)
Used by the master constructor. |
Method Summary | |
---|---|
protected void |
addEorChild(ImmutableLeaf _child)
Adds a child to the CNode, without control on the master type and the ACS type policy. |
protected void |
addPropertyChangeListener(java.beans.PropertyChangeListener _l)
Adds a listener to the bean, for all the bound properties. |
protected void |
addPropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Adds a listener to the bean. |
protected CNodeImpl |
cloneC(Node _master)
Clone for embeddd class without registering the new object in the ACSs. |
protected CNodeImpl |
copy(Node _masterCopy)
This method provides a copy of the instance with another name, without children copying because the copy order will not be always correct. |
boolean |
equals(java.lang.Object _obj)
|
protected void |
finalize()
This method removes the CNode from the ACS lists, but there is no guarantee that the JVM calls this method before the end of the application. |
protected void |
finalizeForBase()
Finalizes the CNode and ALL ITS CHILDREN. |
protected void |
finalizeFromDeserialization()
This method finalizes all the children, since it is used after a deserialization. |
protected void |
firePropertyChange(java.lang.String _propertyName,
java.lang.Object _oldValue,
java.lang.Object _newValue)
Fires an event to every registered listener, in any order. |
protected ImmutableLeaf[] |
getEorL_Children()
Gets a sorted array of external object references on the children of this node, which may be leaves or nodes. |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String _propertyName)
Returns the change listeners for a property. |
long |
getSerialVersionUID()
|
int |
hashCode()
|
protected void |
removeEorChild(ImmutableLeaf _child)
Removes a child from the CNode. |
protected void |
removePropertyChangeListener(java.beans.PropertyChangeListener _l)
Removes a listener to the bean, for all the bound properties. |
protected void |
removePropertyChangeListener(java.lang.String _propertyName,
java.beans.PropertyChangeListener _l)
Removes a listener to the bean. |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int INITIAL_CAPACITY
protected static final int INITIAL_CAPACITY_2
protected static final int INCREMENT_CAPACITY
private static final long serialVersionUID
protected Node master_
protected ImmutableLeaf[] l_Children_
static final CNodeImpl EMPTY_INSTANCE
protected transient java.beans.PropertyChangeSupport changeSupport_
public static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail |
---|
protected CNodeImpl()
protected CNodeImpl(Node _master) throws CreateError
_master
- is the master of this embedded class
CreateError
- the master is nullMethod Detail |
---|
protected CNodeImpl copy(Node _masterCopy) throws CreateError
_masterCopy
- is the master of the new copy
CreateError
- of the constructor with the same parameters.public int hashCode()
hashCode
in class java.lang.Object
protected final ImmutableLeaf[] getEorL_Children()
protected void addEorChild(ImmutableLeaf _child)
_child
- is a leaf to put in this CNode. No action if null, or already known.
java.lang.InternalError
- if the leaves list is null. If
firePropertyChange() throws an exception, displays an user message.protected void removeEorChild(ImmutableLeaf _child) throws UpDateError
_child
- is a leaf which is in this CNode. No action if null.
UpDateError
- if _child is not known.protected void addPropertyChangeListener(java.beans.PropertyChangeListener _l)
_l
- PropertyChangeListener to addprotected void addPropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
_propertyName
- name of the property_l
- PropertyChangeListener to addprotected void removePropertyChangeListener(java.beans.PropertyChangeListener _l)
_l
- PropertyChangeListener to removeprotected void removePropertyChangeListener(java.lang.String _propertyName, java.beans.PropertyChangeListener _l)
_propertyName
- name of the property_l
- PropertyChangeListener to removepublic java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String _propertyName)
_propertyName
- name of the listened property.
protected void finalizeForBase() throws UpDateError
UpDateError
- if the CNode is unknown of the main ACS (if
it is a clone without setName(), typically)protected void finalizeFromDeserialization()
protected CNodeImpl cloneC(Node _master)
_master
- the clone master
java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object _obj)
equals
in class java.lang.Object
_obj
- Object
public long getSerialVersionUID()
protected void firePropertyChange(java.lang.String _propertyName, java.lang.Object _oldValue, java.lang.Object _newValue)
_propertyName
- name of the changing property_oldValue
- of the property_newValue
- of the property. No operation if equal to _oldValue
and not null.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |