public class WfXMLDocForm extends WfXMLForm
WfXMLObject
base class for general information and examples
of how to use WfXMLObject objects.content, FIELDDT, FORM_FIELD, FORM_FIELDNAME, FORMID, formName, FORMSUBID, FORMUSER, FORMVERSION, id, subformId, subForms, version
namespace, notes, userId
Constructor and Description |
---|
WfXMLDocForm(DMSDocForm dmsDocForm)
Create a WfXMLDocForm out of a
DMSDocForm . |
WfXMLDocForm(Element docFormElem)
Deprecated.
|
WfXMLDocForm(String name,
String extension,
byte[] content,
String userId)
Creates a new WfXMLDocForm.
|
WfXMLDocForm(org.apache.xmlbeans.XmlObject obj) |
Modifier and Type | Method and Description |
---|---|
DMSObject |
createDMSObject(User defaultCreator)
Use this method to create a
DMSObject out of this
WfXMLDocForm object. |
void |
fill(DMSObject existingDocForm,
User defaultCreator)
|
Element |
getAsXML()
Creates a XML representation of the WfXMLDocForm.
|
byte[] |
getContent()
Returns the document's content byte array.
|
String |
getExtension()
Get the extension of the document (filename-extension).
|
String |
getName()
Get the full name of the document (filename and extension).
|
String |
getNamePart()
Returns just the name part of this doc form.
|
org.apache.xmlbeans.XmlObject |
getXMLObject() |
void |
setContent(byte[] content)
Set new content for the document.
|
void |
setExtensionPart(String extension)
Set a new extension for the document.
|
void |
setNamePart(String name)
Set the name part of the document (filename only; without extension).
|
addSubForm, attachNote, attachNote, clone, getField, getFormName, getId, getNotes, getSubformId, getSubForms, getVersion, removeField, setField, setField, setField, setField, setFormName, setId, setSubformId, setVersion
createInstance, createInstance, createInstance, getUser, getUser, getUserId, setUserId
public WfXMLDocForm(String name, String extension, byte[] content, 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.apache.xmlbeans.XmlObject obj)
@Deprecated public WfXMLDocForm(Element docFormElem)
Element
contains data and attached notes.docFormElem
- The JDOM Element
holding data about
a docForm.IllegalArgumentException
- if docFormElem
is an
unexpected element.public WfXMLDocForm(DMSDocForm dmsDocForm) throws Exception
DMSDocForm
. Attached
notes are also included.dmsDocForm
- A DMSDocForm
object.Exception
- if there are reading-problems and the WfXMLDocForm
cannot be created.public String getName()
public void setNamePart(String name)
name
- The new name for the document.public String getNamePart()
public String getExtension()
public void setExtensionPart(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 Exception
WfXMLForm
DMSForm
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 WfXMLForm
existingDocForm
- 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.Exception
- if no user could be found, or if something fails while
objects are created and attached/added.public DMSObject createDMSObject(User defaultCreator) throws Exception
DMSObject
out of this
WfXMLDocForm object.createDMSObject
in class WfXMLForm
defaultCreator
- 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
.Exception
- if there is no user for creating the
DMSObject
, or if creating failed.public Element getAsXML()
Element
object contains the content of this WfXMLDocForm
including attached notes.public org.apache.xmlbeans.XmlObject getXMLObject()
getXMLObject
in class WfXMLForm
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.