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


Java PropertiesBean类代码示例

本文整理汇总了Java中org.wso2.carbon.registry.properties.stub.beans.xsd.PropertiesBean的典型用法代码示例。如果您正苦于以下问题:Java PropertiesBean类的具体用法?Java PropertiesBean怎么用?Java PropertiesBean使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PropertiesBean类属于org.wso2.carbon.registry.properties.stub.beans.xsd包,在下文中一共展示了PropertiesBean类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getProperties

import org.wso2.carbon.registry.properties.stub.beans.xsd.PropertiesBean; //导入依赖的package包/类
public PropertiesBean getProperties(HttpServletRequest request) {

        String path = (String) Utils.getParameter(request, "path");
        Boolean view = (Boolean)request.getSession().getAttribute(UIConstants.SHOW_SYSPROPS_ATTR);
        String viewProps;
        if(view != null) {
            if(view.booleanValue()) {
                viewProps = "yes";
            } else {
                viewProps = "no";
            }
        } else {
            viewProps = "no";
        }
        PropertiesBean bean = null;
        try {
            bean = stub.getProperties(path, viewProps);
            if (bean == null) {
                return null;
            }
            if (bean.getLifecycleProperties() == null) {
                bean.setLifecycleProperties(new String[0]);
            }
            if (bean.getSysProperties() == null) {
                bean.setSysProperties(new String[0]);
            }
            if (bean.getValidationProperties() == null) {
                bean.setValidationProperties(new String[0]);
            }
            if (bean.getProperties() == null) {
                bean.setProperties(new Property[0]);
            }
        } catch (Exception e) {
            String msg = "Failed to get properties. " +
                    e.getMessage();
            log.error(msg, e);
            e.printStackTrace();
        }
        return bean;
    }
 
开发者ID:wso2,项目名称:carbon-registry,代码行数:41,代码来源:PropertiesServiceClient.java

示例2: getPropertiesLenght

import org.wso2.carbon.registry.properties.stub.beans.xsd.PropertiesBean; //导入依赖的package包/类
/**
 * Retrieving the length of the properties in selected registry resource
 * 
 * @return
 * @throws RegistryException
 */
public int getPropertiesLenght() throws RegistryException {
	String path = SecureVaultConstants.ENCRYPTED_PROPERTY_CONFIG_REGISTRY_PATH;
	PropertiesBean bean = null;
	try {
		bean = propertAdminServicestub.getProperties(path, "no");
	} catch (Exception axisFault) {
		String msg = "Failed to initiate resource service client. " + axisFault.getMessage();
		log.error(msg, axisFault);
		throw new RegistryException(msg, axisFault);
	}
	return bean.getSysProperties().length;
}
 
开发者ID:wso2,项目名称:carbon-registry,代码行数:19,代码来源:PropertiesServiceClient.java


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