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 TypeMethodDescriptionboolean
Returns true if the givenFileSystemItem
id can be handled by this factory.boolean
exists
(String id, NuxeoPrincipal principal) Returns true if aFileSystemItem
with the given id exists for the given principal.Gets theFileSystemItem
for the givenDocumentModel
.getFileSystemItem
(DocumentModel doc, boolean includeDeleted) Gets theFileSystemItem
for the givenDocumentModel
.getFileSystemItem
(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Gets theFileSystemItem
for the givenDocumentModel
.getFileSystemItem
(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo) Gets theFileSystemItem
for 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 theFileSystemItem
with the given id and parent id using a core session fetched with the given principal.getFileSystemItemById
(String id, NuxeoPrincipal principal) Gets theFileSystemItem
with the given id using a core session fetched with the given principal.getName()
Gets the factory unique name.void
handleParameters
(Map<String, String> parameters) Handles the factory parameters contributed through thefileSystemItemFactory
contribution.boolean
Returns true if the givenDocumentModel
is adaptable as aFileSystemItem
.boolean
isFileSystemItem
(DocumentModel doc, boolean includeDeleted) Returns true if the givenDocumentModel
is adaptable as aFileSystemItem
.boolean
isFileSystemItem
(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Returns true if the givenDocumentModel
is adaptable as aFileSystemItem
.void
Sets 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 thefileSystemItemFactory
contribution. -
isFileSystemItem
Returns true if the givenDocumentModel
is adaptable as aFileSystemItem
.- See Also:
-
isFileSystemItem
Returns true if the givenDocumentModel
is adaptable as aFileSystemItem
. IfincludeDeleted
is 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 givenDocumentModel
is adaptable as aFileSystemItem
.If
includeDeleted
is 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
relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the current user. -
getFileSystemItem
Gets theFileSystemItem
for the givenDocumentModel
.- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
-
getFileSystemItem
Gets theFileSystemItem
for the givenDocumentModel
. IfincludeDeleted
is 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
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint) Gets theFileSystemItem
for the givenDocumentModel
.If
includeDeleted
is 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
relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the current user.- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo) Gets theFileSystemItem
for the givenDocumentModel
.If
includeDeleted
is 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
relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the current user.If
getLockInfo
is true theLock
is fetched from theDocumentModel
and set on the returnedFileSystemItem
.- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- Since:
- 8.3
- See Also:
-
getFileSystemItem
- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
-
getFileSystemItem
Gets theFileSystemItem
for the givenDocumentModel
forcing its parent with the givenparentItem
. IfincludeDeleted
is 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
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint) Gets theFileSystemItem
for the givenDocumentModel
forcing its parent with the givenparentItem
.If
includeDeleted
is 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
relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the current user.- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo) Gets theFileSystemItem
for the givenDocumentModel
forcing its parent with the givenparentItem
.If
includeDeleted
is 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
relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the current user.If
getLockInfo
is true theLock
is fetched from theDocumentModel
and set on the returnedFileSystemItem
.- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- Since:
- 8.3
-
canHandleFileSystemItemId
Returns true if the givenFileSystemItem
id can be handled by this factory. It is typically the case when the factory has been responsible for generating theFileSystemItem
. -
exists
Returns true if aFileSystemItem
with the given id exists for the given principal. -
getFileSystemItemById
Gets theFileSystemItem
with the given id using a core session fetched with the given principal.- Returns:
- the
FileSystemItem
or null if none matches the given id
-
getFileSystemItemById
Gets theFileSystemItem
with the given id and parent id using a core session fetched with the given principal.- Returns:
- the
FileSystemItem
or null if none matches the given id and parent id - Since:
- 6.0
-