|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.attachment.model.SimpleDocument
org.silverpeas.attachment.model.HistorisedDocument
public class HistorisedDocument
This class represents a document that is versioned. It exposes all data of a versioned
document from the master version to the first version.
To obtain the master version, please use getVersionMaster()
method (must return the
same instance as the one of "this").
To check if the current instance is indexed on master version,
please use SimpleDocument.isVersionMaster()
method.
Field Summary |
---|
Fields inherited from class org.silverpeas.attachment.model.SimpleDocument |
---|
ATTACHMENT_PREFIX, DOCUMENT_PREFIX, FILE_PREFIX, VERSION_PREFIX, WEBDAV_FOLDER |
Constructor Summary | |
---|---|
HistorisedDocument()
|
|
HistorisedDocument(SimpleDocument doc)
|
|
HistorisedDocument(SimpleDocumentPK pk,
String foreignId,
int order,
SimpleAttachment file)
|
|
HistorisedDocument(SimpleDocumentPK pk,
String foreignId,
int order,
String owner,
SimpleAttachment file)
|
Method Summary | |
---|---|
List<SimpleDocumentVersion> |
getFunctionalHistory()
Returns functional history based on versions and indexes. |
List<SimpleDocumentVersion> |
getHistory()
Returns technical history (as the JCR) |
SimpleDocument |
getLastPublicVersion()
Returns the more recent public version of this document - null if none exists. |
SimpleDocumentVersion |
getPreviousVersion()
|
List<SimpleDocument> |
getPublicVersions()
|
SimpleDocumentVersion |
getVersionIdentifiedBy(String id)
Gets from the history the version identified by the given identifier. |
HistorisedDocument |
getVersionMaster()
Returns the master of versioned document. |
boolean |
isVersioned()
|
void |
setHistory(List<SimpleDocumentVersion> history)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HistorisedDocument(SimpleDocumentPK pk, String foreignId, int order, SimpleAttachment file)
public HistorisedDocument(SimpleDocumentPK pk, String foreignId, int order, String owner, SimpleAttachment file)
public HistorisedDocument()
public HistorisedDocument(SimpleDocument doc)
Method Detail |
---|
public HistorisedDocument getVersionMaster()
SimpleDocument
getVersionMaster
in class SimpleDocument
public boolean isVersioned()
isVersioned
in class SimpleDocument
public List<SimpleDocumentVersion> getHistory()
public SimpleDocumentVersion getVersionIdentifiedBy(String id)
id
- the identifier of the searched version.
public List<SimpleDocumentVersion> getFunctionalHistory()
public void setHistory(List<SimpleDocumentVersion> history)
public List<SimpleDocument> getPublicVersions()
public SimpleDocument getLastPublicVersion()
getLastPublicVersion
in class SimpleDocument
public SimpleDocumentVersion getPreviousVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |