org.silverpeas.attachment.model
Class SimpleDocumentVersion

java.lang.Object
  extended by org.silverpeas.attachment.model.SimpleDocument
      extended by org.silverpeas.attachment.model.SimpleDocumentVersion
All Implemented Interfaces:
Serializable

public class SimpleDocumentVersion
extends SimpleDocument

This class represents one version in the history of a versioned simple document.

The identifier of the component instance provided by this class is the one of the head version. It is the same thing for the provided foreign identifier information. To retrieve the real historised values of the version, please use methods for which the name prefix is getRealVersion...

Author:
Yohann Chastagnier
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.silverpeas.attachment.model.SimpleDocument
ATTACHMENT_PREFIX, DOCUMENT_PREFIX, FILE_PREFIX, VERSION_PREFIX, WEBDAV_FOLDER
 
Constructor Summary
SimpleDocumentVersion(SimpleDocument documentVersion, HistorisedDocument masterVersion)
          The default constructor of a simple document version.
 
Method Summary
 String getAttachmentURL()
          Returns the attachment URL.
 SimpleDocument getLastPublicVersion()
          Returns the more recent public version of this document - null if none exists.
 String getOnlineURL()
           
 SimpleDocumentVersion getPreviousVersion()
           
 String getRealVersionForeignId()
          Gets the real value of the foreign identifier of the version and not the one of the head version.
 SimpleDocumentPK getRealVersionPk()
          Gets the real value of the PK of the version and not the one of the head version.
 String getUniversalURL()
           
 HistorisedDocument getVersionMaster()
          Returns the master of versioned document.
 String getWebdavUrl()
           
 boolean isVersioned()
           
 void setPreviousVersion(SimpleDocumentVersion previousVersion)
           
 void setVersionMaster(SimpleDocument versionMaster)
           
 
Methods inherited from class org.silverpeas.attachment.model.SimpleDocument
addRolesForWhichDownloadIsAllowed, addRolesForWhichDownloadIsAllowed, addRolesForWhichDownloadIsForbidden, addRolesForWhichDownloadIsForbidden, canBeAccessedBy, canBeModifiedBy, computeNodeName, edit, equals, getAlert, getAliasURL, getAttachment, getAttachmentPath, getCloneId, getComment, getContentType, getCreated, getCreatedBy, getDescription, getDirectoryPath, getDisplayIcon, getDocumentType, getEditedBy, getExpiry, getFilename, getFolder, getForbiddenDownloadForRoles, getForeignId, getFullJcrContentPath, getFullJcrPath, getId, getInstanceId, getLanguage, getMajorVersion, getMinorVersion, getNodeName, getOldSilverpeasId, getOrder, getPk, getRepositoryPath, getReservation, getSize, getStatus, getTitle, getUpdated, getUpdatedBy, getVersion, getVersionIndex, getWebdavContentEditionLanguage, getWebdavContentEditionSize, getWebdavJcrPath, getWebURL, getXmlFormId, hashCode, isContentArchive, isContentImage, isContentMail, isContentPdf, isContentSpinfire, isDownloadAllowedForReaders, isDownloadAllowedForRoles, isDownloadAllowedForRolesFrom, isOpenOfficeCompatible, isPublic, isReadOnly, isSharingAllowedForRolesFrom, isVersionMaster, release, resetWebdavContentEditionContext, setAlert, setAttachment, setCloneId, setComment, setContentType, setCreated, setDescription, setDocumentType, setExpiry, setFilename, setForeignId, setId, setLanguage, setMajorVersion, setMinorVersion, setNodeName, setOldSilverpeasId, setOrder, setPK, setPublicDocument, setRepositoryPath, setReservation, setSize, setStatus, setTitle, setUpdated, setUpdatedBy, setVersionIndex, setXmlFormId, toString, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleDocumentVersion

public SimpleDocumentVersion(SimpleDocument documentVersion,
                             HistorisedDocument masterVersion)
The default constructor of a simple document version.

Parameters:
documentVersion - the original version.
masterVersion -
Method Detail

getVersionMaster

public HistorisedDocument getVersionMaster()
Description copied from class: SimpleDocument
Returns the master of versioned document. If not versionned, it returns itself. If versioned, it returns the master of versioned document (the last created or updated in other words).

Overrides:
getVersionMaster in class SimpleDocument
Returns:

setVersionMaster

public void setVersionMaster(SimpleDocument versionMaster)
Overrides:
setVersionMaster in class SimpleDocument

getPreviousVersion

public SimpleDocumentVersion getPreviousVersion()

setPreviousVersion

public void setPreviousVersion(SimpleDocumentVersion previousVersion)

getRealVersionPk

public SimpleDocumentPK getRealVersionPk()
Gets the real value of the PK of the version and not the one of the head version.

Returns:
the historised PK value of the historised version.

getRealVersionForeignId

public String getRealVersionForeignId()
Gets the real value of the foreign identifier of the version and not the one of the head version.

Returns:
the historised foreign identifier value of the historised version.

isVersioned

public boolean isVersioned()
Overrides:
isVersioned in class SimpleDocument

getLastPublicVersion

public SimpleDocument getLastPublicVersion()
Description copied from class: SimpleDocument
Returns the more recent public version of this document - null if none exists.

Overrides:
getLastPublicVersion in class SimpleDocument
Returns:
the more recent public version of this document - null if none exists.

getWebdavUrl

public String getWebdavUrl()
Overrides:
getWebdavUrl in class SimpleDocument

getOnlineURL

public String getOnlineURL()
Overrides:
getOnlineURL in class SimpleDocument

getAttachmentURL

public String getAttachmentURL()
Description copied from class: SimpleDocument
Returns the attachment URL.

Overrides:
getAttachmentURL in class SimpleDocument
Returns:
the attachment URL.

getUniversalURL

public String getUniversalURL()
Overrides:
getUniversalURL in class SimpleDocument


Copyright © 2016 Silverpeas. All Rights Reserved.