org.wso2.carbon.registry.core.Collection.setProperty()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(9.6k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中org.wso2.carbon.registry.core.Collection.setProperty()方法的一些代码示例,展示了Collection.setProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Collection.setProperty()方法的具体详情如下:
包路径:org.wso2.carbon.registry.core.Collection
类名称:Collection
方法名:setProperty

Collection.setProperty介绍

暂无

代码示例

代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel

  1. throws RegistryException, IOException, NoSuchAlgorithmException {
  2. Collection bpelPackage = configRegistry.newCollection();
  3. bpelPackage.setProperty(BPELConstants.BPEL_PACKAGE_PROP_LATEST_CHECKSUM,
  4. Utils.getMD5Checksum(deploymentContext.getBpelArchive()));
  5. if (log.isDebugEnabled()) {
  6. bpelPackage.setProperty(BPELConstants.BPEL_PACKAGE_PROP_STATUS,
  7. BPELConstants.STATUS_FAILED);
  8. bpelPackage.setProperty(BPELConstants.BPEL_PACKAGE_PROP_DEPLOYMENT_ERROR_LOG,
  9. deploymentContext.getDeploymentFailureCause());
  10. bpelPackage.setProperty(BPELConstants.BPEL_PACKAGE_PROP_STATUS,
  11. BPELConstants.STATUS_DEPLOYED);
  12. bpelPackage.setProperty(BPELConstants.BPEL_PACKAGE_PROP_LATEST_VERSION,
  13. Long.toString(deploymentContext.getVersion()));

代码示例来源:origin: org.wso2.carbon/org.wso2.carbon.bam.core

  1. public void updateDataArchivalPeriod(TimeRange timeRange) throws BAMException {
  2. try {
  3. Collection configCollection;
  4. if (registry.resourceExists(BAMRegistryResources.GLOBAL_CONFIG_PATH)) {
  5. configCollection = (Collection)registry.get(BAMRegistryResources.GLOBAL_CONFIG_PATH);
  6. } else {
  7. configCollection = registry.newCollection();
  8. }
  9. configCollection.setProperty(BAMRegistryResources.DATA_RETENTION_PROPERTY, timeRange.toString());
  10. configCollection.setProperty(BAMRegistryResources.DATA_ARCHIVAL_PROPERTY, timeRange.toString());
  11. registry.put(BAMRegistryResources.GLOBAL_CONFIG_PATH, configCollection);
  12. } catch (RegistryException e) {
  13. String msg = "Could not save the data retention policy in registry";
  14. log.error(msg, e);
  15. throw new BAMException(msg, e);
  16. }
  17. }

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.user.mgt

  1. resource.setProperty(UserMgtConstants.DISPLAY_NAME, displayName);
  2. registry.put(resourcePath, resource);

代码示例来源:origin: wso2/carbon-identity-framework

  1. resource.setProperty(UserMgtConstants.DISPLAY_NAME, displayName);
  2. registry.put(resourcePath, resource);

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.user.mgt

  1. resource.setProperty(UserMgtConstants.DISPLAY_NAME, uiPermission.getDisplayName());
  2. registry.put(uiPermission.getResourceId(), resource);

代码示例来源:origin: org.wso2.carbon/org.wso2.carbon.bam.core

  1. public void updateDataRetentionPeriod(TimeRange timeRange) throws BAMException {
  2. try {
  3. Collection configCollection;
  4. if (registry.resourceExists(BAMRegistryResources.GLOBAL_CONFIG_PATH)) {
  5. configCollection = (Collection)registry.get(BAMRegistryResources.GLOBAL_CONFIG_PATH);
  6. } else {
  7. configCollection = registry.newCollection();
  8. }
  9. configCollection.setProperty(BAMRegistryResources.DATA_RETENTION_PROPERTY, timeRange.toString());
  10. registry.put(BAMRegistryResources.GLOBAL_CONFIG_PATH, configCollection);
  11. } catch (RegistryException e) {
  12. String msg = "Could not save the data retention policy in registry";
  13. log.error(msg);
  14. throw new BAMException(msg, e);
  15. }
  16. }

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

  1. if (!registry.resourceExists(mountPoint)) {
  2. Collection collection = registry.newCollection();
  3. collection.setProperty(RegistryConstants.REGISTRY_NON_RECURSIVE,
  4. "true");
  5. registry.put(mountPoint, collection);

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.entitlement

  1. @Override
  2. public void setGlobalPolicyAlgorithm(String policyCombiningAlgorithm) throws EntitlementException {
  3. Registry registry = getGovernanceRegistry();
  4. try {
  5. Collection policyCollection;
  6. if (registry.resourceExists(policyDataCollection)) {
  7. policyCollection = (Collection) registry.get(policyDataCollection);
  8. } else {
  9. policyCollection = registry.newCollection();
  10. }
  11. policyCollection.setProperty("globalPolicyCombiningAlgorithm", policyCombiningAlgorithm);
  12. registry.put(policyDataCollection, policyCollection);
  13. // performing cache invalidation
  14. EntitlementEngine.getInstance().invalidatePolicyCache();
  15. } catch (RegistryException e) {
  16. log.error("Error while updating Global combing algorithm in policy store ", e);
  17. throw new EntitlementException("Error while updating combing algorithm in policy store");
  18. }
  19. }

代码示例来源:origin: wso2/carbon-identity-framework

  1. @Override
  2. public void setGlobalPolicyAlgorithm(String policyCombiningAlgorithm) throws EntitlementException {
  3. Registry registry = getGovernanceRegistry();
  4. try {
  5. Collection policyCollection;
  6. if (registry.resourceExists(policyDataCollection)) {
  7. policyCollection = (Collection) registry.get(policyDataCollection);
  8. } else {
  9. policyCollection = registry.newCollection();
  10. }
  11. policyCollection.setProperty("globalPolicyCombiningAlgorithm", policyCombiningAlgorithm);
  12. registry.put(policyDataCollection, policyCollection);
  13. // performing cache invalidation
  14. EntitlementEngine.getInstance().invalidatePolicyCache();
  15. } catch (RegistryException e) {
  16. log.error("Error while updating Global combing algorithm in policy store ", e);
  17. throw new EntitlementException("Error while updating combing algorithm in policy store");
  18. }
  19. }

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.entitlement

  1. @Override
  2. public void setGlobalPolicyAlgorithm(String policyCombiningAlgorithm) throws EntitlementException {
  3. Registry registry = EntitlementServiceComponent.
  4. getGovernanceRegistry(CarbonContext.getThreadLocalCarbonContext().getTenantId());
  5. try {
  6. Collection policyCollection;
  7. if (registry.resourceExists(policyDataCollection)) {
  8. policyCollection = (Collection) registry.get(policyDataCollection);
  9. } else {
  10. policyCollection = registry.newCollection();
  11. }
  12. policyCollection.setMediaType(PDPConstants.REGISTRY_MEDIA_TYPE);
  13. policyCollection.setProperty("globalPolicyCombiningAlgorithm", policyCombiningAlgorithm);
  14. registry.put(policyDataCollection, policyCollection);
  15. } catch (RegistryException e) {
  16. log.error("Error while updating Global combing algorithm in policy store ", e);
  17. throw new EntitlementException("Error while updating combing algorithm in policy store");
  18. }
  19. }

代码示例来源:origin: wso2/carbon-identity-framework

  1. resource.setProperty(UserMgtConstants.DISPLAY_NAME, uiPermission.getDisplayName());
  2. registry.put(uiPermission.getResourceId(), resource);

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.entitlement

  1. String noOfPolicies = policyCollection.getProperty(PDPConstants.MAX_POLICY_ORDER);
  2. if (noOfPolicies != null && Integer.parseInt(noOfPolicies) < policy.getPolicyOrder()) {
  3. policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
  4. Integer.toString(policy.getPolicyOrder()));
  5. registry.put(policyPath, policyCollection);
  6. policyOrder = policyOrder + Integer.parseInt(noOfPolicies);
  7. policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
  8. Integer.toString(policyOrder));
  9. resource.setProperty(PDPConstants.POLICY_ORDER, Integer.toString(policyOrder));

代码示例来源:origin: wso2/carbon-identity-framework

  1. String noOfPolicies = policyCollection.getProperty(PDPConstants.MAX_POLICY_ORDER);
  2. if (noOfPolicies != null && Integer.parseInt(noOfPolicies) < policy.getPolicyOrder()) {
  3. policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
  4. Integer.toString(policy.getPolicyOrder()));
  5. registry.put(policyPath, policyCollection);
  6. policyOrder = policyOrder + Integer.parseInt(noOfPolicies);
  7. policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
  8. Integer.toString(policyOrder));
  9. resource.setProperty(PDPConstants.POLICY_ORDER, Integer.toString(policyOrder));

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.list

  1. collection.setProperty("name", uiPermission.getDisplayName());
  2. systemRegistry.put(resourceId, collection);

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.entitlement

  1. String noOfPolicies = policyCollection.getProperty(PDPConstants.MAX_POLICY_ORDER);
  2. if (noOfPolicies != null && Integer.parseInt(noOfPolicies) < policy.getPolicyOrder()) {
  3. policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
  4. Integer.toString(policy.getPolicyOrder()));
  5. registry.put(policyPath, policyCollection);
  6. policyOrder = policyOrder + Integer.parseInt(noOfPolicies);
  7. policyCollection.setProperty(PDPConstants.MAX_POLICY_ORDER,
  8. Integer.toString(policyOrder));
  9. resource.setProperty(PDPConstants.POLICY_ORDER, Integer.toString(policyOrder));

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.user.mgt

  1. appRoot = (Collection) tenentRegistry.get(APPLICATIONS_PATH);
  2. parent = (Collection) tenentRegistry.newCollection();
  3. parent.setProperty(UserMgtConstants.DISPLAY_NAME, "All Permissions");
  4. parent.setChildren(new String[]{regRoot.getPath(), appRoot.getPath()});

代码示例来源:origin: org.apache.stratos/org.apache.stratos.manager.services.mgt

  1. if (!systemConfigRegistry.resourceExists(path)) {
  2. Collection collection = systemConfigRegistry.newCollection();
  3. collection.setProperty(UserMgtConstants.DISPLAY_NAME, name);
  4. systemConfigRegistry.put(path, collection);

代码示例来源:origin: wso2/carbon-identity-framework

  1. appRoot = (Collection) tenentRegistry.get(APPLICATIONS_PATH);
  2. parent = (Collection) tenentRegistry.newCollection();
  3. parent.setProperty(UserMgtConstants.DISPLAY_NAME, "All Permissions");
  4. parent.setChildren(new String[]{regRoot.getPath(), appRoot.getPath()});

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.user.mgt

  1. appRoot = (Collection) tenentRegistry.get(APPLICATIONS_PATH);
  2. parent = (Collection) tenentRegistry.newCollection();
  3. parent.setProperty(UserMgtConstants.DISPLAY_NAME, "All Permissions");
  4. parent.setChildren(new String[]{regRoot.getPath(), appRoot.getPath()});

代码示例来源:origin: wso2/carbon-identity-framework

  1. appRoot = (Collection) tenentRegistry.get(APPLICATIONS_PATH);
  2. parent = (Collection) tenentRegistry.newCollection();
  3. parent.setProperty(UserMgtConstants.DISPLAY_NAME, "All Permissions");
  4. parent.setChildren(new String[]{regRoot.getPath(), appRoot.getPath()});

相关文章