Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.xpn.xwiki.doc
Class XWikiAttachment  view XWikiAttachment download XWikiAttachment.java

java.lang.Object
  extended bycom.xpn.xwiki.doc.XWikiAttachment

public class XWikiAttachment
extends java.lang.Object


Field Summary
private  XWikiAttachmentArchive attachment_archive
           
private  XWikiAttachmentContent attachment_content
           
private  java.lang.String author
           
private  java.lang.String comment
           
private  java.util.Date date
           
private  XWikiDocument doc
           
private  java.lang.String filename
           
private  int filesize
           
private  boolean isMetaDataDirty
           
private  Archive metaArchive
           
private  Version version
           
 
Constructor Summary
XWikiAttachment()
           
XWikiAttachment(XWikiDocument doc, java.lang.String filename)
           
 
Method Summary
 java.lang.Object clone()
          This method may be called to create a new copy of the Object.
 void fromXML(org.dom4j.Element docel)
           
 Archive getArchive()
           
 XWikiAttachmentArchive getAttachment_archive()
           
 XWikiAttachmentContent getAttachment_content()
           
 java.lang.String getAuthor()
           
 java.lang.String getComment()
           
 byte[] getContent(com.xpn.xwiki.XWikiContext context)
           
 java.util.Date getDate()
           
 XWikiDocument getDoc()
           
 long getDocId()
           
 java.lang.String getFilename()
           
 int getFilesize()
           
 long getId()
           
 java.lang.String getMimeType(com.xpn.xwiki.XWikiContext context)
           
 Version getRCSVersion()
           
 java.lang.String getVersion()
           
 java.util.List getVersionList()
           
 Version[] getVersions()
           
 void incrementVersion()
           
 boolean isContentDirty()
           
 boolean isImage(com.xpn.xwiki.XWikiContext context)
           
 boolean isMetaDataDirty()
           
 void setArchive(Archive archive)
           
 void setAttachment_archive(XWikiAttachmentArchive attachment_archive)
           
 void setAttachment_content(XWikiAttachmentContent attachment_content)
           
 void setAuthor(java.lang.String author)
           
 void setComment(java.lang.String comment)
           
 void setContent(byte[] data)
           
 void setDate(java.util.Date date)
           
 void setDoc(XWikiDocument doc)
           
 void setDocId(long id)
           
 void setFilename(java.lang.String filename)
           
 void setFilesize(int filesize)
           
 void setId(long id)
           
 void setMetaDataDirty(boolean metaDataDirty)
           
 void setRCSVersion(Version version)
           
 void setVersion(java.lang.String version)
           
 org.dom4j.Element toXML()
           
 org.dom4j.Element toXML(boolean bWithAttachmentContent, boolean bWithVersions)
           
 void updateContentArchive(com.xpn.xwiki.XWikiContext context)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doc

private XWikiDocument doc

filesize

private int filesize

filename

private java.lang.String filename

author

private java.lang.String author

version

private Version version

comment

private java.lang.String comment

date

private java.util.Date date

metaArchive

private Archive metaArchive

attachment_content

private XWikiAttachmentContent attachment_content

attachment_archive

private XWikiAttachmentArchive attachment_archive

isMetaDataDirty

private boolean isMetaDataDirty
Constructor Detail

XWikiAttachment

public XWikiAttachment(XWikiDocument doc,
                       java.lang.String filename)

XWikiAttachment

public XWikiAttachment()
Method Detail

getId

public long getId()

setDocId

public void setDocId(long id)

getDocId

public long getDocId()

setId

public void setId(long id)

clone

public java.lang.Object clone()
Description copied from class: java.lang.Object
This method may be called to create a new copy of the Object. The typical behavior is as follows:
  • o == o.clone() is false
  • o.getClass() == o.clone().getClass() is true
  • o.equals(o) is true

However, these are not strict requirements, and may be violated if necessary. Of the three requirements, the last is the most commonly violated, particularly if the subclass does not override Object.equals(Object)>Object.equals(Object) 55 .

If the Object you call clone() on does not implement java.lang.Cloneable (which is a placeholder interface), then a CloneNotSupportedException is thrown. Notice that Object does not implement Cloneable; this method exists as a convenience for subclasses that do.

Object's implementation of clone allocates space for the new Object using the correct class, without calling any constructors, and then fills in all of the new field values with the old field values. Thus, it is a shallow copy. However, subclasses are permitted to make a deep copy.

All array types implement Cloneable, and override this method as follows (it should never fail):

 public Object clone()
 {
   try
     {
       super.clone();
     }
   catch (CloneNotSupportedException e)
     {
       throw new InternalError(e.getMessage());
     }
 }
 


getFilesize

public int getFilesize()

setFilesize

public void setFilesize(int filesize)

getFilename

public java.lang.String getFilename()

setFilename

public void setFilename(java.lang.String filename)

getAuthor

public java.lang.String getAuthor()

setAuthor

public void setAuthor(java.lang.String author)

getVersion

public java.lang.String getVersion()

setVersion

public void setVersion(java.lang.String version)

getRCSVersion

public Version getRCSVersion()

setRCSVersion

public void setRCSVersion(Version version)

getComment

public java.lang.String getComment()

setComment

public void setComment(java.lang.String comment)

getDoc

public XWikiDocument getDoc()

setDoc

public void setDoc(XWikiDocument doc)

getDate

public java.util.Date getDate()

setDate

public void setDate(java.util.Date date)

isContentDirty

public boolean isContentDirty()

incrementVersion

public void incrementVersion()

isMetaDataDirty

public boolean isMetaDataDirty()

setMetaDataDirty

public void setMetaDataDirty(boolean metaDataDirty)

toXML

public org.dom4j.Element toXML()

toXML

public org.dom4j.Element toXML(boolean bWithAttachmentContent,
                               boolean bWithVersions)

fromXML

public void fromXML(org.dom4j.Element docel)
             throws org.dom4j.DocumentException,
                    java.text.ParseException,
                    java.lang.IllegalAccessException,
                    java.lang.InstantiationException,
                    java.lang.ClassNotFoundException

getAttachment_content

public XWikiAttachmentContent getAttachment_content()

setAttachment_content

public void setAttachment_content(XWikiAttachmentContent attachment_content)

getAttachment_archive

public XWikiAttachmentArchive getAttachment_archive()

setAttachment_archive

public void setAttachment_archive(XWikiAttachmentArchive attachment_archive)

getContent

public byte[] getContent(com.xpn.xwiki.XWikiContext context)
                  throws com.xpn.xwiki.XWikiException

getArchive

public Archive getArchive()

setArchive

public void setArchive(Archive archive)

getVersions

public Version[] getVersions()

getVersionList

public java.util.List getVersionList()
                              throws com.xpn.xwiki.XWikiException

setContent

public void setContent(byte[] data)

updateContentArchive

public void updateContentArchive(com.xpn.xwiki.XWikiContext context)
                          throws com.xpn.xwiki.XWikiException

getMimeType

public java.lang.String getMimeType(com.xpn.xwiki.XWikiContext context)

isImage

public boolean isImage(com.xpn.xwiki.XWikiContext context)