org.silverpeas.importExport.versioning
Class DocumentVersion

java.lang.Object
  extended by org.silverpeas.importExport.versioning.DocumentVersion
All Implemented Interfaces:
MimeTypes, Serializable, Cloneable

public class DocumentVersion
extends Object
implements Serializable, Cloneable, MimeTypes

See Also:
Serialized Form

Field Summary
static String CONTEXT
           
static String CONTEXT_VERSIONING
           
static int STATUS_VALIDATION_NOT_REQ
           
static int STATUS_VALIDATION_REQUIRED
           
static int STATUS_VERSION_REFUSED
           
static int STATUS_VERSION_VALIDATED
           
static int TYPE_DEFAULT_VERSION
           
static int TYPE_PUBLIC_VERSION
           
 
Fields inherited from interface com.silverpeas.util.MimeTypes
ARCHIVE_MIME_TYPE, ARCHIVE_MIME_TYPES, BZ2_ARCHIVE_MIME_TYPE, DEFAULT_MIME_TYPE, EAR_EXTENSION, EXCEL_2007_EXTENSION, EXCEL_2007_MIME_TYPE, EXCEL_2007_TEMPLATE_MIME_TYPE, EXCEL_MIME_TYPE1, EXCEL_MIME_TYPE2, GUNZIP_ARCHIVE_MIME_TYPE, GZ_ARCHIVE_MIME_TYPE, HTML_MIME_TYPE, JAR_EXTENSION, JAVA_ARCHIVE_MIME_TYPE, JSP_EXTENSION, JSP_MIME_TYPE, MIME_TYPE_OO_DB, MIME_TYPE_OO_DIAGRAM, MIME_TYPE_OO_FORMATTED_TEXT, MIME_TYPE_OO_FORMULA, MIME_TYPE_OO_GRAPHICS, MIME_TYPE_OO_IMAGE, MIME_TYPE_OO_MASTER, MIME_TYPE_OO_PRESENTATION, MIME_TYPE_OO_SPREADSHEET, MS_OFFICE_MIME_TYPES, OPEN_OFFICE_MIME_TYPES, PDF_MIME_TYPE, PHP_EXTENSION, PHP_MIME_TYPE, PLAIN_TEXT_MIME_TYPE, POWERPOINT_2007_EXTENSION, POWERPOINT_2007_MIME_TYPE, POWERPOINT_2007_TEMPLATE_MIME_TYPE, POWERPOINT_MIME_TYPE1, POWERPOINT_MIME_TYPE2, RSS_MIME_TYPE, RTF_EXTENSION, RTF_MIME_TYPE, SERVLET_HTML_CONTENT_TYPE, SHORT_ARCHIVE_MIME_TYPE, SPINFIRE_MIME_TYPE, TARGZ_ARCHIVE_MIME_TYPE, WAR_EXTENSION, WORD_2007_EXTENSION, WORD_2007_MIME_TYPE, WORD_2007_TEMPLATE_MIME_TYPE, WORD_MIME_TYPE, XHTML_MIME_TYPE, XML_MIME_TYPE
 
Constructor Summary
DocumentVersion()
           
DocumentVersion(AttachmentDetail attachment)
           
DocumentVersion(DocumentVersionPK pk, DocumentPK documentPK, int majorNumber, int minorNumber, int authorId, Date creationDate, String comments, int type, int status, String physicalName, String logicalName, String mimeType, long size, String instanceId)
           
 
Method Summary
 Object clone()
          Support Cloneable Interface
 int getAuthorId()
           
 String getComments()
           
 Date getCreationDate()
           
 String getCreatorName()
           
 String getDisplaySize()
           
 String getDocumentIcon()
           
 String getDocumentPath()
          Return the path to the document file.
 DocumentPK getDocumentPK()
           
 String getInstanceId()
           
 String getJcrPath()
           
 String getLogicalName()
           
 int getMajorNumber()
           
 String getMimeType()
           
 int getMinorNumber()
           
 String getOriginalPath()
           
 String getPhysicalName()
           
 DocumentVersionPK getPk()
           
 long getSize()
           
 int getStatus()
           
 int getType()
           
 String getWebdavUrl()
           
 String getXmlForm()
           
 XMLModelContentType getXMLModelContentType()
           
 boolean isOfficeDocument()
          Deprecated. Use isOpenOfficeCompatibleDocument instead as Ms office is no longer a special case.
 boolean isOpenOfficeCompatibleDocument()
          If 3d document
 boolean isRemoveAfterImport()
           
 boolean isSpinfireDocument()
          If 3d document
 void setAuthorId(int authorId)
           
 void setComments(String comments)
           
 void setCreationDate(Date creationDate)
           
 void setCreatorName(String creatorName)
           
 void setDocumentPK(DocumentPK documentPK)
           
 void setInstanceId(String instanceId)
           
 void setLogicalName(String logicalName)
           
 void setMajorNumber(int majorNumber)
           
 void setMimeType(String mimeType)
           
 void setMinorNumber(int minorNumber)
           
 void setOriginalPath(String originalPath)
           
 void setPhysicalName(String physicalName)
           
 void setPk(DocumentVersionPK pk)
           
 void setRemoveAfterImport(boolean removeAfterImport)
           
 void setSize(long size)
           
 void setStatus(int status)
           
 void setType(int type)
           
 void setXmlForm(String xmlForm)
           
 void setXMLModelContentType(XMLModelContentType xmlModelContentType)
           
 String toString()
          Overriden toString method for debug/trace purposes
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_VALIDATION_NOT_REQ

public static final int STATUS_VALIDATION_NOT_REQ
See Also:
Constant Field Values

STATUS_VALIDATION_REQUIRED

public static final int STATUS_VALIDATION_REQUIRED
See Also:
Constant Field Values

STATUS_VERSION_VALIDATED

public static final int STATUS_VERSION_VALIDATED
See Also:
Constant Field Values

STATUS_VERSION_REFUSED

public static final int STATUS_VERSION_REFUSED
See Also:
Constant Field Values

TYPE_DEFAULT_VERSION

public static final int TYPE_DEFAULT_VERSION
See Also:
Constant Field Values

TYPE_PUBLIC_VERSION

public static final int TYPE_PUBLIC_VERSION
See Also:
Constant Field Values

CONTEXT

public static final String CONTEXT
See Also:
Constant Field Values

CONTEXT_VERSIONING

public static final String CONTEXT_VERSIONING
Constructor Detail

DocumentVersion

public DocumentVersion()

DocumentVersion

public DocumentVersion(DocumentVersionPK pk,
                       DocumentPK documentPK,
                       int majorNumber,
                       int minorNumber,
                       int authorId,
                       Date creationDate,
                       String comments,
                       int type,
                       int status,
                       String physicalName,
                       String logicalName,
                       String mimeType,
                       long size,
                       String instanceId)

DocumentVersion

public DocumentVersion(AttachmentDetail attachment)
Method Detail

getPk

public DocumentVersionPK getPk()

setPk

public void setPk(DocumentVersionPK pk)

getDocumentPK

public DocumentPK getDocumentPK()

setDocumentPK

public void setDocumentPK(DocumentPK documentPK)

getMajorNumber

public int getMajorNumber()

setMajorNumber

public void setMajorNumber(int majorNumber)

getMinorNumber

public int getMinorNumber()

setMinorNumber

public void setMinorNumber(int minorNumber)

getAuthorId

public int getAuthorId()

setAuthorId

public void setAuthorId(int authorId)

getCreationDate

public Date getCreationDate()

setCreationDate

public void setCreationDate(Date creationDate)

getComments

public String getComments()

setComments

public void setComments(String comments)

getType

public int getType()

setType

public void setType(int type)

getStatus

public int getStatus()

setStatus

public void setStatus(int status)

getPhysicalName

public String getPhysicalName()

setPhysicalName

public void setPhysicalName(String physicalName)

getLogicalName

public String getLogicalName()

setLogicalName

public void setLogicalName(String logicalName)

getMimeType

public String getMimeType()

setMimeType

public void setMimeType(String mimeType)

getSize

public long getSize()

getDisplaySize

public String getDisplaySize()

setSize

public void setSize(long size)

getInstanceId

public String getInstanceId()

setInstanceId

public void setInstanceId(String instanceId)

isOfficeDocument

@Deprecated
public boolean isOfficeDocument()
Deprecated. Use isOpenOfficeCompatibleDocument instead as Ms office is no longer a special case.

Return if a document is an Office file

Returns:
true or false

getJcrPath

public String getJcrPath()

getWebdavUrl

public String getWebdavUrl()

isSpinfireDocument

public boolean isSpinfireDocument()
If 3d document

Returns:
true or false

isOpenOfficeCompatibleDocument

public boolean isOpenOfficeCompatibleDocument()
If 3d document

Returns:
true or false

toString

public String toString()
Overriden toString method for debug/trace purposes

Overrides:
toString in class Object
Returns:
the String representation of this document.

clone

public Object clone()
Support Cloneable Interface

Overrides:
clone in class Object
Returns:
the clone

getDocumentPath

public String getDocumentPath()
Return the path to the document file.

Returns:
the path to the document file.

getCreatorName

public String getCreatorName()

setCreatorName

public void setCreatorName(String creatorName)

getXmlForm

public String getXmlForm()

setXmlForm

public void setXmlForm(String xmlForm)

getXMLModelContentType

public XMLModelContentType getXMLModelContentType()

setXMLModelContentType

public void setXMLModelContentType(XMLModelContentType xmlModelContentType)

getDocumentIcon

public String getDocumentIcon()

isRemoveAfterImport

public boolean isRemoveAfterImport()

setRemoveAfterImport

public void setRemoveAfterImport(boolean removeAfterImport)

setOriginalPath

public void setOriginalPath(String originalPath)

getOriginalPath

public String getOriginalPath()


Copyright © 2016 Silverpeas. All Rights Reserved.