當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。