g-Eclipse
Release 1.0.0

eu.geclipse.core.model.impl
Class AbstractVirtualOrganization

java.lang.Object
  extended by PlatformObject
      extended by eu.geclipse.core.model.impl.AbstractGridElement
          extended by eu.geclipse.core.model.impl.AbstractGridContainer
              extended by eu.geclipse.core.model.impl.AbstractVirtualOrganization
All Implemented Interfaces:
IGridContainer, IGridElement, IStorableElement, IVirtualOrganization
Direct Known Subclasses:
GenericVirtualOrganization

public abstract class AbstractVirtualOrganization
extends AbstractGridContainer
implements IVirtualOrganization

Abstract implementation of the IVirtualOrganization interface.


Method Summary
 boolean canContain(IGridElement element)
          Determines if this may contain the specified element.
 void dispose()
          Clean up all resources that this element uses internally.
 IGridApplicationManager getApplicationManager()
          Returns the IGridApplicationManager associated to this VO.
 IGridResource[] getAvailableResources(IGridResourceCategory category, boolean exclusive, IProgressMonitor monitor)
          Gets all available resources of the specified resource category.
 IGridComputing[] getComputing(IProgressMonitor monitor)
           
 IFileStore getFileStore()
          Get the file store that this element is associated with.
 IGridInfoService getInfoService()
          Gets the info service of this VO.
 IGridJobService[] getJobSubmissionServices(IProgressMonitor monitor)
          Gets a list of all job submission services that are available for this virtual organization.
 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.
 IGridService[] getServices(IProgressMonitor monitor)
           
 IGridStorage[] getStorage(IProgressMonitor monitor)
           
 IGridResourceCategory[] getSupportedCategories()
          Gets the resource categories that are supported by this VO.
 boolean isLocal()
          Determines if this element is local.
 void load()
          Load the properties of that element.
 void refreshResources(IGridResourceCategory category, IProgressMonitor monitor)
          Reload the resources of the specified category without taking any caching into account.
 void save()
          Write the properties of this element.
 
Methods inherited from class eu.geclipse.core.model.impl.AbstractGridContainer
contains, create, delete, deleteAll, findChild, findChildWithResource, getChildCount, getChildren, hasChildren, isDirty, refresh, setDirty
 
Methods inherited from class eu.geclipse.core.model.impl.AbstractGridElement
getAdapter, getProject, isHidden, isVirtual
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface eu.geclipse.core.model.IVirtualOrganization
getId, getTypeName, getWizardId
 
Methods inherited from interface eu.geclipse.core.model.IGridContainer
contains, create, delete, deleteAll, findChild, findChildWithResource, getChildCount, getChildren, hasChildren, isDirty, isLazy, refresh, setDirty
 
Methods inherited from interface eu.geclipse.core.model.IGridElement
getName, getProject, isHidden, isVirtual
 
Methods inherited from interface eu.geclipse.core.model.IGridElement
getName, getProject, isHidden, isVirtual
 

Method Detail

canContain

public boolean canContain(IGridElement element)
Description copied from interface: IGridContainer
Determines if this may contain the specified element. This method works type specific, i.e. a container may or may not contain elements of a specified type.

Specified by:
canContain in interface IGridContainer
Overrides:
canContain in class AbstractGridContainer
Parameters:
element - The element that may be contained in this container.
Returns:
If this container may contain the specified element.

dispose

public void dispose()
Description copied from interface: IGridElement
Clean up all resources that this element uses internally.

Specified by:
dispose in interface IGridElement
Overrides:
dispose in class AbstractGridContainer

getApplicationManager

public IGridApplicationManager getApplicationManager()
Description copied from interface: IVirtualOrganization
Returns the IGridApplicationManager associated to this VO.

Specified by:
getApplicationManager in interface IVirtualOrganization
Returns:
An IGridApplicationManager or null if this VO does not support application deployment.

getAvailableResources

public IGridResource[] getAvailableResources(IGridResourceCategory category,
                                             boolean exclusive,
                                             IProgressMonitor monitor)
                                      throws ProblemException
Description copied from interface: IVirtualOrganization
Gets all available resources of the specified resource category.

Specified by:
getAvailableResources in interface IVirtualOrganization
Parameters:
category - The resource category.
exclusive - If true only resources are returned that directly match the specified category. Otherwise also resource are returned that match any child category of the specified resource category.
monitor - Use to monitor the progress.
Returns:
An array of available resources.
Throws:
ProblemException - If for any reason the resources could not be fetched from the underlying information service.
See Also:
IGridInfoService.fetchResources(IGridContainer, IVirtualOrganization, IGridResourceCategory, IProgressMonitor)

getComputing

public IGridComputing[] getComputing(IProgressMonitor monitor)
                              throws ProblemException
Throws:
ProblemException

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.

Specified by:
getFileStore in interface IGridElement
Returns:
The corresponding file store.

getInfoService

public IGridInfoService getInfoService()
                                throws ProblemException
Description copied from interface: IVirtualOrganization
Gets the info service of this VO.

Specified by:
getInfoService in interface IVirtualOrganization
Returns:
The info service that can be queried for VO related information.
Throws:
ProblemException - If an error occurs while the service is fetched.

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.

Specified by:
getParent in interface IGridElement
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.

Specified by:
getPath in interface IGridElement
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.

Specified by:
getResource in interface IGridElement
Returns:
The corresponding resource or null if this element is virtual.

getServices

public IGridService[] getServices(IProgressMonitor monitor)
                           throws ProblemException
Throws:
ProblemException

getStorage

public IGridStorage[] getStorage(IProgressMonitor monitor)
                          throws ProblemException
Throws:
ProblemException

getSupportedCategories

public IGridResourceCategory[] getSupportedCategories()
Description copied from interface: IVirtualOrganization
Gets the resource categories that are supported by this VO.

Specified by:
getSupportedCategories in interface IVirtualOrganization
Returns:
The IGridResourceCategory instances supported by this VO.

getJobSubmissionServices

public IGridJobService[] getJobSubmissionServices(IProgressMonitor monitor)
                                           throws ProblemException
Description copied from interface: IVirtualOrganization
Gets a list of all job submission services that are available for this virtual organization.

Specified by:
getJobSubmissionServices in interface IVirtualOrganization
Parameters:
monitor - Used to monitor the progress.
Returns:
A list of all currently available job submission services.
Throws:
ProblemException - If an error occurs while retrieving the services.

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.

Specified by:
isLocal in interface IGridElement
Returns:
True if this element is local.

load

public void load()
          throws ProblemException
Description copied from interface: IStorableElement
Load the properties of that element. That may cause that some predefined properties may be overwritten with the loaded properties. The element itself has to know from where to load itself.

Specified by:
load in interface IStorableElement
Throws:
ProblemException - If an error occurs while loading this element. This is mainly due to IOExceptions.

refreshResources

public void refreshResources(IGridResourceCategory category,
                             IProgressMonitor monitor)
                      throws ProblemException
Description copied from interface: IVirtualOrganization
Reload the resources of the specified category without taking any caching into account.

Specified by:
refreshResources in interface IVirtualOrganization
Parameters:
category - The resource category to be refreshed.
monitor - Used to monitor the progress.
Throws:
ProblemException - If an error occurs while refreshing the resources.

save

public void save()
          throws ProblemException
Description copied from interface: IStorableElement
Write the properties of this element. The element itself has to know where to save itself.

Specified by:
save in interface IStorableElement
Throws:
ProblemException - If an error occurs while saving this element. This is mainly due to IOExceptions.

g-Eclipse
Release 1.0.0