本文整理了Java中org.wso2.carbon.registry.core.Collection.setProperty()
方法的一些代码示例,展示了Collection.setProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Collection.setProperty()
方法的具体详情如下:
包路径:org.wso2.carbon.registry.core.Collection
类名称:Collection
方法名:setProperty
暂无
代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel
throws RegistryException, IOException, NoSuchAlgorithmException {
Collection bpelPackage = configRegistry.newCollection();
bpelPackage.setProperty(BPELConstants.BPEL_PACKAGE_PROP_LATEST_CHECKSUM,
Utils.getMD5Checksum(deploymentContext.getBpelArchive()));
if (log.isDebugEnabled()) {
bpelPackage.setProperty(BPELConstants.BPEL_PACKAGE_PROP_STATUS,
BPELConstants.STATUS_FAILED);
bpelPackage.setProperty(BPELConstants.BPEL_PACKAGE_PROP_DEPLOYMENT_ERROR_LOG,
deploymentContext.getDeploymentFailureCause());
bpelPackage.setProperty(BPELConstants.BPEL_PACKAGE_PROP_STATUS,
BPELConstants.STATUS_DEPLOYED);
bpelPackage.setProperty(BPELConstants.BPEL_PACKAGE_PROP_LATEST_VERSION,
Long.toString(deploymentContext.getVersion()));
代码示例来源:origin: org.wso2.carbon/org.wso2.carbon.bam.core
public void updateDataArchivalPeriod(TimeRange timeRange) throws BAMException {
try {
Collection configCollection;
if (registry.resourceExists(BAMRegistryResources.GLOBAL_CONFIG_PATH)) {
configCollection = (Collection)registry.get(BAMRegistryResources.GLOBAL_CONFIG_PATH);
} else {
configCollection = registry.newCollection();
}
configCollection.setProperty(BAMRegistryResources.DATA_RETENTION_PROPERTY, timeRange.toString());
configCollection.setProperty(BAMRegistryResources.DATA_ARCHIVAL_PROPERTY, timeRange.toString());
registry.put(BAMRegistryResources.GLOBAL_CONFIG_PATH, configCollection);
} catch (RegistryException e) {
String msg = "Could not save the data retention policy in registry";
log.error(msg, e);
throw new BAMException(msg, e);
}
}
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.user.mgt
resource.setProperty(UserMgtConstants.DISPLAY_NAME, displayName);
registry.put(resourcePath, resource);
代码示例来源:origin: wso2/carbon-identity-framework
resource.setProperty(UserMgtConstants.DISPLAY_NAME, displayName);
registry.put(resourcePath, resource);
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.user.mgt
resource.setProperty(UserMgtConstants.DISPLAY_NAME, uiPermission.getDisplayName());
registry.put(uiPermission.getResourceId(), resource);
代码示例来源:origin: org.wso2.carbon/org.wso2.carbon.bam.core
public void updateDataRetentionPeriod(TimeRange timeRange) throws BAMException {
try {
Collection configCollection;
if (registry.resourceExists(BAMRegistryResources.GLOBAL_CONFIG_PATH)) {
configCollection = (Collection)registry.get(BAMRegistryResources.GLOBAL_CONFIG_PATH);
} else {
configCollection = registry.newCollection();
}
configCollection.setProperty(BAMRegistryResources.DATA_RETENTION_PROPERTY, timeRange.toString());
registry.put(BAMRegistryResources.GLOBAL_CONFIG_PATH, configCollection);
} catch (RegistryException e) {
String msg = "Could not save the data retention policy in registry";
log.error(msg);
throw new BAMException(msg, e);
}
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions
if (!registry.resourceExists(mountPoint)) {
Collection collection = registry.newCollection();
collection.setProperty(RegistryConstants.REGISTRY_NON_RECURSIVE,
"true");
registry.put(mountPoint, collection);
代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.entitlement
@Override
public void setGlobalPolicyAlgorithm(String policyCombiningAlgorithm) throws EntitlementException {
Registry registry = getGovernanceRegistry();
try {
Collection policyCollection;
if (registry.resourceExists(policyDataCollection)) {
policyCollection = (Collection) registry.get(policyDataCollection);
} else {
policyCollection = registry.newCollection();
}
policyCollection.setProperty("globalPolicyCombiningAlgorithm", policyCombiningAlgorithm);
registry.put(policyDataCollection, policyCollection);
// performing cache invalidation
EntitlementEngine.getInstance().invalidatePolicyCache();
} catch (RegistryException e) {
log.error("Error while updating Global combing algorithm in policy store ", e);
throw new EntitlementException("Error while updating combing algorithm in policy store");
}
}
代码示例来源:origin: wso2/carbon-identity-framework
@Override
public void setGlobalPolicyAlgorithm(String policyCombiningAlgorithm) throws EntitlementException {
Registry registry = getGovernanceRegistry();
try {
Collection policyCollection;
if (registry.resourceExists(policyDataCollection)) {
policyCollection = (Collection) registry.get(policyDataCollection);
} else {
policyCollection = registry.newCollection();
}
policyCollection.setProperty("globalPolicyCombiningAlgorithm", policyCombiningAlgorithm);
registry.put(policyDataCollection, policyCollection);
// performing cache invalidation
EntitlementEngine.getInstance().invalidatePolicyCache();
} catch (RegistryException e) {
log.error("Error while updating Global combing algorithm in policy store ", e);
throw new EntitlementException("Error while updating combing algorithm in policy store");
}
}
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.entitlement
@Override
public void setGlobalPolicyAlgorithm(String policyCombiningAlgorithm) throws EntitlementException {
Registry registry = EntitlementServiceComponent.
getGovernanceRegistry(CarbonContext.getThreadLocalCarbonContext().getTenantId());
try {
Collection policyCollection;
if (registry.resourceExists(policyDataCollection)) {
policyCollection = (Collection) registry.get(policyDataCollection);
} else {
policyCollection = registry.newCollection();
}
policyCollection.setMediaType(PDPConstants.REGISTRY_MEDIA_TYPE);
policyCollection.setProperty("globalPolicyCombiningAlgorithm", policyCombiningAlgorithm);
registry.put(policyDataCollection, policyCollection);
} catch (RegistryException e) {
log.error("Error while updating Global combing algorithm in policy store ", e);
throw new EntitlementException("Error while updating combing algorithm in policy store");
}
}
代码示例来源:origin: wso2/carbon-identity-framework
resource.setProperty(UserMgtConstants.DISPLAY_NAME, uiPermission.getDisplayName());
registry.put(uiPermission.getResourceId(), resource);
代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.entitlement
String noOfPolicies = policyCollection.getProperty(PDPConstants.MAX_POLICY_ORDER);
if (noOfPolicies != null && Integer.parseInt(noOfPolicies) < policy.getPolicyOrder()) {
policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
Integer.toString(policy.getPolicyOrder()));
registry.put(policyPath, policyCollection);
policyOrder = policyOrder + Integer.parseInt(noOfPolicies);
policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
Integer.toString(policyOrder));
resource.setProperty(PDPConstants.POLICY_ORDER, Integer.toString(policyOrder));
代码示例来源:origin: wso2/carbon-identity-framework
String noOfPolicies = policyCollection.getProperty(PDPConstants.MAX_POLICY_ORDER);
if (noOfPolicies != null && Integer.parseInt(noOfPolicies) < policy.getPolicyOrder()) {
policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
Integer.toString(policy.getPolicyOrder()));
registry.put(policyPath, policyCollection);
policyOrder = policyOrder + Integer.parseInt(noOfPolicies);
policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
Integer.toString(policyOrder));
resource.setProperty(PDPConstants.POLICY_ORDER, Integer.toString(policyOrder));
代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.list
collection.setProperty("name", uiPermission.getDisplayName());
systemRegistry.put(resourceId, collection);
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.entitlement
String noOfPolicies = policyCollection.getProperty(PDPConstants.MAX_POLICY_ORDER);
if (noOfPolicies != null && Integer.parseInt(noOfPolicies) < policy.getPolicyOrder()) {
policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
Integer.toString(policy.getPolicyOrder()));
registry.put(policyPath, policyCollection);
policyOrder = policyOrder + Integer.parseInt(noOfPolicies);
policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
Integer.toString(policyOrder));
resource.setProperty(PDPConstants.POLICY_ORDER, Integer.toString(policyOrder));
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.user.mgt
appRoot = (Collection) tenentRegistry.get(APPLICATIONS_PATH);
parent = (Collection) tenentRegistry.newCollection();
parent.setProperty(UserMgtConstants.DISPLAY_NAME, "All Permissions");
parent.setChildren(new String[]{regRoot.getPath(), appRoot.getPath()});
代码示例来源:origin: org.apache.stratos/org.apache.stratos.manager.services.mgt
if (!systemConfigRegistry.resourceExists(path)) {
Collection collection = systemConfigRegistry.newCollection();
collection.setProperty(UserMgtConstants.DISPLAY_NAME, name);
systemConfigRegistry.put(path, collection);
代码示例来源:origin: wso2/carbon-identity-framework
appRoot = (Collection) tenentRegistry.get(APPLICATIONS_PATH);
parent = (Collection) tenentRegistry.newCollection();
parent.setProperty(UserMgtConstants.DISPLAY_NAME, "All Permissions");
parent.setChildren(new String[]{regRoot.getPath(), appRoot.getPath()});
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.user.mgt
appRoot = (Collection) tenentRegistry.get(APPLICATIONS_PATH);
parent = (Collection) tenentRegistry.newCollection();
parent.setProperty(UserMgtConstants.DISPLAY_NAME, "All Permissions");
parent.setChildren(new String[]{regRoot.getPath(), appRoot.getPath()});
代码示例来源:origin: wso2/carbon-identity-framework
appRoot = (Collection) tenentRegistry.get(APPLICATIONS_PATH);
parent = (Collection) tenentRegistry.newCollection();
parent.setProperty(UserMgtConstants.DISPLAY_NAME, "All Permissions");
parent.setChildren(new String[]{regRoot.getPath(), appRoot.getPath()});
内容来源于网络,如有侵权,请联系作者删除!