public class DefaultFileSystemItemFactory extends AbstractFileSystemItemFactory implements VersioningFileSystemItemFactory
FileSystemItemFactory. It is DocumentModel backed and is the one used by
Nuxeo Drive.| Modifier and Type | Field and Description |
|---|---|
protected static String |
VERSIONING_DELAY_PARAM |
protected static String |
VERSIONING_OPTION_PARAM |
protected double |
versioningDelay |
protected VersioningOption |
versioningOption |
name| Constructor and Description |
|---|
DefaultFileSystemItemFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected FileSystemItem |
adaptDocument(DocumentModel doc,
boolean forceParentItem,
FolderItem parentItem,
boolean relaxSyncRootConstraint,
boolean getLockInfo)
Adapts the given
DocumentModel to a FileSystemItem. |
double |
getVersioningDelay()
Gets the delay passed which a document needs to be versioned since its last modification.
|
VersioningOption |
getVersioningOption()
Gets the increment option used when versioning a document.
|
void |
handleParameters(Map<String,String> parameters)
Handles the factory parameters contributed through the
fileSystemItemFactory contribution. |
protected boolean |
hasBlob(DocumentModel doc) |
boolean |
isFileSystemItem(DocumentModel doc,
boolean includeDeleted,
boolean relaxSyncRootConstraint)
The default factory considers that a
DocumentModel is adaptable as a FileSystemItem if:
It is not a version
AND it is not HiddenInNavigation
AND it is not in the "deleted" life cycle state, unless includeDeleted is true
AND it is Folderish or it can be adapted as a BlobHolder with a blob
AND it is not a synchronization root registered for the current user, unless relaxSyncRootConstraint
is true
|
boolean |
needsVersioning(DocumentModel doc)
Need to version the doc if the current contributor is different from the last contributor or if the last
modification was done more than
versioningDelay seconds ago. |
void |
setVersioningDelay(double versioningDelay)
Sets the delay passed which a document needs to be versioned since its last modification.
|
void |
setVersioningOption(VersioningOption versioningOption)
Sets the increment option used when versioning a document.
|
adaptDocument, canHandleFileSystemItemId, exists, getDocumentByFileSystemId, getDocumentById, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, parseFileSystemId, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanHandleFileSystemItemId, exists, getDocumentByFileSystemId, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, setNameprotected static final String VERSIONING_DELAY_PARAM
protected static final String VERSIONING_OPTION_PARAM
protected double versioningDelay
protected VersioningOption versioningOption
public DefaultFileSystemItemFactory()
public void handleParameters(Map<String,String> parameters)
FileSystemItemFactoryfileSystemItemFactory contribution.handleParameters in interface FileSystemItemFactoryhandleParameters in class AbstractFileSystemItemFactorypublic boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
DocumentModel is adaptable as a FileSystemItem if:
includeDeleted is trueBlobHolder with a blobrelaxSyncRootConstraint
is trueisFileSystemItem in interface FileSystemItemFactoryisFileSystemItem in class AbstractFileSystemItemFactoryprotected FileSystemItem adaptDocument(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo)
AbstractFileSystemItemFactoryDocumentModel to a FileSystemItem.public boolean needsVersioning(DocumentModel doc)
versioningDelay seconds ago.needsVersioning in interface VersioningFileSystemItemFactoryDocumentBackedFileItem#versionIfNeeded(DocumentModel doc, CoreSession session)public double getVersioningDelay()
VersioningFileSystemItemFactorygetVersioningDelay in interface VersioningFileSystemItemFactoryneedsVersioning(DocumentModel)public void setVersioningDelay(double versioningDelay)
VersioningFileSystemItemFactorysetVersioningDelay in interface VersioningFileSystemItemFactorypublic VersioningOption getVersioningOption()
VersioningFileSystemItemFactorygetVersioningOption in interface VersioningFileSystemItemFactoryDocumentBackedFileItem#versionIfNeeded(DocumentModel doc, CoreSession session)public void setVersioningOption(VersioningOption versioningOption)
VersioningFileSystemItemFactorysetVersioningOption in interface VersioningFileSystemItemFactoryprotected boolean hasBlob(DocumentModel doc)
Copyright © 2016 Nuxeo SA. All rights reserved.