public class ResourceUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static javax.persistence.EntityManagerFactory |
factory |
| Constructor and Description |
|---|
ResourceUtils() |
| Modifier and Type | Method and Description |
|---|---|
static WorkerResource |
addGatewayWorker(GatewayResource gatewayResource,
UserResource userResource) |
static void |
addUser(String userName,
String password) |
static ConfigurationResource |
createConfiguration(String configKey) |
static Resource |
createGateway(String gatewayName) |
static UserResource |
createUser(String username,
String password) |
static ConfigurationResource |
getConfiguration(String configKey) |
static List<ConfigurationResource> |
getConfigurations(String configKey) |
static javax.persistence.EntityManager |
getEntityManager() |
static Resource |
getGateway(String gatewayName) |
static Resource |
getUser(String userName) |
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 boolean |
isUserExist(String username) |
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() |
public static void reset()
public static javax.persistence.EntityManager getEntityManager()
public static Resource createGateway(String gatewayName) throws RegistryException
gatewayName - RegistryExceptionpublic static UserResource createUser(String username, String password) throws RegistryException
RegistryExceptionpublic static Resource getGateway(String gatewayName) throws RegistryException
RegistryExceptionpublic static void addUser(String userName, String password) throws RegistryException
RegistryExceptionpublic static boolean isUserExist(String username) throws RegistryException
RegistryExceptionpublic static Resource getUser(String userName) throws RegistryException
RegistryExceptionpublic static Resource getWorker(String gatewayName, String userName) throws RegistryException
RegistryExceptionpublic static boolean isGatewayExist(String gatewayName) throws RegistryException
gatewayName - RegistryExceptionpublic static boolean removeGateway(String gatewayName)
gatewayName - public static WorkerResource addGatewayWorker(GatewayResource gatewayResource, UserResource userResource) throws RegistryException
gatewayResource - userResource - RegistryExceptionpublic static boolean removeGatewayWorker(GatewayResource gatewayResource, UserResource userResource)
gatewayResource - userResource - public static List<ConfigurationResource> getConfigurations(String configKey)
configKey - public static ConfigurationResource getConfiguration(String configKey)
configKey - public static boolean isConfigurationExist(String configKey)
configKey - public static ConfigurationResource createConfiguration(String configKey)
configKey - public static void removeConfiguration(String configkey, String configValue) throws RegistryException
configkey - configValue - RegistryExceptionpublic static void removeConfiguration(String configkey) throws RegistryException
configkey - RegistryExceptionpublic static boolean isConfigurationExists(String configKey, String configVal) throws RegistryException
RegistryExceptionCopyright © 2011–2014 The Apache Software Foundation. All rights reserved.