本文整理了Java中org.wso2.carbon.registry.core.Registry.importResource
方法的一些代码示例,展示了Registry.importResource
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Registry.importResource
方法的具体详情如下:
包路径:org.wso2.carbon.registry.core.Registry
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!