org.apache.airavata.persistance.registry.jpa.resources
Class GatewayResource
java.lang.Object
org.apache.airavata.persistance.registry.jpa.resources.AbstractResource
org.apache.airavata.persistance.registry.jpa.resources.GatewayResource
- All Implemented Interfaces:
- Resource
public class GatewayResource
- extends AbstractResource
| 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 |
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GatewayResource
public GatewayResource(String gatewayName)
- Parameters:
gatewayName - gateway name
GatewayResource
public GatewayResource()
getGatewayName
public String getGatewayName()
- Returns:
- gateway name
setGatewayName
public void setGatewayName(String gatewayName)
- Parameters:
gatewayName -
getOwner
public String getOwner()
- Returns:
- owner of the gateway
setOwner
public void setOwner(String owner)
- Parameters:
owner - owner of the gateway
create
public Resource create(ResourceType type)
- Gateway is at the root level. So it can populate his child resources.
Project, User, Published Workflows, User workflows, Host descriptors,
Service Descriptors, Application descriptors and Experiments are all
its children
- Parameters:
type - resource type of the children
- Returns:
- specific child resource type
remove
public void remove(ResourceType type,
Object name)
- Child resources can be removed from a gateway
- Parameters:
type - child resource typename - child resource name
get
public Resource get(ResourceType type,
Object name)
- Gateway can get information of his children
- Parameters:
type - child resource typename - child resource name
- Returns:
- specific child resource type
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 the gateway to the database
isExists
public boolean isExists(ResourceType type,
Object name)
- check whether child resource already exist in the database
- Specified by:
isExists in interface Resource- Overrides:
isExists in class AbstractResource
- Parameters:
type - child resource typename - name of the child resource
- Returns:
- true or false
isHostDescriptorExists
public boolean isHostDescriptorExists(String descriptorName)
- Parameters:
descriptorName - host descriptor name
- Returns:
- whether host descriptor already available
createHostDescriptorResource
public HostDescriptorResource createHostDescriptorResource(String hostDescriptorName)
- Parameters:
hostDescriptorName - host descriptor name
- Returns:
- HostDescriptorResource
getHostDescriptorResource
public HostDescriptorResource getHostDescriptorResource(String hostDescriptorName)
- Parameters:
hostDescriptorName - host descriptor name
- Returns:
- HostDescriptorResource
removeHostDescriptor
public void removeHostDescriptor(String descriptorName)
- Parameters:
descriptorName - host descriptor name
getHostDescriptorResources
public List<HostDescriptorResource> getHostDescriptorResources()
- Returns:
- list of host descriptors available for the gateway
isServiceDescriptorExists
public boolean isServiceDescriptorExists(String descriptorName)
- Parameters:
descriptorName - service descriptor name
- Returns:
- whether service descriptor already available
createServiceDescriptorResource
public ServiceDescriptorResource createServiceDescriptorResource(String descriptorName)
- Parameters:
descriptorName - service descriptor name
- Returns:
- ServiceDescriptorResource
getServiceDescriptorResource
public ServiceDescriptorResource getServiceDescriptorResource(String descriptorName)
- Parameters:
descriptorName - service descriptor name
- Returns:
- ServiceDescriptorResource
removeServiceDescriptor
public void removeServiceDescriptor(String descriptorName)
- Parameters:
descriptorName - Service descriptor name
getServiceDescriptorResources
public List<ServiceDescriptorResource> getServiceDescriptorResources()
- Returns:
- list of service descriptors for the gateway
isApplicationDescriptorExists
public boolean isApplicationDescriptorExists(String descriptorName)
- Parameters:
descriptorName - application descriptor name
- Returns:
- whether application descriptor already available
createApplicationDescriptorResource
public ApplicationDescriptorResource createApplicationDescriptorResource(String descriptorName)
- Parameters:
descriptorName - application descriptor name
- Returns:
- ApplicationDescriptorResource
getApplicationDescriptorResource
public ApplicationDescriptorResource getApplicationDescriptorResource(String descriptorName)
- Parameters:
descriptorName - application descriptor name
- Returns:
- ApplicationDescriptorResource
removeApplicationDescriptor
public void removeApplicationDescriptor(String descriptorName)
- Parameters:
descriptorName - application descriptor name
getApplicationDescriptorResources
public List<ApplicationDescriptorResource> getApplicationDescriptorResources()
- Returns:
- list of application descriptors for the gateway
getApplicationDescriptorResources
public List<ApplicationDescriptorResource> getApplicationDescriptorResources(String serviceName,
String hostName)
- Parameters:
serviceName - service descriptor namehostName - host descriptor name
- Returns:
- list of application descriptors for the gateway
isPublishedWorkflowExists
public boolean isPublishedWorkflowExists(String workflowTemplateName)
- Parameters:
workflowTemplateName - published workflow template name
- Returns:
- boolean - whether workflow with the same name exists
createPublishedWorkflow
public PublishWorkflowResource createPublishedWorkflow(String workflowTemplateName)
- Parameters:
workflowTemplateName - published workflow template name
- Returns:
- publish workflow resource
getPublishedWorkflow
public PublishWorkflowResource getPublishedWorkflow(String workflowTemplateName)
- Parameters:
workflowTemplateName - published workflow template name
- Returns:
- publish workflow resource
getPublishedWorkflows
public List<PublishWorkflowResource> getPublishedWorkflows()
- Returns:
- list of publish workflows for the gateway
removePublishedWorkflow
public void removePublishedWorkflow(String workflowTemplateName)
- Parameters:
workflowTemplateName - published workflow template name
Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.