com.ibm.carma.ui.mapper
Interface ICARMANavigable

All Known Subinterfaces:
ICARMAResourceReference

public interface ICARMANavigable

Interface for navigating hierarchical structures in an abstract manner.

This interface is not finalized and subject to change

Since:
7.0

Method Summary
 void accept(IReferenceVisitor visitor)
          Accepts the given visitor.
 CARMAResource create(org.eclipse.core.runtime.IProgressMonitor monitor, ResourceContainer parentContainer, CarmaTaskMemento momento)
          Creates the given navigable resource as a new item in the CARMA hierachy.
 java.util.Collection<? extends ICARMANavigable> getChildren()
          Retrieves the children of the current navigable item.
 java.lang.Object getLocalResource()
          Return the local resource being navigated
 java.lang.String getLocalResourceName()
          Return the name of the navigable resource
 boolean isContainer()
          Returns a value of true if the resource being navigated is a container (node)
 boolean isMember()
          Returns a value of true if the resource being navigated is a member (leaf)
 

Method Detail

getLocalResourceName

java.lang.String getLocalResourceName()
Return the name of the navigable resource

Returns:
resource name

getLocalResource

java.lang.Object getLocalResource()
Return the local resource being navigated

Returns:
internal resource representation

isContainer

boolean isContainer()
Returns a value of true if the resource being navigated is a container (node)

Returns:
true if container

isMember

boolean isMember()
Returns a value of true if the resource being navigated is a member (leaf)

Returns:
true if member

getChildren

java.util.Collection<? extends ICARMANavigable> getChildren()
Retrieves the children of the current navigable item. The method may return null if the isContainer() method returns false.

Returns:
children of the navigable container

accept

void accept(IReferenceVisitor visitor)
            throws org.eclipse.core.runtime.CoreException
Accepts the given visitor.

The visitor's visit method is called with this navigable resource. If the visitor returns true, this method visits this navigable children.

Parameters:
visitor - the visitor
Throws:
org.eclipse.core.runtime.CoreException - if this method fails. Reasons include:
  • This navigable resource does not exist.
  • The visitor failed with this exception.

create

CARMAResource create(org.eclipse.core.runtime.IProgressMonitor monitor,
                     ResourceContainer parentContainer,
                     CarmaTaskMemento momento)
                     throws org.eclipse.core.runtime.CoreException,
                            NotConnectedException,
                            UnsupportedCARMAOperationException
Creates the given navigable resource as a new item in the CARMA hierachy.

Parameters:
monitor - monitor for the operation
parentContainer - the parent container for the create operation
momento - momento for the current create task
Throws:
org.eclipse.core.runtime.CoreException - an error occured during the create execution
NotConnectedException - The action could not be performed because the CARMA connection or Repository Manager is not active.
UnsupportedCARMAOperationException - The action could not be performed because the action is not supported by the Repository Manager on the host