Interface FileSystemItemFactory
-
- All Known Subinterfaces:
TopLevelFolderItemFactory,VersioningFileSystemItemFactory,VirtualFolderItemFactory
- All Known Implementing Classes:
AbstractFileSystemItemFactory,AbstractSyncRootFolderItemFactory,AbstractVirtualFolderItemFactory,CollectionSyncRootFolderItemFactory,DefaultFileSystemItemFactory,DefaultSyncRootFolderItemFactory,DefaultTopLevelFolderItemFactory,ESSyncRootFolderItemFactory,PermissionSyncRootFactory,PermissionTopLevelFactory,SharedSyncRootParentFactory,UserSyncRootParentFactory,UserWorkspaceSyncRootFactory,UserWorkspaceSyncRootParentFactory,UserWorkspaceTopLevelFactory
public interface FileSystemItemFactory
Interface for the classes contributed to thefileSystemItemFactoryextension point of theFileSystemItemAdapterService.Allows to get a
FileSystemItemfor a givenDocumentModelor a givenFileSystemItemid.- Author:
- Antoine Taillefer
- See Also:
AbstractFileSystemItemFactory,DefaultFileSystemItemFactory,TopLevelFolderItemFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanHandleFileSystemItemId(String id)Returns true if the givenFileSystemItemid can be handled by this factory.booleanexists(String id, NuxeoPrincipal principal)Returns true if aFileSystemItemwith the given id exists for the given principal.FileSystemItemgetFileSystemItem(DocumentModel doc)Gets theFileSystemItemfor the givenDocumentModel.FileSystemItemgetFileSystemItem(DocumentModel doc, boolean includeDeleted)Gets theFileSystemItemfor the givenDocumentModel.FileSystemItemgetFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)Gets theFileSystemItemfor the givenDocumentModel.FileSystemItemgetFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)Gets theFileSystemItemfor the givenDocumentModel.FileSystemItemgetFileSystemItem(DocumentModel doc, FolderItem parentItem)FileSystemItemgetFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted)FileSystemItemgetFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint)FileSystemItemgetFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)FileSystemItemgetFileSystemItemById(String id, String parentId, NuxeoPrincipal principal)Gets theFileSystemItemwith the given id and parent id using a core session fetched with the given principal.FileSystemItemgetFileSystemItemById(String id, NuxeoPrincipal principal)Gets theFileSystemItemwith the given id using a core session fetched with the given principal.StringgetName()Gets the factory unique name.voidhandleParameters(Map<String,String> parameters)Handles the factory parameters contributed through thefileSystemItemFactorycontribution.booleanisFileSystemItem(DocumentModel doc)Returns true if the givenDocumentModelis adaptable as aFileSystemItem.booleanisFileSystemItem(DocumentModel doc, boolean includeDeleted)Returns true if the givenDocumentModelis adaptable as aFileSystemItem.booleanisFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)Returns true if the givenDocumentModelis adaptable as aFileSystemItem.voidsetName(String name)Sets the factory unique name.
-
-
-
Method Detail
-
handleParameters
void handleParameters(Map<String,String> parameters)
Handles the factory parameters contributed through thefileSystemItemFactorycontribution.
-
isFileSystemItem
boolean isFileSystemItem(DocumentModel doc)
Returns true if the givenDocumentModelis adaptable as aFileSystemItem.- See Also:
isFileSystemItem(DocumentModel, boolean)
-
isFileSystemItem
boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted)
Returns true if the givenDocumentModelis adaptable as aFileSystemItem. IfincludeDeletedis true no filter is applied on the "trashed" state, else if the document is in this state it is not considered as adaptable as aFileSystemItem, thus the method returns false.
-
isFileSystemItem
boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
Returns true if the givenDocumentModelis adaptable as aFileSystemItem.If
includeDeletedis true no filter is applied on the "trashed" state, else if the document is in this state it is not considered as adaptable as aFileSystemItem, thus the method returns false.If
relaxSyncRootConstraintis true no filter is applied on the synchronization root aspect for the current user.
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc)
Gets theFileSystemItemfor the givenDocumentModel.- Returns:
- the
FileSystemItemor null if theDocumentModelis not adaptable as aFileSystemItem - See Also:
isFileSystemItem(DocumentModel),getFileSystemItem(DocumentModel, boolean)
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted)
Gets theFileSystemItemfor the givenDocumentModel. IfincludeDeletedis true no filter is applied on the "trashed" state, else if the document is in the trash it is not considered as adaptable as aFileSystemItem, thus the method returns null.- Returns:
- the
FileSystemItemor null if theDocumentModelis not adaptable as aFileSystemItem - See Also:
isFileSystemItem(DocumentModel, boolean)
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
Gets theFileSystemItemfor the givenDocumentModel.If
includeDeletedis true no filter is applied on the "trashed" state, else if the document is in this state it is not considered as adaptable as aFileSystemItem, thus the method returns null.If
relaxSyncRootConstraintis true no filter is applied on the synchronization root aspect for the current user.- Returns:
- the
FileSystemItemor null if theDocumentModelis not adaptable as aFileSystemItem - See Also:
isFileSystemItem(DocumentModel, boolean, boolean)
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
Gets theFileSystemItemfor the givenDocumentModel.If
includeDeletedis true no filter is applied on the "trashed" state, else if the document is in this state it is not considered as adaptable as aFileSystemItem, thus the method returns null.If
relaxSyncRootConstraintis true no filter is applied on the synchronization root aspect for the current user.If
getLockInfois true theLockis fetched from theDocumentModeland set on the returnedFileSystemItem.- Returns:
- the
FileSystemItemor null if theDocumentModelis not adaptable as aFileSystemItem - Since:
- 8.3
- See Also:
isFileSystemItem(DocumentModel, boolean, boolean)
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem)
- Returns:
- the
FileSystemItemor null if theDocumentModelis not adaptable as aFileSystemItem - See Also:
getFileSystemItem(DocumentModel, FolderItem, boolean)
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted)
Gets theFileSystemItemfor the givenDocumentModelforcing its parent with the givenparentItem. IfincludeDeletedis true no filter is applied on the "trashed" state, else if the document is in the trash it is not considered as adaptable as aFileSystemItem, thus the method returns null.- Returns:
- the
FileSystemItemor null if theDocumentModelis not adaptable as aFileSystemItem
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint)
Gets theFileSystemItemfor the givenDocumentModelforcing its parent with the givenparentItem.If
includeDeletedis true no filter is applied on the "trashed" state, else if the document is in this state it is not considered as adaptable as aFileSystemItem, thus the method returns null.If
relaxSyncRootConstraintis true no filter is applied on the synchronization root aspect for the current user.- Returns:
- the
FileSystemItemor null if theDocumentModelis not adaptable as aFileSystemItem
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
Gets theFileSystemItemfor the givenDocumentModelforcing its parent with the givenparentItem.If
includeDeletedis true no filter is applied on the "trashed" state, else if the document is in this state it is not considered as adaptable as aFileSystemItem, thus the method returns null.If
relaxSyncRootConstraintis true no filter is applied on the synchronization root aspect for the current user.If
getLockInfois true theLockis fetched from theDocumentModeland set on the returnedFileSystemItem.- Returns:
- the
FileSystemItemor null if theDocumentModelis not adaptable as aFileSystemItem - Since:
- 8.3
-
canHandleFileSystemItemId
boolean canHandleFileSystemItemId(String id)
Returns true if the givenFileSystemItemid can be handled by this factory. It is typically the case when the factory has been responsible for generating theFileSystemItem.
-
exists
boolean exists(String id, NuxeoPrincipal principal)
Returns true if aFileSystemItemwith the given id exists for the given principal.
-
getFileSystemItemById
FileSystemItem getFileSystemItemById(String id, NuxeoPrincipal principal)
Gets theFileSystemItemwith the given id using a core session fetched with the given principal.- Returns:
- the
FileSystemItemor null if none matches the given id
-
getFileSystemItemById
FileSystemItem getFileSystemItemById(String id, String parentId, NuxeoPrincipal principal)
Gets theFileSystemItemwith the given id and parent id using a core session fetched with the given principal.- Returns:
- the
FileSystemItemor null if none matches the given id and parent id - Since:
- 6.0
-
-