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 thefileSystemItemFactory
extension point of theFileSystemItemAdapterService
.Allows to get a
FileSystemItem
for a givenDocumentModel
or a givenFileSystemItem
id.- Author:
- Antoine Taillefer
- See Also:
AbstractFileSystemItemFactory
,DefaultFileSystemItemFactory
,TopLevelFolderItemFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canHandleFileSystemItemId(String id)
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.FileSystemItem
getFileSystemItem(DocumentModel doc)
Gets theFileSystemItem
for the givenDocumentModel
.FileSystemItem
getFileSystemItem(DocumentModel doc, boolean includeDeleted)
Gets theFileSystemItem
for the givenDocumentModel
.FileSystemItem
getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
Gets theFileSystemItem
for the givenDocumentModel
.FileSystemItem
getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
Gets theFileSystemItem
for the givenDocumentModel
.FileSystemItem
getFileSystemItem(DocumentModel doc, FolderItem parentItem)
FileSystemItem
getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted)
FileSystemItem
getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItem
getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
FileSystemItem
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.FileSystemItem
getFileSystemItemById(String id, NuxeoPrincipal principal)
Gets theFileSystemItem
with the given id using a core session fetched with the given principal.String
getName()
Gets the factory unique name.void
handleParameters(Map<String,String> parameters)
Handles the factory parameters contributed through thefileSystemItemFactory
contribution.boolean
isFileSystemItem(DocumentModel doc)
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
setName(String name)
Sets the factory unique name.
-
-
-
Method Detail
-
handleParameters
void handleParameters(Map<String,String> parameters)
Handles the factory parameters contributed through thefileSystemItemFactory
contribution.
-
isFileSystemItem
boolean isFileSystemItem(DocumentModel doc)
Returns true if the givenDocumentModel
is adaptable as aFileSystemItem
.- See Also:
isFileSystemItem(DocumentModel, boolean)
-
isFileSystemItem
boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted)
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
FileSystemItem getFileSystemItem(DocumentModel doc)
Gets theFileSystemItem
for the givenDocumentModel
.- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
isFileSystemItem(DocumentModel)
,getFileSystemItem(DocumentModel, boolean)
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted)
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:
isFileSystemItem(DocumentModel, boolean)
-
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:
isFileSystemItem(DocumentModel, boolean, boolean)
-
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:
isFileSystemItem(DocumentModel, boolean, boolean)
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem)
- Returns:
- the
FileSystemItem
or null if theDocumentModel
is not adaptable as aFileSystemItem
- See Also:
getFileSystemItem(DocumentModel, FolderItem, boolean)
-
getFileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted)
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
boolean canHandleFileSystemItemId(String id)
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
boolean exists(String id, NuxeoPrincipal principal)
Returns true if aFileSystemItem
with the given id exists for the given principal.
-
getFileSystemItemById
FileSystemItem getFileSystemItemById(String id, NuxeoPrincipal principal)
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
FileSystemItem 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.- Returns:
- the
FileSystemItem
or null if none matches the given id and parent id - Since:
- 6.0
-
-