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
DocumentModelbacked implementation of aFileItem.- Author:
- Antoine Taillefer
-
-
Field Summary
Fields Modifier and Type Field Description protected booleancanUpdateprotected Stringdigestprotected StringdigestAlgorithmprotected StringdownloadURLprotected FileSystemItemFactoryfactoryprotected longsize-
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 protectedDocumentBackedFileItem()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, theVersioningFileSystemItemFactoryis 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, theVersioningFileSystemItemFactoryis 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, theVersioningFileSystemItemFactoryis 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, theVersioningFileSystemItemFactoryis 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, theVersioningFileSystemItemFactoryis 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, theVersioningFileSystemItemFactoryis not used anymore
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)BlobgetBlob()protected BlobgetBlob(BlobHolder blobHolder)protected BlobgetBlob(DocumentModel doc)protected BlobHoldergetBlobHolder(DocumentModel doc)booleangetCanUpdate()StringgetDigest()StringgetDigestAlgorithm()StringgetDownloadURL()protected StringgetFileName(Blob blob, String docTitle)protected NuxeoDriveManagergetNuxeoDriveManager()longgetSize()inthashCode()protected voidinitialize(FileSystemItemFactory factory, DocumentModel doc)protected voidinitialize(VersioningFileSystemItemFactory factory, DocumentModel doc)Deprecated.since 9.1 versioning policy is now handled at versioning service level, as versioning is removed at drive level, theVersioningFileSystemItemFactoryis not used anymorevoidrename(String name)voidsetBlob(Blob blob)protected voidsetCanUpdate(boolean canUpdate)protected voidsetDigest(String digest)protected voidsetDigestAlgorithm(String digestAlgorithm)protected voidsetDownloadURL(String downloadURL)protected voidsetSize(long size)protected voidupdateDigest(Blob blob)protected voidupdateDocTitleIfNeeded(DocumentModel doc, String name)protected voidupdateDownloadURL()protected voidupdateSize(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
-
size
protected long size
- Since:
- 11.1
-
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, theVersioningFileSystemItemFactoryis 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, theVersioningFileSystemItemFactoryis 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, theVersioningFileSystemItemFactoryis 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, theVersioningFileSystemItemFactoryis 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, theVersioningFileSystemItemFactoryis 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, theVersioningFileSystemItemFactoryis not used anymore
-
DocumentBackedFileItem
protected DocumentBackedFileItem()
-
-
Method Detail
-
rename
public void rename(String name)
- Specified by:
renamein interfaceFileSystemItem
-
getDownloadURL
public String getDownloadURL()
- Specified by:
getDownloadURLin interfaceFileItem
-
getDigestAlgorithm
public String getDigestAlgorithm()
- Specified by:
getDigestAlgorithmin interfaceFileItem
-
getCanUpdate
public boolean getCanUpdate()
- Specified by:
getCanUpdatein interfaceFileItem
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractDocumentBackedFileSystemItem
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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, theVersioningFileSystemItemFactoryis 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)
-
getFileName
protected String getFileName(Blob blob, String docTitle)
-
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)
-
setCanUpdate
protected void setCanUpdate(boolean canUpdate)
-
setSize
protected void setSize(long size)
- Since:
- 11.1
-
-