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 isDocumentModelbacked and is the one used by Nuxeo Drive.- Author:
- Antoine Taillefer
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringVERSIONING_DELAY_PARAMDeprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesprotected static StringVERSIONING_OPTION_PARAMDeprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesprotected doubleversioningDelayDeprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesprotected VersioningOptionversioningOptionDeprecated.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 FileSystemItemadaptDocument(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo)Adapts the givenDocumentModelto aFileSystemItem.protected BlobgetBlob(DocumentModel doc)doublegetVersioningDelay()Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesVersioningOptiongetVersioningOption()Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesvoidhandleParameters(Map<String,String> parameters)Handles the factory parameters contributed through thefileSystemItemFactorycontribution.booleanisFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)The default factory considers that aDocumentModelis adaptable as aFileSystemItemif: It is not a version AND it is not HiddenInNavigation AND it is not in the trash, unlessincludeDeletedis true AND it is Folderish or it can be adapted as aBlobHolderwith 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, unlessrelaxSyncRootConstraintis truebooleanneedsVersioning(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 anymorevoidsetVersioningDelay(double versioningDelay)Deprecated.since 9.1 automatic versioning is directly done by versioning system which holds the policiesvoidsetVersioningOption(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:FileSystemItemFactoryHandles the factory parameters contributed through thefileSystemItemFactorycontribution.- Specified by:
handleParametersin interfaceFileSystemItemFactory
-
isFileSystemItem
public boolean isFileSystemItem(DocumentModel doc, boolean includeDeleted, boolean relaxSyncRootConstraint)
The default factory considers that aDocumentModelis adaptable as aFileSystemItemif:- It is not a version
- AND it is not HiddenInNavigation
- AND it is not in the trash, unless
includeDeletedis true - AND it is Folderish or it can be adapted as a
BlobHolderwith 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
relaxSyncRootConstraintis true
- Specified by:
isFileSystemItemin interfaceFileSystemItemFactory
-
adaptDocument
protected FileSystemItem adaptDocument(DocumentModel doc, boolean forceParentItem, FolderItem parentItem, boolean relaxSyncRootConstraint, boolean getLockInfo)
Description copied from class:AbstractFileSystemItemFactoryAdapts the givenDocumentModelto 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 thanversioningDelayseconds ago.- Specified by:
needsVersioningin 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:VersioningFileSystemItemFactoryGets the delay passed which a document needs to be versioned since its last modification.- Specified by:
getVersioningDelayin 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:VersioningFileSystemItemFactorySets the delay passed which a document needs to be versioned since its last modification.- Specified by:
setVersioningDelayin 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:VersioningFileSystemItemFactoryGets the increment option used when versioning a document.- Specified by:
getVersioningOptionin 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:VersioningFileSystemItemFactorySets the increment option used when versioning a document.- Specified by:
setVersioningOptionin interfaceVersioningFileSystemItemFactory
-
getBlob
protected Blob getBlob(DocumentModel doc)
-
-