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

x33g5p2x  于2022-01-28 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(120)

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

Registry.importResource介绍

暂无

代码示例

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

private void addPolicyImportys(RequestContext context, String version) throws RegistryException {
  /* storing policyReferences in to Registry if available in the WSDL */
  for (WSDLInfo wsdlInfo : wsdls.values()) {
    if(wsdlInfo.isExistPolicyReferences()){
      Iterator iter = wsdlInfo.getPolicyDependencies().iterator();
      while(iter.hasNext()){
        String policyURL = (String)iter.next();
        boolean lockAlreadyAcquired = !CommonUtil.isUpdateLockAvailable();
        CommonUtil.releaseUpdateLock();
        try{
          Resource policyResource = registry.newResource();
          policyResource.setMediaType("application/policy+xml");
          String path = policyURL.substring(policyURL.lastIndexOf(RegistryConstants.PATH_SEPARATOR) + 1);
          if(policyURL.lastIndexOf(RegistryConstants.PATH_SEPARATOR) > 0){
            policyResource.setProperty("version", version);
            policyResource.setProperties(copyProperties(context));
            String policyPath = registry.importResource(path ,policyURL,policyResource);
            registry.addAssociation(policyPath, wsdlInfo.getProposedRegistryURL(), CommonConstants.USED_BY);
            registry.addAssociation(wsdlInfo.getProposedRegistryURL(), policyPath, CommonConstants.DEPENDS);
          }
        }finally {
          if (lockAlreadyAcquired) {
            CommonUtil.acquireUpdateLock();
          }
        }
      }
    }
  }
}

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

} else {
  registry.importResource(tmpPath, url, policyResource);

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

} else {
  registry.importResource(tmpPath, url, schemaResource);

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

} else {
  registry.importResource(tmpPath, url, wsdlResource);

相关文章