本文整理汇总了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;
}
示例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;
}