public abstract class AbstractVirtualFolderItemFactory extends Object implements VirtualFolderItemFactory
FileSystemItemFactory for a virtual FolderItem.| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_FOLDER_NAME |
protected static String |
FOLDER_NAME_PARAM |
protected String |
folderName |
protected String |
name |
| Constructor and Description |
|---|
AbstractVirtualFolderItemFactory() |
| 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,
NuxeoPrincipal 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,
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,
NuxeoPrincipal principal)
Gets the
FileSystemItem with the given id using a core session fetched with the given principal. |
FileSystemItem |
getFileSystemItemById(String id,
String parentId,
NuxeoPrincipal principal)
Gets the
FileSystemItem with the given id and parent id using a core session fetched with the given
principal. |
String |
getFolderName() |
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 |
setFolderName(String folderName) |
void |
setName(String name)
Sets the factory unique name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetVirtualFolderItemprotected static final String FOLDER_NAME_PARAM
protected static final String DEFAULT_FOLDER_NAME
protected String folderName
public AbstractVirtualFolderItemFactory()
public String getName()
FileSystemItemFactorygetName in interface FileSystemItemFactorypublic void setName(String name)
FileSystemItemFactorysetName in interface FileSystemItemFactorypublic void handleParameters(Map<String,String> parameters)
FileSystemItemFactoryfileSystemItemFactory contribution.handleParameters in interface FileSystemItemFactorypublic boolean isFileSystemItem(DocumentModel doc)
FileSystemItemFactoryDocumentModel is adaptable as a FileSystemItem.isFileSystemItem in interface FileSystemItemFactoryFileSystemItemFactory.isFileSystemItem(DocumentModel, boolean)public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted)
FileSystemItemFactoryDocumentModel is adaptable as a FileSystemItem. 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 a FileSystemItem, thus the method returns false.isFileSystemItem in interface FileSystemItemFactorypublic boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItemFactoryDocumentModel is adaptable as a FileSystemItem.
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 a FileSystemItem, thus the method returns false.
If relaxSyncRootConstraint is true no filter is applied on the synchronization root aspect for the
current user.
isFileSystemItem in interface FileSystemItemFactorypublic FileSystemItem getFileSystemItem(DocumentModel doc)
FileSystemItemFactoryFileSystemItem for the given DocumentModel.getFileSystemItem in interface FileSystemItemFactoryFileSystemItem or null if the DocumentModel is not adaptable as a
FileSystemItemFileSystemItemFactory.isFileSystemItem(DocumentModel),
FileSystemItemFactory.getFileSystemItem(DocumentModel, boolean)public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted)
FileSystemItemFactoryFileSystemItem for the given DocumentModel. If includeDeleted 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 a
FileSystemItem, thus the method returns null.getFileSystemItem in interface FileSystemItemFactoryFileSystemItem or null if the DocumentModel is not adaptable as a
FileSystemItemFileSystemItemFactory.isFileSystemItem(DocumentModel, boolean)public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItemFactoryFileSystemItem for the given DocumentModel.
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 a FileSystemItem, thus the method returns null.
If relaxSyncRootConstraint is true no filter is applied on the synchronization root aspect for the
current user.
getFileSystemItem in interface FileSystemItemFactoryFileSystemItem or null if the DocumentModel is not adaptable as a
FileSystemItemFileSystemItemFactory.isFileSystemItem(DocumentModel, boolean, boolean)public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
FileSystemItemFactoryFileSystemItem for the given DocumentModel.
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 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.
getFileSystemItem in interface FileSystemItemFactoryFileSystemItem or null if the DocumentModel is not adaptable as a
FileSystemItemFileSystemItemFactory.isFileSystemItem(DocumentModel, boolean, boolean)public FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem)
FileSystemItemFactorygetFileSystemItem in interface FileSystemItemFactoryFileSystemItem or null if the DocumentModel is not adaptable as a
FileSystemItemFileSystemItemFactory.getFileSystemItem(DocumentModel, FolderItem, boolean)public FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted)
FileSystemItemFactoryFileSystemItem for the given DocumentModel forcing its parent with the given
parentItem. If includeDeleted 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 a FileSystemItem, thus the method returns
null.getFileSystemItem in interface FileSystemItemFactoryFileSystemItem or null if the DocumentModel is not adaptable as a
FileSystemItempublic FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItemFactoryFileSystemItem for the given DocumentModel forcing its parent with the given
parentItem.
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 a FileSystemItem, thus the method returns null.
If relaxSyncRootConstraint is true no filter is applied on the synchronization root aspect for the
current user.
getFileSystemItem in interface FileSystemItemFactoryFileSystemItem or null if the DocumentModel is not adaptable as a
FileSystemItempublic FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
FileSystemItemFactoryFileSystemItem for the given DocumentModel forcing its parent with the given
parentItem.
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 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.
getFileSystemItem in interface FileSystemItemFactoryFileSystemItem or null if the DocumentModel is not adaptable as a
FileSystemItempublic boolean canHandleFileSystemItemId(String id)
FileSystemItemFactoryFileSystemItem id can be handled by this factory. It is typically the case when
the factory has been responsible for generating the FileSystemItem.canHandleFileSystemItemId in interface FileSystemItemFactorypublic boolean exists(String id, NuxeoPrincipal principal)
FileSystemItemFactoryFileSystemItem with the given id exists for the given principal.exists in interface FileSystemItemFactorypublic FileSystemItem getFileSystemItemById(String id, NuxeoPrincipal principal)
FileSystemItemFactoryFileSystemItem with the given id using a core session fetched with the given principal.getFileSystemItemById in interface FileSystemItemFactoryFileSystemItem or null if none matches the given idpublic FileSystemItem getFileSystemItemById(String id, String parentId, NuxeoPrincipal principal)
FileSystemItemFactoryFileSystemItem with the given id and parent id using a core session fetched with the given
principal.getFileSystemItemById in interface FileSystemItemFactoryFileSystemItem or null if none matches the given id and parent idpublic String getFolderName()
getFolderName in interface VirtualFolderItemFactorypublic void setFolderName(String folderName)
setFolderName in interface VirtualFolderItemFactoryCopyright © 2019 Nuxeo. All rights reserved.