Package org.exoplatform.clouddrive.cmis
Class JCRLocalCMISDrive.FileAPI
- java.lang.Object
-
- org.exoplatform.clouddrive.cmis.JCRLocalCMISDrive.FileAPI
-
- All Implemented Interfaces:
org.exoplatform.services.cms.clouddrives.CloudFileAPI
- Enclosing class:
- JCRLocalCMISDrive
protected class JCRLocalCMISDrive.FileAPI extends Object
CloudFileAPIimplementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classJCRLocalCMISDrive.FileAPI.ContextLocalFileThe Class ContextLocalFile.
-
Constructor Summary
Constructors Modifier Constructor Description protectedFileAPI()Instantiates a new file API.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JCRLocalCMISDrive.LocalFilecontext(String fileId, javax.jcr.Node fileNode)Context.org.exoplatform.services.cms.clouddrives.CloudFilecopyFile(javax.jcr.Node srcFileNode, javax.jcr.Node destFileNode)protected org.exoplatform.services.cms.clouddrives.CloudFilecopyFile(org.apache.chemistry.opencmis.client.api.Document srcFile, org.apache.chemistry.opencmis.client.api.Folder destParent, javax.jcr.Node destFileNode)Copy file.org.exoplatform.services.cms.clouddrives.CloudFilecopyFolder(javax.jcr.Node srcFolderNode, javax.jcr.Node destFolderNode)protected org.exoplatform.services.cms.clouddrives.CloudFilecopyFolder(org.apache.chemistry.opencmis.client.api.Folder srcFolder, org.apache.chemistry.opencmis.client.api.Folder destParent, javax.jcr.Node destFolderNode)Copy folder.org.exoplatform.services.cms.clouddrives.CloudFilecreateFile(javax.jcr.Node fileNode, Calendar created, Calendar modified, String mimeType, InputStream content)org.exoplatform.services.cms.clouddrives.CloudFilecreateFolder(javax.jcr.Node folderNode, Calendar created)protected StringgetVersionSeriesCheckedOutId(javax.jcr.Node node)Value of locally stored cmiscd:versionSeriesCheckedOutId orPathNotFoundExceptionif property cannot be found.protected StringgetVersionSeriesId(javax.jcr.Node fileNode)Value of locally stored cmiscd:versionSeriesId orPathNotFoundExceptionif property cannot be found.booleanisTrashSupported()booleanremoveFile(String id)booleanremoveFolder(String id)org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFilerestore(String id, String path)booleantrashFile(String id)booleantrashFolder(String id)org.exoplatform.services.cms.clouddrives.CloudFileuntrashFile(javax.jcr.Node fileNode)org.exoplatform.services.cms.clouddrives.CloudFileuntrashFolder(javax.jcr.Node folderNode)org.exoplatform.services.cms.clouddrives.CloudFileupdateFile(javax.jcr.Node fileNode, Calendar modified)org.exoplatform.services.cms.clouddrives.CloudFileupdateFileContent(javax.jcr.Node fileNode, Calendar modified, String mimeType, InputStream content)org.exoplatform.services.cms.clouddrives.CloudFileupdateFolder(javax.jcr.Node folderNode, Calendar modified)
-
-
-
Field Detail
-
api
protected final CMISAPI api
Internal API.
-
-
Method Detail
-
context
protected JCRLocalCMISDrive.LocalFile context(String fileId, javax.jcr.Node fileNode)
Context.- Parameters:
fileId- the file idfileNode- the file node- Returns:
- the local file
-
getVersionSeriesId
protected String getVersionSeriesId(javax.jcr.Node fileNode) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
Value of locally stored cmiscd:versionSeriesId orPathNotFoundExceptionif property cannot be found.- Parameters:
fileNode-Node- Returns:
- String with value of cmiscd:versionSeriesId
- Throws:
javax.jcr.PathNotFoundException- if cmiscd:versionSeriesId not foundjavax.jcr.RepositoryException- on storage error
-
getVersionSeriesCheckedOutId
protected String getVersionSeriesCheckedOutId(javax.jcr.Node node) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
Value of locally stored cmiscd:versionSeriesCheckedOutId orPathNotFoundExceptionif property cannot be found.- Parameters:
node- the node- Returns:
- String with value of cmiscd:versionSeriesCheckedOutId
- Throws:
javax.jcr.PathNotFoundException- if cmiscd:versionSeriesCheckedOutId not foundjavax.jcr.RepositoryException- on storage error
-
createFile
public org.exoplatform.services.cms.clouddrives.CloudFile createFile(javax.jcr.Node fileNode, Calendar created, Calendar modified, String mimeType, InputStream content) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
createFolder
public org.exoplatform.services.cms.clouddrives.CloudFile createFolder(javax.jcr.Node folderNode, Calendar created) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
updateFile
public org.exoplatform.services.cms.clouddrives.CloudFile updateFile(javax.jcr.Node fileNode, Calendar modified) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
updateFolder
public org.exoplatform.services.cms.clouddrives.CloudFile updateFolder(javax.jcr.Node folderNode, Calendar modified) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
updateFileContent
public org.exoplatform.services.cms.clouddrives.CloudFile updateFileContent(javax.jcr.Node fileNode, Calendar modified, String mimeType, InputStream content) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
copyFile
public org.exoplatform.services.cms.clouddrives.CloudFile copyFile(javax.jcr.Node srcFileNode, javax.jcr.Node destFileNode) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
copyFile
protected org.exoplatform.services.cms.clouddrives.CloudFile copyFile(org.apache.chemistry.opencmis.client.api.Document srcFile, org.apache.chemistry.opencmis.client.api.Folder destParent, javax.jcr.Node destFileNode) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryExceptionCopy file.- Parameters:
srcFile- the src filedestParent- the dest parentdestFileNode- the dest file node- Returns:
- the cloud file
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exceptionjavax.jcr.RepositoryException- the repository exception
-
copyFolder
public org.exoplatform.services.cms.clouddrives.CloudFile copyFolder(javax.jcr.Node srcFolderNode, javax.jcr.Node destFolderNode) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
copyFolder
protected org.exoplatform.services.cms.clouddrives.CloudFile copyFolder(org.apache.chemistry.opencmis.client.api.Folder srcFolder, org.apache.chemistry.opencmis.client.api.Folder destParent, javax.jcr.Node destFolderNode) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryExceptionCopy folder.- Parameters:
srcFolder- the src folderdestParent- the dest parentdestFolderNode- the dest folder node- Returns:
- the cloud file
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exceptionjavax.jcr.RepositoryException- the repository exception
-
removeFile
public boolean removeFile(String id) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
removeFolder
public boolean removeFolder(String id) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
trashFile
public boolean trashFile(String id) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
trashFolder
public boolean trashFolder(String id) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
untrashFile
public org.exoplatform.services.cms.clouddrives.CloudFile untrashFile(javax.jcr.Node fileNode) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
untrashFolder
public org.exoplatform.services.cms.clouddrives.CloudFile untrashFolder(javax.jcr.Node folderNode) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
isTrashSupported
public boolean isTrashSupported()
-
restore
public org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile restore(String id, String path) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
-