public interface FileSystemItemFactory
fileSystemItemFactory
extension point of the
FileSystemItemAdapterService
.
Allows to get a FileSystemItem
for a given DocumentModel
or a given FileSystemItem
id.
AbstractFileSystemItemFactory
,
DefaultFileSystemItemFactory
,
TopLevelFolderItemFactory
Modifier and Type | Method and Description |
---|---|
boolean |
canHandleFileSystemItemId(String id)
Returns true if the given
FileSystemItem id can be handled by this factory. |
boolean |
exists(String id,
Principal principal)
Returns true if a
FileSystemItem with the given id exists for the given principal. |
DocumentModel |
getDocumentByFileSystemId(String id,
Principal principal)
Deprecated.
since 7.2
|
FileSystemItem |
getFileSystemItem(DocumentModel doc)
Gets the
FileSystemItem for the given DocumentModel . |
FileSystemItem |
getFileSystemItem(DocumentModel doc,
boolean includeDeleted)
Gets the
FileSystemItem for the given DocumentModel . |
FileSystemItem |
getFileSystemItem(DocumentModel doc,
boolean includeDeleted,
boolean relaxSyncRootConstraint)
Gets the
FileSystemItem for the given DocumentModel . |
FileSystemItem |
getFileSystemItem(DocumentModel doc,
boolean includeDeleted,
boolean relaxSyncRootConstraint,
boolean getLockInfo)
Gets the
FileSystemItem for the given DocumentModel . |
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,
Principal principal)
Gets the
FileSystemItem with the given id using a core session fetched with the given principal. |
FileSystemItem |
getFileSystemItemById(String id,
String parentId,
Principal principal)
Gets the
FileSystemItem with the given id and parent 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 the
fileSystemItemFactory contribution. |
boolean |
isFileSystemItem(DocumentModel doc)
Returns true if the given
DocumentModel is adaptable as a FileSystemItem . |
boolean |
isFileSystemItem(DocumentModel doc,
boolean includeDeleted)
Returns true if the given
DocumentModel is adaptable as a FileSystemItem . |
boolean |
isFileSystemItem(DocumentModel doc,
boolean includeDeleted,
boolean relaxSyncRootConstraint)
Returns true if the given
DocumentModel is adaptable as a FileSystemItem . |
void |
setName(String name)
Sets the factory unique name.
|
void handleParameters(Map<String,String> parameters)
fileSystemItemFactory
contribution.boolean isFileSystemItem(DocumentModel doc)
DocumentModel
is adaptable as a FileSystemItem
.isFileSystemItem(DocumentModel, boolean)
boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted)
DocumentModel
is adaptable as a FileSystemItem
. If
includeDeleted
is true no filter is applied on the "deleted" life cycle state, else if the document is in
this state it is not considered as adaptable as a FileSystemItem
, thus the method returns false.boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
DocumentModel
is adaptable as a FileSystemItem
.
If includeDeleted
is true no filter is applied on the "deleted" life cycle state, else if the document is
in this state it is not considered as adaptable as a FileSystemItem
, thus the method returns false.
If relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the
current user.
FileSystemItem getFileSystemItem(DocumentModel doc)
FileSystemItem
for the given DocumentModel
.FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
isFileSystemItem(DocumentModel)
,
getFileSystemItem(DocumentModel, boolean)
FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted)
FileSystemItem
for the given DocumentModel
. If includeDeleted
is true no filter
is applied on the "deleted" life cycle state, else if the document is in this state it is not considered as
adaptable as a FileSystemItem
, thus the method returns null.FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
isFileSystemItem(DocumentModel, boolean)
FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItem
for the given DocumentModel
.
If includeDeleted
is true no filter is applied on the "deleted" life cycle state, else if the document is
in this state it is not considered as adaptable as a FileSystemItem
, thus the method returns null.
If relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the
current user.
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
isFileSystemItem(DocumentModel, boolean, boolean)
FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
FileSystemItem
for the given DocumentModel
.
If includeDeleted
is true no filter is applied on the "deleted" life cycle state, else if the document is
in this state it is not considered as adaptable as a FileSystemItem
, 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 the Lock
is fetched from the DocumentModel
and set on the returned
FileSystemItem
.
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
isFileSystemItem(DocumentModel, boolean, boolean)
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem)
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
getFileSystemItem(DocumentModel, FolderItem, boolean)
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted)
FileSystemItem
for the given DocumentModel
forcing its parent with the given
parentItem
. If includeDeleted
is true no filter is applied on the "deleted" life cycle state,
else if the document is in this state it is not considered as adaptable as a FileSystemItem
, thus the
method returns null.FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItem
for the given DocumentModel
forcing its parent with the given
parentItem
.
If includeDeleted
is true no filter is applied on the "deleted" life cycle state, else if the document is
in this state it is not considered as adaptable as a FileSystemItem
, thus the method returns null.
If relaxSyncRootConstraint
is true no filter is applied on the synchronization root aspect for the
current user.
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
FileSystemItem
for the given DocumentModel
forcing its parent with the given
parentItem
.
If includeDeleted
is true no filter is applied on the "deleted" life cycle state, else if the document is
in this state it is not considered as adaptable as a FileSystemItem
, 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 the Lock
is fetched from the DocumentModel
and set on the returned
FileSystemItem
.
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
boolean canHandleFileSystemItemId(String id)
FileSystemItem
id can be handled by this factory. It is typically the case when
the factory has been responsible for generating the FileSystemItem
.boolean exists(String id, Principal principal)
FileSystemItem
with the given id exists for the given principal.FileSystemItem getFileSystemItemById(String id, Principal principal)
FileSystemItem
with the given id using a core session fetched with the given principal.FileSystemItem
or null if none matches the given idFileSystemItem getFileSystemItemById(String id, String parentId, Principal principal)
FileSystemItem
with the given id and parent id using a core session fetched with the given
principal.FileSystemItem
or null if none matches the given id and parent id@Deprecated DocumentModel getDocumentByFileSystemId(String id, Principal principal)
DocumentModel
bound to the given FileSystemItem
id using a core session fetched with the
given principal.DocumentModel
Copyright © 2017 Nuxeo. All rights reserved.