public abstract class AbstractDocumentFolderServiceImpl extends AlfrescoService implements DocumentFolderService
Modifier and Type | Field and Description |
---|---|
protected org.apache.chemistry.opencmis.client.api.Session |
cmisSession |
CONTENT_CACHE, RENDITION_CACHE, session
FILTER_INCLUDE_LINKS, RENDITION_PREVIEW, RENDITION_THUMBNAIL, SORT_PROPERTY_CREATED_AT, SORT_PROPERTY_DESCRIPTION, SORT_PROPERTY_MODIFIED_AT, SORT_PROPERTY_NAME, SORT_PROPERTY_TITLE
Constructor and Description |
---|
AbstractDocumentFolderServiceImpl(AlfrescoSession repositorySession)
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
Node |
addAspects(Node node,
List<String> aspects)
Adds the given aspects to the given node.
|
Document |
createDocument(Folder parentFolder,
String documentName,
Map<String,Serializable> properties,
ContentFile contentFile)
Creates a document object in the specified location with an optional set
of properties.
|
Document |
createDocument(Folder parentFolder,
String documentName,
Map<String,Serializable> properties,
ContentFile contentFile,
List<String> aspects)
Creates a document object in the specified location with an optional set
of properties.
|
Document |
createDocument(Folder parentFolder,
String documentName,
Map<String,Serializable> properties,
ContentFile contentFile,
List<String> aspects,
String type)
Creates a document object in the specified location with an optional set
of properties.
|
Folder |
createFolder(Folder parentFolder,
String folderName,
Map<String,Serializable> properties)
Creates a folder object in the specified location with an optional set of
properties and aspects.
|
Folder |
createFolder(Folder parentFolder,
String folderName,
Map<String,Serializable> properties,
List<String> aspects)
Creates a folder object in the specified location with an optional set of
properties and aspects.
|
Folder |
createFolder(Folder parentFolder,
String folderName,
Map<String,Serializable> properties,
List<String> aspects,
String type)
Creates a folder object in the specified location with an optional set of
properties and aspects.
|
void |
deleteNode(Node node)
Deletes the specified node.
|
ContentStream |
downloadContentStream(String identifier) |
Node |
getChildByPath(Folder folder,
String relativePathFromFolder)
Gets the node object stored at the relative specified path from the
folder object.
|
Node |
getChildByPath(String path)
Gets the node object stored at the specified path.
|
List<Node> |
getChildren(Folder parentFolder)
Lists all immediate child nodes of the given context folder.
|
PagingResult<Node> |
getChildren(Folder parentFolder,
ListingContext lcontext)
Lists immediate child nodes of the given context folder.
|
ContentFile |
getContent(Document document)
Downloads the content for the given document.
|
ContentStream |
getContentStream(Document document)
Downloads the content for the given document as InputStream.
|
List<Document> |
getDocuments(Folder folder)
Lists all immediate child documents of the given context node Note:
this could be a long list
|
PagingResult<Document> |
getDocuments(Folder folder,
ListingContext listingContext)
Lists all immediate child documents of the given context folder.
|
String |
getDownloadUrl(Document document)
Internal : Retrieves the downloading url for the given document.
|
List<Folder> |
getFolders(Folder parentFolder)
Lists all immediate child folders of the given context folder.
|
PagingResult<Folder> |
getFolders(Folder folder,
ListingContext listingContext)
Lists all immediate child folders of the given context folder.
|
Node |
getNodeByIdentifier(String identifier) |
Folder |
getParentFolder(Node node)
Gets the direct parent folder object.
|
Permissions |
getPermissions(Node node) |
ContentFile |
getRendition(Node node,
String type)
Retrieve a specific type of Rendition for the specified identifier.
|
ContentStream |
getRenditionStream(Node node,
String type)
Retrieve a specific type of Rendition for the specified identifier as
InputStream
|
abstract ContentStream |
getRenditionStream(String identifier,
String type) |
abstract org.apache.chemistry.opencmis.commons.impl.UrlBuilder |
getRenditionUrl(String identifier,
String type) |
Folder |
getRootFolder() |
Node |
refreshNode(Node node)
Returns the latest (and complete) metadata for the provided node.
|
Document |
updateContent(Document content,
ContentFile contentFile)
Updates the content on the given document using the provided local file.
|
Node |
updateProperties(Node node,
Map<String,Serializable> properties)
Updates the properties of the specified node.
|
Node |
updateProperties(Node node,
Map<String,Serializable> properties,
List<String> aspects)
Updates the properties for the given node and applies the given aspects.
|
protected Node |
updateProperties(Node node,
Map<String,Serializable> properties,
List<String> aspects,
boolean propertiesRequired) |
clear, convertException, convertNode, convertNode, convertStatusCode, delete, describeContents, getHttpInvoker, getSessionHttp, isCloudSession, isListNull, isMapNull, isObjectNull, isOnPremiseSession, isStringNull, post, put, read, saveContentStream, writeToParcel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addFavorite, getFavoriteDocuments, getFavoriteDocuments, getFavoriteFolders, getFavoriteFolders, getFavoriteNodes, getFavoriteNodes, isFavorite, removeFavorite
public AbstractDocumentFolderServiceImpl(AlfrescoSession repositorySession)
repositorySession
- : Repository Session.public List<Node> getChildren(Folder parentFolder)
DocumentFolderService.getChildren(Folder, ListingContext)
to change this behaviour.getChildren
in interface DocumentFolderService
parentFolder
- : context folderDocumentFolderService.getChildren(Folder, ListingContext)
public PagingResult<Node> getChildren(Folder parentFolder, ListingContext lcontext)
getChildren
in interface DocumentFolderService
parentFolder
- : context folderlcontext
- : Listing context that define the behaviour of
paging results
ListingContext
public Node getChildByPath(String path)
getChildByPath
in interface DocumentFolderService
path
- : path from the root folder.public Node getChildByPath(Folder folder, String relativePathFromFolder)
getChildByPath
in interface DocumentFolderService
folder
- : context folderrelativePathFromFolder
- : relative path from the root folder.public Node getNodeByIdentifier(String identifier)
getNodeByIdentifier
in interface DocumentFolderService
public Folder getRootFolder()
getRootFolder
in interface DocumentFolderService
public List<Folder> getFolders(Folder parentFolder)
getFolders
in interface DocumentFolderService
parentFolder
- : Parent FolderDocumentFolderService.getFolders(Folder, ListingContext)
public PagingResult<Folder> getFolders(Folder folder, ListingContext listingContext)
getFolders
in interface DocumentFolderService
folder
- : Parent FolderlistingContext
- : : defines the behaviour of paging results
ListingContext
DocumentFolderService.getFolders(Folder)
public List<Document> getDocuments(Folder folder)
getDocuments
in interface DocumentFolderService
folder
- : context folderDocumentFolderService.getDocuments(Folder, ListingContext)
public PagingResult<Document> getDocuments(Folder folder, ListingContext listingContext)
getDocuments
in interface DocumentFolderService
folder
- : context folderlistingContext
- : defines the behavior of paging results
ListingContext
public Folder getParentFolder(Node node)
getParentFolder
in interface DocumentFolderService
node
- : Node object (Folder or Document).public Folder createFolder(Folder parentFolder, String folderName, Map<String,Serializable> properties)
ContentModel
createFolder
in interface DocumentFolderService
folderName
- : Name of the future folderproperties
- : Map of properties to apply to the new folderpublic Folder createFolder(Folder parentFolder, String folderName, Map<String,Serializable> properties, List<String> aspects)
ContentModel
createFolder
in interface DocumentFolderService
folderName
- : Name of the future folderproperties
- : Map of properties to apply to the new folderaspects
- : List of aspects to apply to the new folderpublic Folder createFolder(Folder parentFolder, String folderName, Map<String,Serializable> properties, List<String> aspects, String type)
ContentModel
createFolder
in interface DocumentFolderService
folderName
- : Name of the future folderproperties
- : Map of properties to apply to the new folderaspects
- : List of aspects to apply to the new foldertype
- : custom type of the folder. If null it creates a default
cm:folder.public Document createDocument(Folder parentFolder, String documentName, Map<String,Serializable> properties, ContentFile contentFile)
ContentModel
createDocument
in interface DocumentFolderService
properties
- : (Optional) list of property values that must be
appliedcontentFile
- : (Optional) ContentFile that contains data stream or filepublic Document createDocument(Folder parentFolder, String documentName, Map<String,Serializable> properties, ContentFile contentFile, List<String> aspects)
ContentModel
createDocument
in interface DocumentFolderService
properties
- : (Optional) list of property values that must be
appliedcontentFile
- : (Optional) ContentFile that contains data stream or fileaspects
- : List of aspects to apply to the new folderpublic Document createDocument(Folder parentFolder, String documentName, Map<String,Serializable> properties, ContentFile contentFile, List<String> aspects, String type)
ContentModel
createDocument
in interface DocumentFolderService
properties
- : (Optional) list of property values that must be
appliedcontentFile
- : (Optional) ContentFile that contains data stream or fileaspects
- : List of aspects to apply to the new foldertype
- : custom type of the folder. If null it creates a default
cm:folder.public void deleteNode(Node node)
deleteNode
in interface DocumentFolderService
node
- : Node object (Folder or Document).public Node addAspects(Node node, List<String> aspects)
addAspects
in interface DocumentFolderService
node
- Node to updateaspects
- : list of aspects to applypublic Node updateProperties(Node node, Map<String,Serializable> properties)
updateProperties
in interface DocumentFolderService
node
- : Node to updateproperties
- : Properties to update.public Node updateProperties(Node node, Map<String,Serializable> properties, List<String> aspects)
updateProperties
in interface DocumentFolderService
node
- : Node to updateproperties
- : Properties to update.aspects
- : list of aspects to applyprotected Node updateProperties(Node node, Map<String,Serializable> properties, List<String> aspects, boolean propertiesRequired)
public Document updateContent(Document content, ContentFile contentFile)
updateContent
in interface DocumentFolderService
content
- : Document objectcontentFile
- : File that is going to replace document contentpublic ContentFile getContent(Document document)
getContent
in interface DocumentFolderService
document
- : Document objectpublic ContentStream getContentStream(Document document)
getContentStream
in interface DocumentFolderService
document
- : Document objectpublic ContentStream downloadContentStream(String identifier)
public String getDownloadUrl(Document document)
document
- public abstract ContentStream getRenditionStream(String identifier, String type)
public abstract org.apache.chemistry.opencmis.commons.impl.UrlBuilder getRenditionUrl(String identifier, String type)
public ContentStream getRenditionStream(Node node, String type)
getRenditionStream
in interface DocumentFolderService
node
- : Node (Document in general)type
- : : Type of rendition availablepublic ContentFile getRendition(Node node, String type)
getRendition
in interface DocumentFolderService
node
- : Node (Document in general)type
- : : Type of rendition availablepublic Permissions getPermissions(Node node)
getPermissions
in interface DocumentFolderService
public Node refreshNode(Node node)
DocumentFolderService
refreshNode
in interface DocumentFolderService
Copyright © 2012-2018 Alfresco Software. All Rights Reserved.