|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.wfxml.WfXMLObject
com.groiss.wfxml.WfXMLForm
com.groiss.wfxml.WfXMLDocForm
public class WfXMLDocForm
This class represents DMSDocForm objects.
See the WfXMLObject base class for general information and examples
of how to use WfXMLObject objects.
| Field Summary |
|---|
| Fields inherited from class com.groiss.wfxml.WfXMLForm |
|---|
content, FIELDDT, FORM_FIELD, FORM_FIELDNAME, FORMID, formName, FORMSUBID, FORMUSER, FORMVERSION, id, subformId, subForms, version |
| Fields inherited from class com.groiss.wfxml.WfXMLObject |
|---|
namespace, notes, userId |
| Constructor Summary | |
|---|---|
WfXMLDocForm(DMSDocForm dmsDocForm)
Create a WfXMLDocForm out of a DMSDocForm. |
|
WfXMLDocForm(org.jdom.Element docFormElem)
Creates a WfXMLDocForm object out of a XML representation. |
|
WfXMLDocForm(java.lang.String name,
java.lang.String extension,
byte[] content,
java.lang.String userId)
Creates a new WfXMLDocForm. |
|
| Method Summary | |
|---|---|
DMSObject |
createDMSObject(User defaultCreator)
Use this method to create a DMSObject out of this
WfXMLDocForm object. |
void |
fill(DMSObject existingDocForm,
User defaultCreator)
This method fills an existing DMSForm with
the values of this WfXMLForm. |
org.jdom.Element |
getAsXML()
Creates a XML representation of the WfXMLDocForm. |
byte[] |
getContent()
Returns the document's content byte array. |
java.lang.String |
getExtension()
Get the extension of the document (filename-extension). |
java.lang.String |
getName()
Get the full name of the document (filename and extension). |
java.lang.String |
getNamePart()
Returns just the name part of this doc form. |
void |
setContent(byte[] content)
Set new content for the document. |
void |
setExtensionPart(java.lang.String extension)
Set a new extension for the document. |
void |
setNamePart(java.lang.String name)
Set the name part of the document (filename only; without extension). |
| Methods inherited from class com.groiss.wfxml.WfXMLForm |
|---|
addSubForm, attachNote, attachNote, clone, getField, getFormName, getId, getNotes, getSubformId, getSubForms, getVersion, removeField, setField, setField, setField, setFormName, setId, setSubformId, setVersion |
| Methods inherited from class com.groiss.wfxml.WfXMLObject |
|---|
createInstance, createInstance, getUser, getUser, getUserId, setUserId |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WfXMLDocForm(java.lang.String name,
java.lang.String extension,
byte[] content,
java.lang.String userId)
null if they don't exist or if you prefer setting them with
the corresponding setter method later.
name - The name of the document (filename).extension - The extension of the document (filename-extension).content - A byte array holding the content of this document form. The
byte array will be stored in zipped form.userId - A user who will be the creator of the DMSDocForm,
when it is created. You can set this to null if you don't want
to specify a particular user.
public WfXMLDocForm(org.jdom.Element docFormElem)
throws java.lang.IllegalArgumentException
Element contains data and attached notes.
docFormElem - The JDOM Element holding data about
a docForm.
java.lang.IllegalArgumentException - if docFormElem is an
unexpected element.
public WfXMLDocForm(DMSDocForm dmsDocForm)
throws java.lang.Exception
DMSDocForm. Attached
notes are also included.
dmsDocForm - A DMSDocForm object.
java.lang.Exception - if there are reading-problems and the WfXMLDocForm
cannot be created.| Method Detail |
|---|
public java.lang.String getName()
getName in class WfXMLFormpublic void setNamePart(java.lang.String name)
name - The new name for the document.public java.lang.String getNamePart()
public java.lang.String getExtension()
public void setExtensionPart(java.lang.String extension)
extension - The new extension for the document.public byte[] getContent()
public void setContent(byte[] content)
content - The new content for this document form object.
public void fill(DMSObject existingDocForm,
User defaultCreator)
throws java.lang.Exception
WfXMLFormDMSForm with
the values of this WfXMLForm. It's similar to
WfXMLForm.createDMSObject(com.groiss.org.User), with the only difference, that the
DMSForm must already exist.DMSForm. All values that have been
defined in this WfXMLForm will be set in the
DMSForm. So values, which exist in the
DMSForm, will not be changed, if they are
not defined in the WfXMLForm...
fill in class WfXMLFormexistingDocForm - An existing DMSForm, which
will be filled with the values set in this WfXMLForm.
If you pass an object of a different type to this method,
nothing will be done.defaultCreator - A default user for creating objects (notes, subforms), if no
particular user is defined for creating them. You can set this
parameter to null if you don't want to provide
a default creator.
java.lang.Exception - if updating the object fails.
public DMSObject createDMSObject(User defaultCreator)
throws java.lang.Exception
DMSObject out of this
WfXMLDocForm object.
createDMSObject in class WfXMLFormdefaultCreator - If the user who is defined in this document form
cannot be found, or if no user was defined, this defaultCreator
will be used to create DMSObject objects. Providing
a default creator is optional, so you can pass null if you don't
want to set a default creator.
DMSForm, which
represents this WfXMLForm.
ApplicationException - if there is no user for creating the
DMSObject, or if creating failed.
java.lang.Exceptionpublic org.jdom.Element getAsXML()
Element object contains the content of this WfXMLDocForm
including attached notes.
getAsXML in class WfXMLFormElement with the data of this WfXMLDocForm.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||