Package org.nuxeo.drive.adapter.impl
Class DocumentBackedFileItem
- java.lang.Object
-
- org.nuxeo.drive.adapter.impl.AbstractFileSystemItem
-
- org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem
-
- org.nuxeo.drive.adapter.impl.DocumentBackedFileItem
-
- All Implemented Interfaces:
Comparable<FileSystemItem>
,FileItem
,FileSystemItem
public class DocumentBackedFileItem extends AbstractDocumentBackedFileSystemItem implements FileItem
DocumentModel
backed implementation of aFileItem
.- Author:
- Antoine Taillefer
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
canUpdate
protected String
digest
protected String
digestAlgorithm
protected String
downloadURL
protected FileSystemItemFactory
factory
protected String
oldDigest
protected long
size
-
Fields inherited from class org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem
docId, docPath, docTitle, PERMISSION_CHECK_OPTIMIZED_PROPERTY, repositoryName
-
Fields inherited from class org.nuxeo.drive.adapter.impl.AbstractFileSystemItem
canDelete, canRename, creationDate, creator, factoryName, FILE_SYSTEM_ITEM_ID_SEPARATOR, FILE_SYSTEM_ITEM_PATH_SEPARATOR, folder, id, lastContributor, lastModificationDate, lockInfo, name, parentId, path, principal, userName
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DocumentBackedFileItem()
DocumentBackedFileItem(FileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc)
DocumentBackedFileItem(FileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint)
DocumentBackedFileItem(FileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo)
DocumentBackedFileItem(FileSystemItemFactory factory, DocumentModel doc)
DocumentBackedFileItem(FileSystemItemFactory factory, DocumentModel doc, boolean relaxSyncRootConstraint)
DocumentBackedFileItem(FileSystemItemFactory factory, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo)
DocumentBackedFileItem(VersioningFileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymoreDocumentBackedFileItem(VersioningFileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymoreDocumentBackedFileItem(VersioningFileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymoreDocumentBackedFileItem(VersioningFileSystemItemFactory factory, DocumentModel doc)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymoreDocumentBackedFileItem(VersioningFileSystemItemFactory factory, DocumentModel doc, boolean relaxSyncRootConstraint)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymoreDocumentBackedFileItem(VersioningFileSystemItemFactory factory, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymore
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object obj)
Blob
getBlob()
protected Blob
getBlob(BlobHolder blobHolder)
protected Blob
getBlob(DocumentModel doc)
protected BlobHolder
getBlobHolder(DocumentModel doc)
boolean
getCanUpdate()
String
getDigest()
String
getDigestAlgorithm()
String
getDownloadURL()
protected String
getFileName(Blob blob, String docTitle)
protected NuxeoDriveManager
getNuxeoDriveManager()
String
getOldDigest()
long
getSize()
int
hashCode()
protected void
initialize(FileSystemItemFactory factory, DocumentModel doc)
protected void
initialize(VersioningFileSystemItemFactory factory, DocumentModel doc)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymorevoid
rename(String name)
void
setBlob(Blob blob)
protected void
setCanUpdate(boolean canUpdate)
protected void
setDigest(String digest)
protected void
setDigestAlgorithm(String digestAlgorithm)
protected void
setDownloadURL(String downloadURL)
void
setOldDigest(String oldDigest)
protected void
setSize(long size)
protected void
updateDigest(Blob blob)
protected void
updateDocTitleIfNeeded(DocumentModel doc, String name)
protected void
updateDownloadURL()
protected void
updateSize(Blob blob)
-
Methods inherited from class org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem
canMove, computeId, delete, getDocId, getDocPath, getDocument, getDocumentById, getRepositoryName, getTrashService, handleCollectionMember, move, parseFileSystemId, setId, updateLastModificationDate
-
Methods inherited from class org.nuxeo.drive.adapter.impl.AbstractFileSystemItem
compareTo, getCanDelete, getCanRename, getCreationDate, getCreator, getFileSystemItemAdapterService, getId, getLastContributor, getLastModificationDate, getLockInfo, getName, getParentId, getPath, getUserName, isFolder, setCanDelete, setCanRename, setCreationDate, setCreator, setFolder, setLastContributor, setLastModificationDate, setLockInfo, setName, setParentId, setPath, setUserName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.nuxeo.drive.adapter.FileSystemItem
canMove, delete, getCanDelete, getCanRename, getCreationDate, getCreator, getId, getLastContributor, getLastModificationDate, getLockInfo, getName, getParentId, getPath, isFolder, move
-
-
-
-
Field Detail
-
downloadURL
protected String downloadURL
-
digestAlgorithm
protected String digestAlgorithm
-
digest
protected String digest
-
size
protected long size
- Since:
- 11.1
-
oldDigest
protected String oldDigest
-
canUpdate
protected boolean canUpdate
-
factory
protected FileSystemItemFactory factory
-
-
Constructor Detail
-
DocumentBackedFileItem
public DocumentBackedFileItem(FileSystemItemFactory factory, DocumentModel doc)
-
DocumentBackedFileItem
public DocumentBackedFileItem(FileSystemItemFactory factory, DocumentModel doc, boolean relaxSyncRootConstraint)
-
DocumentBackedFileItem
public DocumentBackedFileItem(FileSystemItemFactory factory, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo)
-
DocumentBackedFileItem
public DocumentBackedFileItem(FileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc)
-
DocumentBackedFileItem
public DocumentBackedFileItem(FileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint)
-
DocumentBackedFileItem
public DocumentBackedFileItem(FileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo)
-
DocumentBackedFileItem
@Deprecated public DocumentBackedFileItem(VersioningFileSystemItemFactory factory, DocumentModel doc)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymore
-
DocumentBackedFileItem
@Deprecated public DocumentBackedFileItem(VersioningFileSystemItemFactory factory, DocumentModel doc, boolean relaxSyncRootConstraint)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymore
-
DocumentBackedFileItem
@Deprecated public DocumentBackedFileItem(VersioningFileSystemItemFactory factory, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymore
-
DocumentBackedFileItem
@Deprecated public DocumentBackedFileItem(VersioningFileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymore
-
DocumentBackedFileItem
@Deprecated public DocumentBackedFileItem(VersioningFileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymore
-
DocumentBackedFileItem
@Deprecated public DocumentBackedFileItem(VersioningFileSystemItemFactory factory, FolderItem parentItem, DocumentModel doc, boolean relaxSyncRootConstraint, boolean getLockInfo)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymore
-
DocumentBackedFileItem
protected DocumentBackedFileItem()
-
-
Method Detail
-
rename
public void rename(String name)
- Specified by:
rename
in interfaceFileSystemItem
-
getDownloadURL
public String getDownloadURL()
- Specified by:
getDownloadURL
in interfaceFileItem
-
getDigestAlgorithm
public String getDigestAlgorithm()
- Specified by:
getDigestAlgorithm
in interfaceFileItem
-
getOldDigest
public String getOldDigest()
- Specified by:
getOldDigest
in interfaceFileItem
-
getCanUpdate
public boolean getCanUpdate()
- Specified by:
getCanUpdate
in interfaceFileItem
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractDocumentBackedFileSystemItem
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractDocumentBackedFileSystemItem
-
initialize
@Deprecated protected final void initialize(VersioningFileSystemItemFactory factory, DocumentModel doc)
Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactory
is not used anymore
-
initialize
protected final void initialize(FileSystemItemFactory factory, DocumentModel doc)
-
getBlobHolder
protected BlobHolder getBlobHolder(DocumentModel doc)
-
getBlob
protected Blob getBlob(BlobHolder blobHolder)
-
getBlob
protected Blob getBlob(DocumentModel doc)
-
updateDocTitleIfNeeded
protected void updateDocTitleIfNeeded(DocumentModel doc, String name)
-
updateDownloadURL
protected void updateDownloadURL()
-
updateDigest
protected void updateDigest(Blob blob)
-
updateSize
protected void updateSize(Blob blob)
- Since:
- 11.1
-
getNuxeoDriveManager
protected NuxeoDriveManager getNuxeoDriveManager()
-
setDownloadURL
protected void setDownloadURL(String downloadURL)
-
setDigestAlgorithm
protected void setDigestAlgorithm(String digestAlgorithm)
-
setDigest
protected void setDigest(String digest)
-
setOldDigest
public void setOldDigest(String oldDigest)
-
setCanUpdate
protected void setCanUpdate(boolean canUpdate)
-
setSize
protected void setSize(long size)
- Since:
- 11.1
-
-