org.apache.airavata.persistance.registry.jpa.resources
Class ProjectResource

java.lang.Object
  extended by org.apache.airavata.persistance.registry.jpa.resources.AbstractResource
      extended by org.apache.airavata.persistance.registry.jpa.resources.ProjectResource
All Implemented Interfaces:
Resource

public class ProjectResource
extends AbstractResource


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.airavata.persistance.registry.jpa.resources.AbstractResource
AbstractResource.ApplicationDescriptorConstants, AbstractResource.ConfigurationConstants, AbstractResource.ExperimentConstants, AbstractResource.ExperimentDataConstants, AbstractResource.GatewayConstants, AbstractResource.GatewayWorkerConstants, AbstractResource.GramDataConstants, AbstractResource.HostDescriptorConstants, AbstractResource.NodeDataConstants, AbstractResource.ProjectConstants, AbstractResource.PublishedWorkflowConstants, AbstractResource.ServiceDescriptorConstants, AbstractResource.UserConstants, AbstractResource.UserWorkflowConstants, AbstractResource.WorkflowDataConstants
 
Field Summary
 
Fields inherited from class org.apache.airavata.persistance.registry.jpa.resources.AbstractResource
APPLICATION_DESCRIPTOR, CONFIGURATION, EXPERIMENT, EXPERIMENT_DATA, EXPERIMENT_METADATA, GATEWAY, GATEWAY_WORKER, HOST_DESCRIPTOR, PROJECT, PUBLISHED_WORKFLOW, SERVICE_DESCRIPTOR, USER_WORKFLOW, USERS, WORKFLOW_DATA
 
Constructor Summary
ProjectResource()
           
ProjectResource(WorkerResource worker, GatewayResource gateway, String projectName)
           
 
Method Summary
 Resource create(ResourceType type)
          This method will create associate resource objects for the given resource type.
 ExperimentResource createExperiment(String experimentId)
           
 List<Resource> get(ResourceType type)
          This method will list all the child resources for the given resource type
 Resource get(ResourceType type, Object name)
          This method will return the given child resource from the database
 ExperimentResource getExperiment(String experimentId)
           
 List<ExperimentResource> getExperiments()
           
 GatewayResource getGateway()
           
 String getName()
           
 WorkerResource getWorker()
           
 boolean isExperimentExists(String experimentId)
           
 List<Resource> populate(Object[] keys)
           
 void remove(ResourceType type, Object name)
          This method will remove the given child resource from the database
 void removeExperiment(String experimentId)
           
 void save()
          save project to the database
 void setGateway(GatewayResource gateway)
           
 void setName(String name)
           
 void setWorker(WorkerResource worker)
           
 
Methods inherited from class org.apache.airavata.persistance.registry.jpa.resources.AbstractResource
getResourceList, isExists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectResource

public ProjectResource()

ProjectResource

public ProjectResource(WorkerResource worker,
                       GatewayResource gateway,
                       String projectName)
Parameters:
worker - gateway worker
gateway - gateway
projectName - project name
Method Detail

create

public Resource create(ResourceType type)
Description copied from interface: Resource
This method will create associate resource objects for the given resource type.

Parameters:
type - child resource type
Returns:
child resource

remove

public void remove(ResourceType type,
                   Object name)
Description copied from interface: Resource
This method will remove the given child resource from the database

Parameters:
type - child resource type
name - child resource name

get

public Resource get(ResourceType type,
                    Object name)
Description copied from interface: Resource
This method will return the given child resource from the database

Parameters:
type - child resource type
name - child resource name
Returns:
child resource

populate

public List<Resource> populate(Object[] keys)
Parameters:
keys - project name
Returns:
project resource

get

public List<Resource> get(ResourceType type)
Description copied from interface: Resource
This method will list all the child resources for the given resource type

Parameters:
type - child resource type
Returns:
list of child resources

save

public void save()
save project to the database


getName

public String getName()
Returns:
project name

setName

public void setName(String name)
Parameters:
name - project name

getWorker

public WorkerResource getWorker()
Returns:
gateway worker

setWorker

public void setWorker(WorkerResource worker)
Parameters:
worker - gateway worker

getGateway

public GatewayResource getGateway()
Returns:
gateway resource

setGateway

public void setGateway(GatewayResource gateway)
Parameters:
gateway - gateway resource

isExperimentExists

public boolean isExperimentExists(String experimentId)
Parameters:
experimentId - experiment ID
Returns:
whether the experiment exist

createExperiment

public ExperimentResource createExperiment(String experimentId)
Parameters:
experimentId - experiment ID
Returns:
experiment resource

getExperiment

public ExperimentResource getExperiment(String experimentId)
Parameters:
experimentId - experiment ID
Returns:
experiment resource

getExperiments

public List<ExperimentResource> getExperiments()
Returns:
list of experiments

removeExperiment

public void removeExperiment(String experimentId)
Parameters:
experimentId - experiment ID


Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.