Tabnine Logo
FileableCmisObject
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.mule.modules/mule-module-cmis

public List<Folder> getParentFolders(CmisObject cmisObject, String objectId) {
  validateObjectOrId(cmisObject, objectId);
  validateRedundantIdentifier(cmisObject, objectId);
  CmisObject target = getCmisObject(cmisObject, objectId);
  if (target != null && target instanceof FileableCmisObject) {
    return ((FileableCmisObject) target).getParents();
  } else {
    logger.error("Unable to obtain the object reference, so no parent references could be obtained.");
  }
  return Collections.emptyList();
  // End getParentFolders
}
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: net.aequologica.neo/geppaequo-cmis

if (fileableCmisObject instanceof Document) {
  ((Document)fileableCmisObject).delete(true);
  log.info("'{}' document deleted!", fileableCmisObject.getName());
  return;
} else if (fileableCmisObject instanceof Folder) {
origin: ModeShape/modeshape

if (isExistCmisObject(((FileableCmisObject) object).getParents().get(0).getPath() + "/" + after)) {
CmisObject source = object.getParents().get(0);
CmisObject destination = session.getObject(delta.getParentChanges().getNewPrimaryParent());
object.move(source, destination);
String name = object.getName();
if (name.endsWith("-temp")) {
  rename(object, name.replace("-temp", ""));
origin: org.apache.chemistry.opencmis/chemistry-opencmis-test-tck

FileableCmisObject fileableChild = (FileableCmisObject) child;
Set<Action> actions = fileableChild.getAllowableActions().getAllowableActions();
boolean hasObjectParentsAction = actions.contains(Action.CAN_GET_OBJECT_PARENTS);
boolean hasFolderParentAction = actions.contains(Action.CAN_GET_FOLDER_PARENT);
  List<Folder> parents = fileableChild.getParents();
List<String> paths = ((FileableCmisObject) child).getPaths();
origin: org.apache.chemistry.opencmis/chemistry-opencmis-test-tck

f = createResult(FAILURE, inWhat + " query returned an object that should not be there!");
addResult(assertIsTrue(
    topLevelDocs.contains(object.getId()) || topLevelFolders.contains(object.getId()), null, f));
for (Folder parent : object.getParents()) {
  if (testFolder.getId().equals(parent.getId())) {
    found = 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: net.aequologica.neo/geppaequo-cmis

List<String> objectPaths = ((FileableCmisObject)object).getPaths();
if (objectPaths != null) {
  for (String objectPath : objectPaths) {
origin: org.apache.chemistry.opencmis/chemistry-opencmis-test-tck

List<String> paths = ((FileableCmisObject) object).getPaths();
if (object instanceof Folder) {
  f = createResult(FAILURE, "Folder does not have excatly one path! This is an OpenCMIS bug!");
org.apache.chemistry.opencmis.client.apiFileableCmisObject

Javadoc

Fileable CMIS object. A fileable object is an object that can reside in a folder.

Most used methods

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

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Collectors (java.util.stream)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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