本文整理了Java中org.wso2.carbon.registry.core.Registry.copy
方法的一些代码示例,展示了Registry.copy
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Registry.copy
方法的具体详情如下:
包路径:org.wso2.carbon.registry.core.Registry
类名称:Registry
方法名:copy
暂无
代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.registry.extensions
protected void doCopy(RequestContext requestContext, String resourcePath, String newPath)
throws RegistryException {
requestContext.getRegistry().copy(resourcePath, newPath);
}
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.jcr
public void copy(String s, String s1) throws ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException {
// A read only session must not be allowed to copy a node
RegistryJCRItemOperationUtil.validateReadOnlyItemOpr(registrySession);
try {
if (userRegistry != null) {
userRegistry.copy(s, s1);
}
} catch (Exception e) {
e.printStackTrace();
}
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.reporting
public void copySavedReport(String name, String newName) throws RegistryException{
boolean reportExist = isReportExist(newName);
if (!reportExist)
{
getConfigSystemRegistry().copy(REPORTING_CONFIG_PATH + RegistryConstants.PATH_SEPARATOR +
name, REPORTING_CONFIG_PATH + RegistryConstants.PATH_SEPARATOR + newName);
}
else
{
String msg = "Report name already exist in the registry";
throw new RegistryException(msg);
}
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions
registry.copy(path, newPath);
Resource r = registry.get(newPath);
registry.addAssociation(newPath, path, "original");
代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.impl
/**
* Copies current Documentation into another version of the same WebApp.
*
* @param toVersion Version to which Documentation should be copied.
* @param apiId id of the APIIdentifier
* @throws org.wso2.carbon.apimgt.api.APIManagementException
* if failed to copy docs
*/
public void copyAllDocumentation(APIIdentifier apiId, String toVersion)
throws AppManagementException {
String oldVersion = AppManagerUtil.getAPIDocPath(apiId);
String newVersion = AppMConstants.API_ROOT_LOCATION + RegistryConstants.PATH_SEPARATOR +
apiId.getProviderName() + RegistryConstants.PATH_SEPARATOR + apiId.getApiName() +
RegistryConstants.PATH_SEPARATOR + toVersion + RegistryConstants.PATH_SEPARATOR +
AppMConstants.DOC_DIR;
try {
Resource resource = registry.get(oldVersion);
if (resource instanceof org.wso2.carbon.registry.core.Collection) {
String[] docsPaths = ((org.wso2.carbon.registry.core.Collection) resource).getChildren();
for (String docPath : docsPaths) {
registry.copy(docPath, newVersion);
}
}
} catch (RegistryException e) {
handleException("Failed to copy docs to new version : " + newVersion, e);
}
}
代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.impl
registry.copy(sourceFilePath, targetFilePath);
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.cmis
/**
* See CMIS 1.0 section 2.2.4.2 createDocumentFromSource
*
* @throws CmisStorageException
*/
public RegistryObject addNodeFromSource(RegistryDocument source, Properties properties) {
try {
String filename = source.getNodeName();
String destPath = getRepository().copy(source.getNode().getPath(), getNode().getPath() + "/" + filename);
RegistryObject gregObject = create(getRepository().get(destPath));
// overlay new properties
if (properties != null && properties.getProperties() != null) {
updateProperties(gregObject.getNode(), gregObject.getTypeId(), properties);
}
//session.save();
return gregObject;
}
catch (RegistryException e) {
String msg = "Failed to add the node " + source.getId();
log.error(msg, e);
throw new CmisStorageException(msg, e);
}
}
代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.cmis
repository.copy(node.getPath(), destPath);
内容来源于网络,如有侵权,请联系作者删除!