com.intel.gpe.client2.common.panels.remotefs
Class StorageNode

java.lang.Object
  extended by com.intel.gpe.client2.common.panels.tree.BaseNode
      extended by com.intel.gpe.client2.common.panels.remotefs.StorageNode
All Implemented Interfaces:
ObjectWithIcon, RemoteFileChooserNode, StorageOrFileNode, TargetSystemOrChildNode, Node, com.intel.gpe.util.observer.IObserver, java.lang.Comparable<Node>

public class StorageNode
extends BaseNode
implements StorageOrFileNode, com.intel.gpe.util.observer.IObserver, RemoteFileChooserNode

The node representing a remote storage.

Version:
$Id: StorageNode.java,v 1.16 2007/02/20 13:41:52 vashorin Exp $
Author:
Alexander Lukichev

Field Summary
 
Fields inherited from class com.intel.gpe.client2.common.panels.tree.BaseNode
contentsChangeListeners, listeners, nodeChangeListeners
 
Constructor Summary
StorageNode(GridTreeModel model, TargetSystemNode parent, AsyncClient asyncClient, java.lang.String name, com.intel.gpe.clients.api.StorageClient storage, boolean onlyDirectories, MessageAdapter messageAdapter)
          Deprecated. 
StorageNode(GridTreeModel model, TargetSystemNode parent, AsyncClient asyncClient, java.lang.String name, com.intel.gpe.clients.api.StorageClient storage, boolean onlyDirectories, MessageProvider messageProvider)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 com.intel.gpe.clients.api.GridFile getFile()
          Get the remote file
 java.lang.String getIconPath()
           
 PathElement getPathElement()
          Get the path element representing the node.
 ClientWrapper<com.intel.gpe.clients.api.StorageClient,java.lang.String> getStorage()
          Get the storage client associated either with the storage node or the file location.
 java.lang.String getStorageName()
          Get the storage name associated either with the storage node or the file location.
 ClientWrapper<com.intel.gpe.clients.api.TargetSystemClient,java.lang.String> getTargetSystem()
          Get the target system client associated either with the target system node or the storage node or the file location.
 boolean isLeaf()
          Check if the node is a leaf.
 boolean matches(PathElement pathElement)
          Test if the node matches the path element.
 void observableUpdate(java.lang.Object theObserved, java.lang.Object changeCode)
           
 void refresh()
          Refresh the list of the children.
 void requestChildren()
          Get the child nodes.
 void requestContents()
          Get the contents of the node.
 java.lang.String toString()
           
 
Methods inherited from class com.intel.gpe.client2.common.panels.tree.BaseNode
addChildrenChangeListener, addContentsChangeListener, compareTo, executeRequest, getAsyncClient, getChild, getChildCount, getChildren, getContents, getIndex, getMessageAdapter, getMessageProvider, getModel, getPath, notifyContentsChangeListener, notifyNodeChanged, removeChildrenChangeListener, removeContentsChangeListener, setChildren, setContents, setModel, showException
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.intel.gpe.client2.common.panels.tree.Node
getChild, getChildCount, getIndex, getPath
 

Constructor Detail

StorageNode

@Deprecated
public StorageNode(GridTreeModel model,
                              TargetSystemNode parent,
                              AsyncClient asyncClient,
                              java.lang.String name,
                              com.intel.gpe.clients.api.StorageClient storage,
                              boolean onlyDirectories,
                              MessageAdapter messageAdapter)
Deprecated. 


StorageNode

public StorageNode(GridTreeModel model,
                   TargetSystemNode parent,
                   AsyncClient asyncClient,
                   java.lang.String name,
                   com.intel.gpe.clients.api.StorageClient storage,
                   boolean onlyDirectories,
                   MessageProvider messageProvider)
Method Detail

requestChildren

public void requestChildren()
Description copied from class: BaseNode
Get the child nodes. This method is called whenever child nodes must be updated. The implementation should modify (if necessary) the child list with BaseNode.setChildren(List) method.

Specified by:
requestChildren in class BaseNode

requestContents

public void requestContents()
Description copied from class: BaseNode
Get the contents of the node. This may be not children nodes but some other information.

Specified by:
requestContents in class BaseNode

getPathElement

public PathElement getPathElement()
Get the path element representing the node.

Returns:
the path element for the node.

refresh

public void refresh()
Description copied from class: BaseNode
Refresh the list of the children. After the refresh is completed the listeners are invoked.

Overrides:
refresh in class BaseNode

observableUpdate

public void observableUpdate(java.lang.Object theObserved,
                             java.lang.Object changeCode)
Specified by:
observableUpdate in interface com.intel.gpe.util.observer.IObserver

getStorage

public ClientWrapper<com.intel.gpe.clients.api.StorageClient,java.lang.String> getStorage()
Description copied from interface: StorageOrFileNode
Get the storage client associated either with the storage node or the file location.

Specified by:
getStorage in interface StorageOrFileNode
Returns:
The storage.

isLeaf

public boolean isLeaf()
Description copied from interface: Node
Check if the node is a leaf.

Specified by:
isLeaf in interface Node
Returns:
true if the node if a leaf, false otherwise.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getTargetSystem

public ClientWrapper<com.intel.gpe.clients.api.TargetSystemClient,java.lang.String> getTargetSystem()
Description copied from interface: TargetSystemOrChildNode
Get the target system client associated either with the target system node or the storage node or the file location.

Specified by:
getTargetSystem in interface TargetSystemOrChildNode
Returns:
The target system.

getIconPath

public java.lang.String getIconPath()
Specified by:
getIconPath in interface ObjectWithIcon
Overrides:
getIconPath in class BaseNode

matches

public boolean matches(PathElement pathElement)
Description copied from interface: RemoteFileChooserNode
Test if the node matches the path element.

Specified by:
matches in interface RemoteFileChooserNode
Parameters:
pathElement - - the path element to match
Returns:
true if the node matches the supplied path element, false otherwise.

getStorageName

public java.lang.String getStorageName()
Description copied from interface: StorageOrFileNode
Get the storage name associated either with the storage node or the file location.

Specified by:
getStorageName in interface StorageOrFileNode
Returns:
The storage name.

getFile

public com.intel.gpe.clients.api.GridFile getFile()
Description copied from interface: StorageOrFileNode
Get the remote file

Specified by:
getFile in interface StorageOrFileNode
Returns:
the relative path of the remote file


Copyright © 2008. All Rights Reserved.