public interface CollectionManager
Modifier and Type | Method and Description |
---|---|
void |
addToCollection(DocumentModel collection,
DocumentModel documentToBeAdded,
CoreSession session)
Add a document to a collection.
|
void |
addToCollection(DocumentModel collection,
List<DocumentModel> documentListToBeAdded,
CoreSession session)
Add a list of document to a collection.
|
void |
addToNewCollection(String newTitle,
String newDescription,
DocumentModel documentToBeAdded,
CoreSession session)
Add a document to a new collection.
|
void |
addToNewCollection(String newTitle,
String newDescription,
List<DocumentModel> documentListToBeAdded,
CoreSession documentManager)
Add a list of document to a new collection.
|
boolean |
canAddToCollection(DocumentModel collection,
CoreSession session)
Check that a document is a collection and that the given core session has permission to add document inside.
|
boolean |
canManage(DocumentModel collection,
CoreSession session)
Check that the given core session has permission to manage the collection.
|
DocumentModel |
createCollection(CoreSession session,
String title,
String description,
String path)
Create a collection with a given name, description and path.
|
void |
doRemoveFromCollection(DocumentModel documentToBeRemoved,
String collectionId,
CoreSession session) |
DocumentModel |
getUserDefaultCollections(DocumentModel context,
CoreSession session)
Get user collections root document.
|
List<DocumentModel> |
getVisibleCollection(DocumentModel collectionMember,
CoreSession session)
Get the list of collection of a document.
|
List<DocumentModel> |
getVisibleCollection(DocumentModel collectionMember,
int maxResult,
CoreSession session)
Get the list of collection of a document.
|
boolean |
hasVisibleCollection(DocumentModel collectionMember,
CoreSession session)
Check that the given core session has READ permission on at least one collection of the given document.
|
boolean |
isCollectable(DocumentModel document)
Check that a document can be added to a collection.
|
boolean |
isCollected(DocumentModel document)
Check that a document has already been added to a collection.
|
boolean |
isCollection(DocumentModel document)
Check that a document is a collection.
|
boolean |
isInCollection(DocumentModel collection,
DocumentModel document,
CoreSession session)
Check whether a document is in a given collection.
|
boolean |
moveMembers(CoreSession session,
DocumentModel collection,
DocumentModel member1,
DocumentModel member2)
Move the member1 right after the member2 within the collection.
|
void |
processCopiedCollection(DocumentModel collection)
Update all documents referenced by a collection to add a reference back the collection.
|
void |
processRemovedCollection(DocumentModel collection)
Update all documents referenced by a collection to remove the reference to the collection.
|
void |
processRemovedCollectionMember(DocumentModel collectionMember)
Update all collections referenced by a document.
|
void |
processRestoredCollection(DocumentModel collection,
DocumentModel version)
Restore the collection members of the version.
|
void |
removeAllFromCollection(DocumentModel collection,
List<DocumentModel> documentListToBeRemoved,
CoreSession session)
Remove a list of document from a given collection.
|
void |
removeFromCollection(DocumentModel collection,
DocumentModel documentToBeRemoved,
CoreSession session)
Remove a document from a collection.
|
void addToCollection(DocumentModel collection, DocumentModel documentToBeAdded, CoreSession session)
collection
- the collectiondocumentToBeAdded
- the document to be addedsession
- the core sessionvoid addToCollection(DocumentModel collection, List<DocumentModel> documentListToBeAdded, CoreSession session)
collection
- the collectiondocumentListToBeAdded
- the list of document to be addedsession
- the core sessionvoid addToNewCollection(String newTitle, String newDescription, DocumentModel documentToBeAdded, CoreSession session)
newTitle
- the title of the new collectionnewDescription
- the description of the new collectiondocumentToBeAdded
- the document to be addedsession
- the core sessionvoid addToNewCollection(String newTitle, String newDescription, List<DocumentModel> documentListToBeAdded, CoreSession documentManager)
newTitle
- the title of the new collectionnewDescription
- the description of the new collectiondocumentListToBeAdded
- the list of document to be addedsession
- the core sessionboolean canAddToCollection(DocumentModel collection, CoreSession session)
collection
- the collectionsession
- the core sessionboolean canManage(DocumentModel collection, CoreSession session)
collection
- the collectionsession
- the core sessionList<DocumentModel> getVisibleCollection(DocumentModel collectionMember, CoreSession session)
collectionMember
- the documentsession
- the core sessionList<DocumentModel> getVisibleCollection(DocumentModel collectionMember, int maxResult, CoreSession session)
collectionMember
- the documentmaxResult
- the limitsession
- the core sessionboolean hasVisibleCollection(DocumentModel collectionMember, CoreSession session)
collectionMember
- the documentsession
- the core sessionboolean isCollectable(DocumentModel document)
document
- the documentboolean isCollected(DocumentModel document)
document
- the documentboolean isCollection(DocumentModel document)
document
- the documentboolean isInCollection(DocumentModel collection, DocumentModel document, CoreSession session)
collection
- the collectiondocument
- the document to checksession
- the sessionboolean moveMembers(CoreSession session, DocumentModel collection, DocumentModel member1, DocumentModel member2)
session
- the sessioncollection
- the collectionmember1
- the member1member2
- the member2void processCopiedCollection(DocumentModel collection)
collection
- the collectionvoid processRemovedCollection(DocumentModel collection)
collection
- the collectionvoid processRemovedCollectionMember(DocumentModel collectionMember)
collectionMember
- the documentvoid processRestoredCollection(DocumentModel collection, DocumentModel version)
collection
- the collectioncollection
- the versionvoid removeAllFromCollection(DocumentModel collection, List<DocumentModel> documentListToBeRemoved, CoreSession session)
collection
- the collectiondocumentListToBeRemoved
- the document to be removedsession
- the core sessionvoid removeFromCollection(DocumentModel collection, DocumentModel documentToBeRemoved, CoreSession session)
collection
- the collectiondocumentToBeRemoved
- the document to be removedsession
- the core sessionDocumentModel createCollection(CoreSession session, String title, String description, String path)
session
- title
- description
- path
- DocumentModel getUserDefaultCollections(DocumentModel context, CoreSession session)
context
- contextual documentsession
- the core sessionvoid doRemoveFromCollection(DocumentModel documentToBeRemoved, String collectionId, CoreSession session)
documentToBeRemoved
- collectionId
- session
- Copyright © 2016 Nuxeo SA. All rights reserved.