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

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

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

Registry.move介绍

暂无

代码示例

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

public void move(String s, String s1) throws ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException {
//         A read only session must not be allowed to move a node
    RegistryJCRItemOperationUtil.validateReadOnlyItemOpr(registrySession);
    try {
      if (userRegistry.resourceExists(s)) {

        userRegistry.move(s, s1);
      }
    } catch (RegistryException e) {
      throw new RepositoryException("RegistryException occurred at Registry level");
    }

  }

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

/**
 * See CMIS 1.0 section 2.2.4.13 moveObject
 *
 * @throws CmisStorageException
 */
public RegistryObject move(RegistryFolder parent) {
  try {
    // move it if target location is not same as source location
    //TODO 
    String destPath = CommonUtil.getDestPathOfNode(parent.getNode().getPath(), getNodeName());
    String srcPath  = resource.getPath();
    Resource newNode;
    if (srcPath.equals(destPath)) {
      newNode = resource;
    } else {
      repository.move(srcPath, destPath);
      newNode = repository.get(destPath);
    }
    return create(newNode);
  }
  catch (RegistryException e) {
    String msg = "Failed ot move the object ";
    log.error(msg, e);
    throw new CmisStorageException(msg, e);
  }
}

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

registry.delete(oldArtifact.getPath());
} else if (!oldArtifact.getPath().equals(path)) {
  registry.move(oldArtifact.getPath(), path);

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

getRepository().move(nodePath, destPath);

相关文章