Interface FileSystemItemFactory
- All Known Subinterfaces:
TopLevelFolderItemFactory,VirtualFolderItemFactory
- All Known Implementing Classes:
AbstractFileSystemItemFactory,AbstractSyncRootFolderItemFactory,AbstractVirtualFolderItemFactory,CollectionSyncRootFolderItemFactory,DefaultFileSystemItemFactory,DefaultSyncRootFolderItemFactory,DefaultTopLevelFolderItemFactory,ESSyncRootFolderItemFactory,PermissionSyncRootFactory,PermissionTopLevelFactory,SharedSyncRootParentFactory,UserSyncRootParentFactory,UserWorkspaceSyncRootFactory,UserWorkspaceSyncRootParentFactory,UserWorkspaceTopLevelFactory
fileSystemItemFactory extension point of the
FileSystemItemAdapterService.
Allows to get a FileSystemItem for a given DocumentModel or a given FileSystemItem id.
- Author:
- Antoine Taillefer
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns 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.Gets theFileSystemItemfor the givenDocumentModel.getFileSystemItem(DocumentModel doc, boolean includeDeleted) Gets theFileSystemItemfor the givenDocumentModel.getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Gets theFileSystemItemfor the givenDocumentModel.getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo) Gets theFileSystemItemfor the givenDocumentModel.getFileSystemItem(DocumentModel doc, FolderItem parentItem) getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted) getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint) getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo) getFileSystemItemById(String id, String parentId, NuxeoPrincipal principal) Gets theFileSystemItemwith the given id and parent id using a core session fetched with the given principal.getFileSystemItemById(String id, NuxeoPrincipal principal) Gets theFileSystemItemwith the given id using a core session fetched with the given principal.getName()Gets the factory unique name.voidhandleParameters(Map<String, String> parameters) Handles the factory parameters contributed through thefileSystemItemFactorycontribution.booleanReturns 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.voidSets the factory unique name.
-
Method Details
-
getName
String getName()Gets the factory unique name. -
setName
Sets the factory unique name. -
handleParameters
Handles the factory parameters contributed through thefileSystemItemFactorycontribution. -
isFileSystemItem
Returns true if the givenDocumentModelis adaptable as aFileSystemItem.- See Also:
-
isFileSystemItem
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
Gets theFileSystemItemfor the givenDocumentModel.- Returns:
- the
FileSystemItemor null if theDocumentModelis not adaptable as aFileSystemItem - See Also:
-
getFileSystemItem
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:
-
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:
-
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:
-
getFileSystemItem
- Returns:
- the
FileSystemItemor null if theDocumentModelis not adaptable as aFileSystemItem - See Also:
-
getFileSystemItem
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
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
Returns true if aFileSystemItemwith the given id exists for the given principal. -
getFileSystemItemById
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
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
-