当前位置: 首页>>代码示例>>Java>>正文


Java RegistryException.getMessage方法代码示例

本文整理汇总了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;
}
 
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:17,代码来源:ConfigurationManagerUtil.java

示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:14,代码来源:DeviceTypeUtils.java

示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:13,代码来源:DeviceTypeUtils.java

示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:11,代码来源:DeviceTypeUtils.java

示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:13,代码来源:GeoLocationProviderServiceImpl.java

示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:13,代码来源:PermissionUtils.java

示例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);
    }
}
 
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:13,代码来源:PermissionUtils.java

示例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);
	}
}
 
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:13,代码来源:ConfigurationManagerUtil.java

示例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);
	}
}
 
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:12,代码来源:ConfigurationManagerUtil.java


注:本文中的org.wso2.carbon.registry.api.RegistryException.getMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。