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

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

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

Collection.setMediaType介绍

暂无

代码示例

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

  1. if (!registry.resourceExists(versionCollectionPath)) {
  2. Collection collection = registry.newCollection();
  3. collection.setMediaType(
  4. CommonConstants.PROCESS_VERSION_COLLECTION_MEDIA_TYPE);
  5. registry.put(versionCollectionPath, collection);
  6. collection.setMediaType(CommonConstants.PROCESS_MAJOR_VERSION_MEDIA_TYPE);
  7. registry.put(majorVersionPath, collection);
  8. collection.setMediaType(CommonConstants.PROCESS_MINOR_VERSION_MEDIA_TYPE);
  9. registry.put(minorVersionPath, collection);
  10. collection.setMediaType(CommonConstants.PROCESS_PATCH_VERSION_MEDIA_TYPE);
  11. registry.put(patchVersionPath, collection);

代码示例来源: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: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

  1. if (!registry.resourceExists(versionCollectionPath)) {
  2. Collection collection = registry.newCollection();
  3. collection.setMediaType(
  4. CommonConstants.SLA_VERSION_COLLECTION_MEDIA_TYPE);
  5. registry.put(versionCollectionPath, collection);
  6. collection.setMediaType(CommonConstants.SLA_MAJOR_VERSION_MEDIA_TYPE);
  7. registry.put(majorVersionPath, collection);
  8. collection.setMediaType(CommonConstants.SLA_MINOR_VERSION_MEDIA_TYPE);
  9. registry.put(minorVersionPath, collection);
  10. collection.setMediaType(CommonConstants.SLA_PATCH_VERSION_MEDIA_TYPE);
  11. registry.put(patchVersionPath, collection);

相关文章