java.lang.Object
com.xpn.xwiki.doc.XWikiAttachment
- public class XWikiAttachment
- extends java.lang.Object
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
XWikiAttachment
public XWikiAttachment(XWikiDocument doc,
java.lang.String filename)
XWikiAttachment
public XWikiAttachment()
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)