本文整理汇总了Java中org.wso2.carbon.registry.api.RegistryException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java RegistryException.getMessage方法的具体用法?Java RegistryException.getMessage怎么用?Java RegistryException.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.wso2.carbon.registry.api.RegistryException
的用法示例。
在下文中一共展示了RegistryException.getMessage方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: putRegistryResource
import org.wso2.carbon.registry.api.RegistryException; //导入方法依赖的package包/类
public static boolean putRegistryResource(String path,
Resource resource)
throws ConfigurationManagementException {
boolean status;
try {
ConfigurationManagerUtil.getConfigurationRegistry().beginTransaction();
ConfigurationManagerUtil.getConfigurationRegistry().put(path, resource);
ConfigurationManagerUtil.getConfigurationRegistry().commitTransaction();
status = true;
} catch (RegistryException e) {
throw new ConfigurationManagementException(
"Error occurred while persisting registry resource : " +
e.getMessage(), e);
}
return status;
}
示例2: getConfigurationRegistry
import org.wso2.carbon.registry.api.RegistryException; //导入方法依赖的package包/类
public static Registry getConfigurationRegistry() throws DeviceTypeMgtPluginException {
try {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
org.wso2.carbon.registry.core.service.RegistryService registryService = DeviceTypeExtensionDataHolder
.getInstance().getRegistryService();
if (registryService == null) {
throw new DeviceTypeMgtPluginException("Registry Service is not initialized properly");
}
return registryService.getConfigSystemRegistry(tenantId);
} catch (RegistryException e) {
throw new DeviceTypeMgtPluginException("Error in retrieving conf registry instance: " + e.getMessage(), e);
}
}
示例3: putRegistryResource
import org.wso2.carbon.registry.api.RegistryException; //导入方法依赖的package包/类
public static boolean putRegistryResource(String path, Resource resource) throws DeviceTypeMgtPluginException {
try {
Registry registry = getConfigurationRegistry();
registry.beginTransaction();
registry.put(path, resource);
registry.commitTransaction();
return true;
} catch (RegistryException e) {
throw new DeviceTypeMgtPluginException(
"Error occurred while persisting registry resource : " + e.getMessage(), e);
}
}
示例4: getRegistryResource
import org.wso2.carbon.registry.api.RegistryException; //导入方法依赖的package包/类
public static Resource getRegistryResource(String path) throws DeviceTypeMgtPluginException {
try {
if(DeviceTypeUtils.getConfigurationRegistry().resourceExists(path)){
return DeviceTypeUtils.getConfigurationRegistry().get(path);
}
return null;
} catch (RegistryException e) {
throw new DeviceTypeMgtPluginException("Error in retrieving registry resource : " + e.getMessage(), e);
}
}
示例5: getGovernanceRegistry
import org.wso2.carbon.registry.api.RegistryException; //导入方法依赖的package包/类
private Registry getGovernanceRegistry() throws GeoLocationBasedServiceException {
try {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
return DeviceManagementDataHolder.getInstance().getRegistryService()
.getGovernanceSystemRegistry(
tenantId);
} catch (RegistryException e) {
throw new GeoLocationBasedServiceException(
"Error in retrieving governance registry instance: " +
e.getMessage(), e);
}
}
示例6: getGovernanceRegistry
import org.wso2.carbon.registry.api.RegistryException; //导入方法依赖的package包/类
public static Registry getGovernanceRegistry() throws PermissionManagementException {
try {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
return DeviceManagementDataHolder.getInstance().getRegistryService()
.getGovernanceSystemRegistry(
tenantId);
} catch (RegistryException e) {
throw new PermissionManagementException(
"Error in retrieving governance registry instance: " +
e.getMessage(), e);
}
}
示例7: getPermission
import org.wso2.carbon.registry.api.RegistryException; //导入方法依赖的package包/类
public static Permission getPermission(String path) throws PermissionManagementException {
try {
Resource resource = PermissionUtils.getGovernanceRegistry().get(path);
Permission permission = new Permission();
permission.setName(resource.getProperty(PERMISSION_PROPERTY_NAME));
permission.setPath(resource.getPath());
return permission;
} catch (RegistryException e) {
throw new PermissionManagementException("Error in retrieving registry resource : " +
e.getMessage(), e);
}
}
示例8: getConfigurationRegistry
import org.wso2.carbon.registry.api.RegistryException; //导入方法依赖的package包/类
public static Registry getConfigurationRegistry() throws ConfigurationManagementException {
try {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
return DeviceManagementDataHolder.getInstance().getRegistryService()
.getConfigSystemRegistry(
tenantId);
} catch (RegistryException e) {
throw new ConfigurationManagementException(
"Error in retrieving governance registry instance: " +
e.getMessage(), e);
}
}
示例9: getRegistryResource
import org.wso2.carbon.registry.api.RegistryException; //导入方法依赖的package包/类
public static Resource getRegistryResource(String path) throws ConfigurationManagementException {
try {
if(ConfigurationManagerUtil.getConfigurationRegistry().resourceExists(path)){
return ConfigurationManagerUtil.getConfigurationRegistry().get(path);
}
return null;
} catch (RegistryException e) {
throw new ConfigurationManagementException("Error in retrieving registry resource : " +
e.getMessage(), e);
}
}