org.apache.airavata.persistance.registry.jpa
Class ResourceUtils

java.lang.Object
  extended by org.apache.airavata.persistance.registry.jpa.ResourceUtils

public class ResourceUtils
extends Object


Field Summary
protected static javax.persistence.EntityManagerFactory factory
           
 
Constructor Summary
ResourceUtils()
           
 
Method Summary
static void addGatewayWorker(GatewayResource gatewayResource, UserResource userResource)
           
static ConfigurationResource createConfiguration(String configKey)
           
static Resource createGateway(String gatewayName)
           
static ConfigurationResource getConfiguration(String configKey)
           
static List<ConfigurationResource> getConfigurations(String configKey)
           
static javax.persistence.EntityManager getEntityManager()
           
static Resource getGateway(String gatewayName)
           
static Lock getLock()
           
static Resource getWorker(String gatewayName, String userName)
           
static boolean isConfigurationExist(String configKey)
           
static boolean isConfigurationExists(String configKey, String configVal)
           
static boolean isGatewayExist(String gatewayName)
           
static void removeConfiguration(String configkey)
           
static void removeConfiguration(String configkey, String configValue)
           
static boolean removeGateway(String gatewayName)
           
static boolean removeGatewayWorker(GatewayResource gatewayResource, UserResource userResource)
           
static void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected static javax.persistence.EntityManagerFactory factory
Constructor Detail

ResourceUtils

public ResourceUtils()
Method Detail

reset

public static void reset()

getEntityManager

public static javax.persistence.EntityManager getEntityManager()

createGateway

public static Resource createGateway(String gatewayName)
Parameters:
gatewayName -
Returns:

getGateway

public static Resource getGateway(String gatewayName)

getWorker

public static Resource getWorker(String gatewayName,
                                 String userName)

isGatewayExist

public static boolean isGatewayExist(String gatewayName)
Parameters:
gatewayName -
Returns:

removeGateway

public static boolean removeGateway(String gatewayName)
Parameters:
gatewayName -
Returns:

addGatewayWorker

public static void addGatewayWorker(GatewayResource gatewayResource,
                                    UserResource userResource)
Parameters:
gatewayResource -
userResource -

removeGatewayWorker

public static boolean removeGatewayWorker(GatewayResource gatewayResource,
                                          UserResource userResource)
Parameters:
gatewayResource -
userResource -
Returns:

getConfigurations

public static List<ConfigurationResource> getConfigurations(String configKey)
Parameters:
configKey -
Returns:

getConfiguration

public static ConfigurationResource getConfiguration(String configKey)
Parameters:
configKey -
Returns:

isConfigurationExist

public static boolean isConfigurationExist(String configKey)
Parameters:
configKey -
Returns:

createConfiguration

public static ConfigurationResource createConfiguration(String configKey)
Parameters:
configKey -
Returns:

removeConfiguration

public static void removeConfiguration(String configkey,
                                       String configValue)
Parameters:
configkey -
configValue -

removeConfiguration

public static void removeConfiguration(String configkey)
Parameters:
configkey -

isConfigurationExists

public static boolean isConfigurationExists(String configKey,
                                            String configVal)

getLock

public static Lock getLock()


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