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,
Principal principal)
Returns true if a
FileSystemItem with the given id exists for the given principal. |
DocumentModel |
getDocumentByFileSystemId(String id,
Principal principal)
Deprecated.
|
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 |
getFolderName() |
String |
getName()
Gets the factory unique name.
|
abstract FolderItem |
getVirtualFolderItem(Principal principal)
Returns the (unique) virtual
FolderItem . |
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.
|
protected static final String FOLDER_NAME_PARAM
protected static final String DEFAULT_FOLDER_NAME
protected String folderName
public AbstractVirtualFolderItemFactory()
public abstract FolderItem getVirtualFolderItem(Principal principal)
VirtualFolderItemFactory
FolderItem
.getVirtualFolderItem
in interface VirtualFolderItemFactory
public String getName()
FileSystemItemFactory
getName
in interface FileSystemItemFactory
public void setName(String name)
FileSystemItemFactory
setName
in interface FileSystemItemFactory
public void handleParameters(Map<String,String> parameters)
FileSystemItemFactory
fileSystemItemFactory
contribution.handleParameters
in interface FileSystemItemFactory
public boolean isFileSystemItem(DocumentModel doc)
FileSystemItemFactory
DocumentModel
is adaptable as a FileSystemItem
.isFileSystemItem
in interface FileSystemItemFactory
FileSystemItemFactory.isFileSystemItem(DocumentModel, boolean)
public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted)
FileSystemItemFactory
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.isFileSystemItem
in interface FileSystemItemFactory
public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItemFactory
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.
isFileSystemItem
in interface FileSystemItemFactory
public FileSystemItem getFileSystemItem(DocumentModel doc)
FileSystemItemFactory
FileSystemItem
for the given DocumentModel
.getFileSystemItem
in interface FileSystemItemFactory
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
FileSystemItemFactory.isFileSystemItem(DocumentModel)
,
FileSystemItemFactory.getFileSystemItem(DocumentModel, boolean)
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted)
FileSystemItemFactory
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.getFileSystemItem
in interface FileSystemItemFactory
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
FileSystemItemFactory.isFileSystemItem(DocumentModel, boolean)
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItemFactory
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.
getFileSystemItem
in interface FileSystemItemFactory
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
FileSystemItemFactory.isFileSystemItem(DocumentModel, boolean, boolean)
public FileSystemItem getFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
FileSystemItemFactory
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
.
getFileSystemItem
in interface FileSystemItemFactory
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
FileSystemItemFactory.isFileSystemItem(DocumentModel, boolean, boolean)
public FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem)
FileSystemItemFactory
getFileSystemItem
in interface FileSystemItemFactory
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
FileSystemItemFactory.getFileSystemItem(DocumentModel, FolderItem, boolean)
public FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted)
FileSystemItemFactory
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.getFileSystemItem
in interface FileSystemItemFactory
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
public FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint)
FileSystemItemFactory
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.
getFileSystemItem
in interface FileSystemItemFactory
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
public FileSystemItem getFileSystemItem(DocumentModel doc, FolderItem parentItem, boolean includeDeleted, boolean relaxSyncRootConstraint, boolean getLockInfo)
FileSystemItemFactory
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
.
getFileSystemItem
in interface FileSystemItemFactory
FileSystemItem
or null if the DocumentModel
is not adaptable as a
FileSystemItem
public boolean canHandleFileSystemItemId(String id)
FileSystemItemFactory
FileSystemItem
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 FileSystemItemFactory
public boolean exists(String id, Principal principal)
FileSystemItemFactory
FileSystemItem
with the given id exists for the given principal.exists
in interface FileSystemItemFactory
public FileSystemItem getFileSystemItemById(String id, Principal principal)
FileSystemItemFactory
FileSystemItem
with the given id using a core session fetched with the given principal.getFileSystemItemById
in interface FileSystemItemFactory
FileSystemItem
or null if none matches the given idpublic FileSystemItem getFileSystemItemById(String id, String parentId, Principal principal)
FileSystemItemFactory
FileSystemItem
with the given id and parent id using a core session fetched with the given
principal.getFileSystemItemById
in interface FileSystemItemFactory
FileSystemItem
or null if none matches the given id and parent id@Deprecated public DocumentModel getDocumentByFileSystemId(String id, Principal principal)
FileSystemItemFactory
DocumentModel
bound to the given FileSystemItem
id using a core session fetched with the
given principal.getDocumentByFileSystemId
in interface FileSystemItemFactory
DocumentModel
public String getFolderName()
getFolderName
in interface VirtualFolderItemFactory
public void setFolderName(String folderName)
setFolderName
in interface VirtualFolderItemFactory
Copyright © 2017 Nuxeo. All rights reserved.