gr.uoa.di.madgik.workflow.adaptor.utils.grid
Class AdaptorGridResources

java.lang.Object
  extended by gr.uoa.di.madgik.workflow.adaptor.utils.grid.AdaptorGridResources
All Implemented Interfaces:
IAdaptorResources

public class AdaptorGridResources
extends Object
implements IAdaptorResources

The Class AdaptorGridResources acts as a container for AttachedGridResource instances that are to be supplied to an WorkflowGridAdaptor. The resources that are provided must comply to some restrictions. These are: - There must be exactly one resource of type AttachedGridResource.ResourceType.JDL. In subsequent versions there will be an option available to submit more JDL files that will be submitted with the "collection" attribute - There can be at most 1 resource of type AttachedGridResource.ResourceType.Config - There must be exactly one resource of type AttachedGridResource.ResourceType.UserProxy

Author:
gpapanikos

Field Summary
 Set<AttachedGridResource> Resources
          The contained Resources
 
Constructor Summary
AdaptorGridResources()
           
 
Method Summary
 AttachedGridResource GetConfigResource()
          Gets the config resource.
 Set<AttachedGridResource> GetInDataResources()
          Gets the in data resources.
 AttachedGridResource GetJDLResource()
          Gets the JDL resource.
 Set<AttachedGridResource> GetOutDataResources()
          Gets the out data resources.
 AttachedGridResource GetResource(String ResourceKey)
          Retrieves the resource with the provided key
 AttachedGridResource GetScopeResource()
           
 AttachedGridResource GetUserProxyResource()
          Gets the user proxy resource.
 boolean ResourceExists(String ResourceKey)
          Checks if a resource exists.
 void StoreResources(Set<AttachedGridResource.ResourceType> ResourcesToStore, gr.uoa.di.madgik.environment.hint.EnvHintCollection Hints)
          Stores the resource in the storage system
 void Validate()
          Validate that the provided resources are the ones that must be present
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Resources

public Set<AttachedGridResource> Resources
The contained Resources

Constructor Detail

AdaptorGridResources

public AdaptorGridResources()
Method Detail

Validate

public void Validate()
              throws WorkflowValidationException
Validate that the provided resources are the ones that must be present

Throws:
WorkflowValidationException - A validation error occurred

ResourceExists

public boolean ResourceExists(String ResourceKey)
Checks if a resource exists.

Parameters:
ResourceKey - the resource key
Returns:
true, if successful

GetResource

public AttachedGridResource GetResource(String ResourceKey)
Retrieves the resource with the provided key

Parameters:
ResourceKey - the resource key
Returns:
the attached grid resource

StoreResources

public void StoreResources(Set<AttachedGridResource.ResourceType> ResourcesToStore,
                           gr.uoa.di.madgik.environment.hint.EnvHintCollection Hints)
                    throws Exception
Stores the resource in the storage system

Parameters:
ResourcesToStore - the resources to store
Throws:
Exception - the exception

GetScopeResource

public AttachedGridResource GetScopeResource()

GetJDLResource

public AttachedGridResource GetJDLResource()
Gets the JDL resource.

Returns:
the attached grid resource

GetConfigResource

public AttachedGridResource GetConfigResource()
Gets the config resource.

Returns:
the attached grid resource

GetUserProxyResource

public AttachedGridResource GetUserProxyResource()
Gets the user proxy resource.

Returns:
the attached grid resource

GetInDataResources

public Set<AttachedGridResource> GetInDataResources()
Gets the in data resources.

Returns:
the set of attached grid resources

GetOutDataResources

public Set<AttachedGridResource> GetOutDataResources()
Gets the out data resources.

Returns:
the set of attached grid resources


Copyright © 2012. All Rights Reserved.