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

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

public class HostDescriptorResource
extends AbstractResource


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.airavata.persistance.registry.jpa.resources.AbstractResource
AbstractResource.ApplicationDescriptorConstants, AbstractResource.ConfigurationConstants, AbstractResource.ExecutionErrorConstants, AbstractResource.ExperimentConstants, AbstractResource.ExperimentDataConstants, AbstractResource.GatewayConstants, AbstractResource.GatewayWorkerConstants, AbstractResource.GFacJobDataConstants, AbstractResource.GFacJobStatusConstants, 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, EXECUTION_ERROR, EXPERIMENT, EXPERIMENT_DATA, EXPERIMENT_METADATA, GATEWAY, GATEWAY_WORKER, GFAC_JOB_DATA, GFAC_JOB_STATUS, HOST_DESCRIPTOR, PROJECT, PUBLISHED_WORKFLOW, SERVICE_DESCRIPTOR, USER_WORKFLOW, USERS, WORKFLOW_DATA
 
Constructor Summary
HostDescriptorResource()
           
 
Method Summary
 Resource create(ResourceType type)
          Host descriptor can create an application descriptor
 List<Resource> get(ResourceType type)
          Host descriptors can get a list of application descriptors
 Resource get(ResourceType type, Object name)
          Host descriptor by alone cannot get any other resource types
 String getContent()
           
 String getGatewayName()
           
 String getHostDescName()
           
 String getUserName()
           
 boolean isExists(ResourceType type, Object name)
          This method will check whether an entry from the given resource type and resource name exists in the database
 List<Resource> populate(Object[] keys)
          key should be host_descriptor_name
 void remove(ResourceType type, Object name)
          Host descriptor by alone cannot remove any other resource types
 void save()
          save host descriptor to the database
 void setContent(String content)
           
 void setGatewayName(String gatewayName)
           
 void setHostDescName(String hostDescName)
           
 void setUserName(String userName)
           
 
Methods inherited from class org.apache.airavata.persistance.registry.jpa.resources.AbstractResource
getResourceList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostDescriptorResource

public HostDescriptorResource()
Method Detail

getUserName

public String getUserName()
Returns:
user name

setUserName

public void setUserName(String userName)
Parameters:
userName - user name

getHostDescName

public String getHostDescName()
Returns:
host descriptor name

getGatewayName

public String getGatewayName()
Returns:
gateway name

getContent

public String getContent()
Returns:
content of the host descriptor

setGatewayName

public void setGatewayName(String gatewayName)
Parameters:
gatewayName - gateway name

setContent

public void setContent(String content)
Parameters:
content - content of the host descriptor

create

public Resource create(ResourceType type)
Host descriptor can create an application descriptor

Parameters:
type - child resource type
Returns:
child resource

remove

public void remove(ResourceType type,
                   Object name)
Host descriptor by alone cannot remove any other resource types

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

get

public Resource get(ResourceType type,
                    Object name)
Host descriptor by alone cannot get any other resource types

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

populate

public List<Resource> populate(Object[] keys)
key should be host_descriptor_name

Parameters:
keys - host descriptor names
Returns:
list of host descriptors

get

public List<Resource> get(ResourceType type)
Host descriptors can get a list of application descriptors

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

save

public void save()
save host descriptor to the database


isExists

public boolean isExists(ResourceType type,
                        Object name)
Description copied from interface: Resource
This method will check whether an entry from the given resource type and resource name exists in the database

Specified by:
isExists in interface Resource
Overrides:
isExists in class AbstractResource
Parameters:
type - child resource type
name - child resource name
Returns:
boolean whether the child resource already exists

setHostDescName

public void setHostDescName(String hostDescName)
Parameters:
hostDescName - host descriptor name


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