@Service public class ContentService extends CMISUtil
CMISUtil.DocumentAspect, CMISUtil.DocumentType, CMISUtil.Priority, CMISUtil.StatusalfrescoHttpClientFactory| Constructor and Description |
|---|
ContentService() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.chemistry.opencmis.client.api.Document |
createDocument(String userName,
String password,
String siteName,
CMISUtil.DocumentType fileType,
File docName,
String docContent)
Create a new document in site
|
org.apache.chemistry.opencmis.client.api.Document |
createDocument(String userName,
String password,
String siteName,
CMISUtil.DocumentType docType,
String docName,
String docContent)
Create a new document in site
|
org.apache.chemistry.opencmis.client.api.Document |
createDocumentInFolder(String userName,
String password,
String siteName,
String folderName,
CMISUtil.DocumentType docType,
String docName,
String docContent)
Create a new document into a folder
|
org.apache.chemistry.opencmis.client.api.Document |
createDocumentInRepository(String userName,
String password,
String path,
CMISUtil.DocumentType docType,
File docName,
String docContent)
Create a new document in repository
If path is NULL, document will be created in ROOT of repository.
|
org.apache.chemistry.opencmis.client.api.Document |
createDocumentInRepository(String userName,
String password,
String path,
CMISUtil.DocumentType docType,
String docName,
String docContent)
Create a new document in repository
If path is NULL, document will be created in ROOT of repository.
|
org.apache.chemistry.opencmis.client.api.Folder |
createFolder(String userName,
String password,
String folderName,
String siteName)
Create a new folder in site
|
org.apache.chemistry.opencmis.client.api.Folder |
createFolderInRepository(String userName,
String password,
String folderName,
String path)
Create a new folder by path in repository
If path is NULL, folder will be created in ROOT of repository.
|
void |
deleteContentByPath(String userName,
String password,
String path)
Delete a folder or document by path
If the folder is in 'Company Home' set the folder or document name in path.
|
void |
deleteDocument(String userName,
String password,
String siteName,
String docName)
Delete a document
|
void |
deleteFiles(String userName,
String password,
String siteName,
String... fileNames)
Delete multiple files (from root or from folder) using CMIS (in root or in folder)
|
void |
deleteFolder(String userName,
String password,
String siteName,
String folderName)
Delete a folder from site
|
boolean |
deleteTree(String userName,
String password,
String siteName,
String folderName)
Delete a parent folder that has children in site
|
void |
deleteTreeByPath(String userName,
String password,
String pathToFolder)
Delete a parent folder that has children in repository
If folder is in root of repository, set PATH to NULL.
|
String |
getDocumentContent(String userName,
String password,
String siteName,
String docName)
Get the content from a document
|
boolean |
updateDocumentContent(String userName,
String password,
String siteName,
CMISUtil.DocumentType docType,
String docName,
String newContent)
Update content of a document
|
org.apache.chemistry.opencmis.client.api.Document |
uploadFileInRepository(String userName,
String password,
String pathInRepo,
String pathToFile)
Upload a single file in repository from a location on disk.
|
org.apache.chemistry.opencmis.client.api.Document |
uploadFileInSite(String userName,
String password,
String siteName,
String pathToFile)
Upload a single file in site from a location on disk.
|
List<org.apache.chemistry.opencmis.client.api.Document> |
uploadFiles(String filesPath,
String userName,
String password,
String siteName)
Upload files from a physical location
|
List<org.apache.chemistry.opencmis.client.api.Document> |
uploadFilesInFolder(String filesPath,
String userName,
String password,
String siteName,
String folderName)
Upload files in a folder from a physical location
|
addAspect, addProperties, attachDocuments, closeStreams, getCategoryNodeRef, getCmisObject, getCmisObject, getCMISSession, getDocumentObject, getFolderObject, getNodeRef, getNodeRef, getNodeRefByPath, getNodeRefByPath, getProperties, getPropertyValue, getUserNodeRef, getValues, waitInSecondspublic org.apache.chemistry.opencmis.client.api.Folder createFolder(String userName, String password, String folderName, String siteName)
userName - login usernamepassword - login passwordfolderName - folder namesiteName - site nameFolder CMIS folder objectpublic org.apache.chemistry.opencmis.client.api.Folder createFolderInRepository(String userName, String password, String folderName, String path)
userName - login usernamepassword - login passwordfolderName - folder namepath - (e.g: 'Shared', 'Data Dictionary/Scripts)public void deleteFolder(String userName, String password, String siteName, String folderName)
userName - login usernamepassword - login passwordsiteName - site namefolderName - folder nameorg.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException - if invalid folder
or if folder has items in it.public void deleteContentByPath(String userName, String password, String path)
userName - login usernamepassword - login passwordpath - String path to folder or document(e.g.: Shared/file.docx, Guest Home/folder)org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException - if errorpublic org.apache.chemistry.opencmis.client.api.Document createDocument(String userName, String password, String siteName, CMISUtil.DocumentType fileType, File docName, String docContent)
userName - login usernamepassword - login passwordsiteName - site namefileType - DocumentType file typedocName - String file namedocContent - file contentDocument CMIS document objectpublic org.apache.chemistry.opencmis.client.api.Document createDocument(String userName, String password, String siteName, CMISUtil.DocumentType docType, String docName, String docContent)
userName - login usernamepassword - login passwordsiteName - site namedocType - DocumentType file typedocName - file namedocContent - file contentDocument CMIS document objectpublic org.apache.chemistry.opencmis.client.api.Document createDocumentInRepository(String userName, String password, String path, CMISUtil.DocumentType docType, String docName, String docContent)
userName - login usernamepassword - login passwordpath - where to create the document(e.g.: Shared, Data Dictionary/Messages)docType - DocumentType file typedocName - file namedocContent - file contentDocument CMIS document objectpublic org.apache.chemistry.opencmis.client.api.Document createDocumentInRepository(String userName, String password, String path, CMISUtil.DocumentType docType, File docName, String docContent)
userName - login usernamepassword - login passwordpath - where to create the document(e.g.: Shared, Data Dictionary/Messages)docType - DocumentType file typedocName - File file namedocContent - file contentpublic org.apache.chemistry.opencmis.client.api.Document createDocumentInFolder(String userName, String password, String siteName, String folderName, CMISUtil.DocumentType docType, String docName, String docContent)
userName - login usernamepassword - login passwordsiteName - site namefolderName - folder namedocType - DocumentType file typedocName - file namedocContent - file contentDocument CMIS document objectpublic void deleteDocument(String userName, String password, String siteName, String docName)
userName - login usernamepassword - login passwordsiteName - site namedocName - file namepublic boolean deleteTree(String userName, String password, String siteName, String folderName)
userName - login usernamepassword - login passwordsiteName - site namefolderName - folder namepublic void deleteTreeByPath(String userName, String password, String pathToFolder)
userName - login usernamepassword - login passwordpath - path to folder (e.g. 'Shared')public org.apache.chemistry.opencmis.client.api.Document uploadFileInSite(String userName, String password, String siteName, String pathToFile)
userName - login usernamepassword - user passwordsiteName - site namepathToFile - path to fileDocumentt uploaded filepublic org.apache.chemistry.opencmis.client.api.Document uploadFileInRepository(String userName, String password, String pathInRepo, String pathToFile)
userName - login usernamepassword - user passwordpathInRepo - path in repository. If NULL, ROOT is set!pathToFile - path to fileDocument uploaded filepublic List<org.apache.chemistry.opencmis.client.api.Document> uploadFiles(String filesPath, String userName, String password, String siteName)
filesPath - physical path where the files are storeduserName - login usernamepassword - user passwordsiteName - site namepublic List<org.apache.chemistry.opencmis.client.api.Document> uploadFilesInFolder(String filesPath, String userName, String password, String siteName, String folderName)
filesPath - physical path where the files are storeduserName - login usernamepassword - user passwordsiteName - site namefolderName - folder name where files are uploadedpublic void deleteFiles(String userName, String password, String siteName, String... fileNames)
userName - login usernamepassword - user passwordsiteName - site namefileNames - names of files to be deletedpublic String getDocumentContent(String userName, String password, String siteName, String docName)
userName - login usernamepassword - login passwordsiteName - site namedocName - file namepublic boolean updateDocumentContent(String userName, String password, String siteName, CMISUtil.DocumentType docType, String docName, String newContent)
userName - login usernamepassword - login passwordsiteName - site namedocType - file typedocName - file name to be updatednewContent - new content of the fileCopyright © 2016 Alfresco Software. All rights reserved.