congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
FileableCmisObject.move
Code IndexAdd Tabnine to your IDE (free)

How to use
move
method
in
org.apache.chemistry.opencmis.client.api.FileableCmisObject

Best Java code snippets using org.apache.chemistry.opencmis.client.api.FileableCmisObject.move (Showing top 3 results out of 315)

origin: org.appverse.web.framework.modules.backend.ecm.cmis/appverse-web-modules-backend-ecm-cmis

@Override
public void move(String pathOrigin, String documentNameOrigin, String pathDestination, String documentNameDestination, Session session) throws Exception {
  // Disable cache
  session.getDefaultContext().setCacheEnabled(false);
  // Fetch the object
  FileableCmisObject fileableCmisObject = (FileableCmisObject) FileUtils.getObject(pathOrigin + documentNameOrigin, session);
  // ECM folder paths does not end with "/"
  if (pathOrigin.endsWith("/")) pathOrigin = pathOrigin.substring(0, pathOrigin.length()-1);
  if (pathDestination.endsWith("/")) pathDestination = pathDestination.substring(0, pathDestination.length()-1);
  // Fetch source folder
  CmisObject sourceObject = FileUtils.getObject(pathOrigin, session);
  // Fetch the destination folder
  // We need to make sure the target folder exists
  createFolder(pathDestination);
  CmisObject targetObject = FileUtils.getObject(pathDestination, session);
  if (documentNameDestination != documentNameOrigin){
    fileableCmisObject.rename(documentNameDestination, true);
  }
  // Move the object
  fileableCmisObject.move(sourceObject, targetObject);
  // Enable cache
  session.getDefaultContext().setCacheEnabled(true);
}
origin: org.mule.modules/mule-module-cmis

public FileableCmisObject moveObject(FileableCmisObject cmisObject, String objectId, String sourceFolderId, String targetFolderId) {
  validateObjectOrId(cmisObject, objectId);
  validateRedundantIdentifier(cmisObject, objectId);
  Validate.notEmpty(sourceFolderId, "sourceFolderId is empty");
  Validate.notEmpty(targetFolderId, "targetFolderId is empty");
  FileableCmisObject target = getCmisObject(cmisObject, objectId, FileableCmisObject.class);
  if (target != null) {
    return target.move(new ObjectIdImpl(sourceFolderId), new ObjectIdImpl(targetFolderId));
  } else {
    logger.error("Unable to obtain the object reference in order to perform the object move.");
  }
  return null;
}
origin: ModeShape/modeshape

CmisObject destination = session.getObject(delta.getParentChanges().getNewPrimaryParent());
object.move(source, destination);
org.apache.chemistry.opencmis.client.apiFileableCmisObjectmove

Javadoc

Moves this object.

Popular methods of FileableCmisObject

  • getParents
    Returns the parents of this object.
  • getName
  • getPaths
    Returns the paths of this object.
  • getAllowableActions
  • getId
  • rename

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onCreateOptionsMenu (Activity)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JList (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now