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
,
VersioningFileSystemItemFactory
,
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. |
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,
FolderItem parentItem)
Gets the
FileSystemItem for the given DocumentModel
forcing its parent id with the given id. |
FileSystemItem |
getFileSystemItem(DocumentModel doc,
FolderItem parentItem,
boolean includeDeleted)
Gets the
FileSystemItem for the given DocumentModel
forcing its parent id with the given id. |
FileSystemItem |
getFileSystemItemById(String id,
Principal principal)
Gets the
FileSystemItem 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 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 . |
void |
setName(String name)
Sets the factory unique name.
|
String getName()
void setName(String name)
void handleParameters(Map<String,String> parameters) throws ClientException
fileSystemItemFactory
contribution.ClientException
boolean isFileSystemItem(DocumentModel doc) throws ClientException
DocumentModel
is adaptable as a
FileSystemItem
.ClientException
isFileSystemItem(DocumentModel, boolean)
boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted) throws ClientException
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.ClientException
FileSystemItem getFileSystemItem(DocumentModel doc) throws ClientException
FileSystemItem
for the given DocumentModel
.FileSystemItem
or null if the DocumentModel
is not adaptable as a FileSystemItem
ClientException
isFileSystemItem(DocumentModel)
,
getFileSystemItem(DocumentModel, boolean)
FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted) throws ClientException
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
ClientException
#isFileSystemItem(DocumentModel, boolean))
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem) throws ClientException
FileSystemItem
for the given DocumentModel
forcing its parent id with the given id.FileSystemItem
or null if the DocumentModel
is not adaptable as a FileSystemItem
ClientException
isFileSystemItem(DocumentModel)
,
#getFileSystemItem(DocumentModel, String, boolean)
FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted) throws ClientException
FileSystemItem
for the given DocumentModel
forcing its parent id with the given id. 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
ClientException
isFileSystemItem(DocumentModel, boolean)
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) throws ClientException
FileSystemItem
with the given id exists for the
given principal.ClientException
FileSystemItem getFileSystemItemById(String id, Principal principal) throws ClientException
FileSystemItem
with the given id using a core session
fetched with the given principal.FileSystemItem
or null if none matches the given idClientException
Copyright © 2013 Nuxeo SA. All Rights Reserved.