g-Eclipse
Release 1.0.0

eu.geclipse.core.model.impl
Class ContainerMarker

java.lang.Object
  extended by PlatformObject
      extended by eu.geclipse.core.model.impl.AbstractGridElement
          extended by eu.geclipse.core.model.impl.ContainerMarker
All Implemented Interfaces:
IGridElement

public class ContainerMarker
extends AbstractGridElement

Child of container that may be used to mark the container as invalid or empty.


Nested Class Summary
static class ContainerMarker.MarkerType
          The type of this marker.
 
Constructor Summary
ContainerMarker(IGridContainer container, ContainerMarker.MarkerType type, java.lang.String message)
          Create a new container marker of the specified type.
 
Method Summary
static ContainerMarker getEmptyFolderMarker(IGridContainer container)
           
static ContainerMarker getErrorMarker(IGridContainer container, java.lang.Throwable t)
           
 IFileStore getFileStore()
          Get the file store that this element is associated with.
 java.lang.String getName()
          Get the name of this element.
 IGridContainer getParent()
          Get the parent element of this element.
 IPath getPath()
          Get the path of this element relative to the grid root element.
 IResource getResource()
          Get the corresponding resource of this element.
 ContainerMarker.MarkerType getType()
          Get the type of this marker.
 boolean isLocal()
          Determines if this element is local.
 
Methods inherited from class eu.geclipse.core.model.impl.AbstractGridElement
dispose, getAdapter, getProject, isHidden, isVirtual
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerMarker

public ContainerMarker(IGridContainer container,
                       ContainerMarker.MarkerType type,
                       java.lang.String message)
Create a new container marker of the specified type.

Parameters:
container - The container, i.e. the parent.
type - The type of this marker, i.e. either INFO or error.
message - Message to be displayed.
Method Detail

getEmptyFolderMarker

public static ContainerMarker getEmptyFolderMarker(IGridContainer container)

getErrorMarker

public static ContainerMarker getErrorMarker(IGridContainer container,
                                             java.lang.Throwable t)

getFileStore

public IFileStore getFileStore()
Description copied from interface: IGridElement
Get the file store that this element is associated with. May return null if there is no such associated file store. If this element is not virtual the filestore corresponds to the file store of the corresponding resource.

Returns:
The corresponding file store.

getName

public java.lang.String getName()
Description copied from interface: IGridElement
Get the name of this element. The names of all children of a container have to be unique within this container. If this element is not virtual the name is the name of the corresponding resource.

Returns:
The name of this element.

getParent

public IGridContainer getParent()
Description copied from interface: IGridElement
Get the parent element of this element. The parent can only be an IGridContainer. This method may not return null since the only element that is allowed to return null is the IGridRoot which is a singleton and is internally defined within the model.

Returns:
The parent container of this element.

getPath

public IPath getPath()
Description copied from interface: IGridElement
Get the path of this element relative to the grid root element. If this element is not virtual this has to be the path of the corresponding @IResource.

Returns:
The path of this element relative to the grid root.

getResource

public IResource getResource()
Description copied from interface: IGridElement
Get the corresponding resource of this element. This may be null if - and only if - this element is virtual.

Returns:
The corresponding resource or null if this element is virtual.

getType

public ContainerMarker.MarkerType getType()
Get the type of this marker.

Returns:
The marker's type.

isLocal

public boolean isLocal()
Description copied from interface: IGridElement
Determines if this element is local. A local element has to be any related item (not necessarily an IResource) that is local in the means that it is located on the local machine.

Returns:
True if this element is local.

g-Eclipse
Release 1.0.0