Package org.nuxeo.drive.service.impl
Class DefaultFileSystemItemFactory
- java.lang.Object
-
- org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
-
- org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory
-
- All Implemented Interfaces:
FileSystemItemFactory
,VersioningFileSystemItemFactory
public class DefaultFileSystemItemFactory extends AbstractFileSystemItemFactory implements VersioningFileSystemItemFactory
Default implementation of aFileSystemItemFactory
. It isDocumentModel
backed and is the one used by Nuxeo Drive.- Author:
- Antoine Taillefer
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
VERSIONING_DELAY_PARAM
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesprotected static String
VERSIONING_OPTION_PARAM
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesprotected double
versioningDelay
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesprotected VersioningOption
versioningOption
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policies-
Fields inherited from class org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
name
-
-
Constructor Summary
Constructors Constructor Description DefaultFileSystemItemFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected FileSystemItem
adaptDocument(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo)
Adapts the givenDocumentModel
to aFileSystemItem
.protected Blob
getBlob(DocumentModel doc)
double
getVersioningDelay()
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesVersioningOption
getVersioningOption()
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesvoid
handleParameters(Map<String,String> parameters)
Handles the factory parameters contributed through thefileSystemItemFactory
contribution.boolean
isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
The default factory considers that aDocumentModel
is adaptable as aFileSystemItem
if: It is not a version AND it is not HiddenInNavigation AND it is not in the trash, unlessincludeDeleted
is true AND it is Folderish or it can be adapted as aBlobHolder
with a blob AND its blob is not backed by an extended blob provider AND it is not a synchronization root registered for the current user, unlessrelaxSyncRootConstraint
is trueboolean
needsVersioning(DocumentModel doc)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, this method is not used anymorevoid
setVersioningDelay(double versioningDelay)
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesvoid
setVersioningOption(VersioningOption versioningOption)
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policies-
Methods inherited from class org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory
adaptDocument, canHandleFileSystemItemId, exists, getDocumentById, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, parseFileSystemId, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.drive.service.FileSystemItemFactory
canHandleFileSystemItemId, exists, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItem, getFileSystemItemById, getFileSystemItemById, getName, isFileSystemItem, isFileSystemItem, setName
-
-
-
-
Field Detail
-
VERSIONING_DELAY_PARAM
@Deprecated protected static final String VERSIONING_DELAY_PARAM
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policies- See Also:
- Constant Field Values
-
VERSIONING_OPTION_PARAM
@Deprecated protected static final String VERSIONING_OPTION_PARAM
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policies- See Also:
- Constant Field Values
-
versioningDelay
@Deprecated protected double versioningDelay
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policies
-
versioningOption
@Deprecated protected VersioningOption versioningOption
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policies
-
-
Method Detail
-
handleParameters
public void handleParameters(Map<String,String> parameters)
Description copied from interface:FileSystemItemFactory
Handles the factory parameters contributed through thefileSystemItemFactory
contribution.- Specified by:
handleParameters
in interfaceFileSystemItemFactory
-
isFileSystemItem
public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
The default factory considers that aDocumentModel
is adaptable as aFileSystemItem
if:- It is not a version
- AND it is not HiddenInNavigation
- AND it is not in the trash, unless
includeDeleted
is true - AND it is Folderish or it can be adapted as a
BlobHolder
with a blob - AND its blob is not backed by an extended blob provider
- AND it is not a synchronization root registered for the current user, unless
relaxSyncRootConstraint
is true
- Specified by:
isFileSystemItem
in interfaceFileSystemItemFactory
-
adaptDocument
protected FileSystemItem adaptDocument(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo)
Description copied from class:AbstractFileSystemItemFactory
Adapts the givenDocumentModel
to aFileSystemItem
.
-
needsVersioning
@Deprecated public boolean needsVersioning(DocumentModel doc)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, this method is not used anymoreNeed to version the doc if the current contributor is different from the last contributor or if the last modification was done more thanversioningDelay
seconds ago.- Specified by:
needsVersioning
in interfaceVersioningFileSystemItemFactory
-
getVersioningDelay
@Deprecated public double getVersioningDelay()
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesDescription copied from interface:VersioningFileSystemItemFactory
Gets the delay passed which a document needs to be versioned since its last modification.- Specified by:
getVersioningDelay
in interfaceVersioningFileSystemItemFactory
- See Also:
needsVersioning(DocumentModel)
-
setVersioningDelay
@Deprecated public void setVersioningDelay(double versioningDelay)
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesDescription copied from interface:VersioningFileSystemItemFactory
Sets the delay passed which a document needs to be versioned since its last modification.- Specified by:
setVersioningDelay
in interfaceVersioningFileSystemItemFactory
-
getVersioningOption
@Deprecated public VersioningOption getVersioningOption()
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesDescription copied from interface:VersioningFileSystemItemFactory
Gets the increment option used when versioning a document.- Specified by:
getVersioningOption
in interfaceVersioningFileSystemItemFactory
-
setVersioningOption
@Deprecated public void setVersioningOption(VersioningOption versioningOption)
Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesDescription copied from interface:VersioningFileSystemItemFactory
Sets the increment option used when versioning a document.- Specified by:
setVersioningOption
in interfaceVersioningFileSystemItemFactory
-
getBlob
protected Blob getBlob(DocumentModel doc)
-
-