public class WfXMLFolder extends WfXMLForm
WfXMLObject
objects can be
added as content to the folder.WfXMLObject
for examples on how to use the WfXMLObject objects in
general.content, FIELDDT, FORM_FIELD, FORM_FIELDNAME, FORMID, formName, FORMSUBID, FORMUSER, FORMVERSION, id, subformId, subForms, version
namespace, notes, userId
Constructor and Description |
---|
WfXMLFolder(DMSFolder dmsFolder)
This constructor creates a WfXMLFolder out of a
DMSFolder . |
WfXMLFolder(Element folderFormElem)
Deprecated.
|
WfXMLFolder(String name,
String userId)
Create a new empty standard folder and set a name for it.
|
WfXMLFolder(org.apache.xmlbeans.XmlObject obj)
loads the
WfXMLFolder from a FolderFormDocument.FolderForm element |
Modifier and Type | Method and Description |
---|---|
void |
addContent(WfXMLObject obj)
Add another
WfXMLObject to the content of this folder. |
Object |
clone()
Creates a copy of this WfXMLFolder.
|
DMSObject |
createDMSObject(User defaultCreator)
This method creates a
DMSFolder out of this WfXMLObject
object. |
DMSObject |
createDMSObject(User defaultCreator,
DMSFolder parentFolder) |
void |
fill(DMSObject existingFolder,
User defaultCreator)
This method fills an existing DMS folder with the data contained in this
WfXML folder.
|
Element |
getAsXML()
Deprecated.
|
String |
getName()
Get the name of the folder.
|
org.apache.xmlbeans.XmlObject |
getXMLObject() |
List<WfXMLObject> |
listContent()
You get a
List filled with the content of this
folder. |
List<WfXMLFolder> |
listSubFolders()
Use this method to get a list containing all subfolders of this folder.
|
void |
setName(String name)
Set a name for the folder.
|
addSubForm, attachNote, attachNote, getField, getFormName, getId, getNotes, getSubformId, getSubForms, getVersion, removeField, setField, setField, setField, setField, setFormName, setId, setSubformId, setVersion
createInstance, createInstance, createInstance, getUser, getUser, getUserId, setUserId
public WfXMLFolder(String name, String userId)
name
- The name of the folder.userId
- The user who will be the creator of this folder. Set it to
null
, if you don't want to specify a user.public WfXMLFolder(org.apache.xmlbeans.XmlObject obj)
WfXMLFolder
from a FolderFormDocument.FolderForm
element@Deprecated public WfXMLFolder(Element folderFormElem)
Element
holding
data of a folder. The content of the folder is also created as WfXMLObject
objects.folderFormElem
- A JDOM Element
holding the folder and its
content.IllegalArgumentException
- if the folderFormElem
parameter
is not a valid folder element.public WfXMLFolder(DMSFolder dmsFolder) throws Exception
DMSFolder
. All content of the folder is also
transformed to WfXMLObject
objects.dmsFolder
- The DMSFolder folder.Exception
- if an item of the folder cannot be created.public String getName()
public void setName(String name)
name
- The new folder name.public void addContent(WfXMLObject obj)
WfXMLObject
to the content of this folder.obj
- The object you want to add.public List<WfXMLObject> listContent()
List
filled with the content of this
folder. The elements of the list are WfXMLObject
objects. You can
perform changes on the list without affecting this WfXMLFolder, but the
referenced WfXMLObject
objects are not copied, thus changes on them
also affect the referenced objects of this folder.List
containing the content (WfXMLObject
objects) of this folder. If the folder is empty, the returned List is also
empty.public List<WfXMLFolder> listSubFolders()
List
filled with the subfolders of this folder.
The elements of the List are WfXMLFolder objects. If there are no subfolders,
the returned List will be empty.public void fill(DMSObject existingFolder, User defaultCreator) throws Exception
fill
in class WfXMLForm
existingFolder
- An existing DMSFolder
that you
wish to fill with the data of this WfXMLFolder
. If you pass not
a DMSFolder
, the method will do nothing.defaultCreator
- A default creator for elements that will be newly created.
It would be good to provide a default creator for this method, because maybe
there will be new DMS objects created and then a creator is needed in case that
the corresponding WfXML objects don't contain creators.Exception
- if filling the DMSFolder
fails (update
of existing elements or creation of new elements doesn't work).public DMSObject createDMSObject(User defaultCreator) throws Exception
DMSFolder
out of this WfXMLObject
object. The whole content of that folder will also be created (various
DMSObject
objects. Usually the objects are created by
the user who was defined to create them. If no user is defined in a WfXMLObject
(or if the defined user doesn't exist), the defaultCreator
will be used.createDMSObject
in class WfXMLForm
defaultCreator
- You can specify a default creator for the case that no
other user can be found.DMSForm
, which
represents this WfXMLForm
.Exception
- if no user can be found for creating the
DMSObject
objects, or if creating the folder or
parts of its content fails.public DMSObject createDMSObject(User defaultCreator, DMSFolder parentFolder) throws Exception
Exception
@Deprecated public Element getAsXML()
Element
contains all the data of the folder (including
all WfXMLObject
objects and subfolders, etc.).public Object clone()
WfXMLForm.clone()
, so you can find
more details there. The folder content array of this WfXMLFolder is cloned,
but the referenced WfXMLObject
objects are not cloned. So if you want
to modify these objects, you should take care.clone
in class WfXMLForm
WfXMLFolder
, because the returned object is always of that
type.public org.apache.xmlbeans.XmlObject getXMLObject()
getXMLObject
in class WfXMLForm
@enterprise 10.0.38589 Copyright © 2001-2024 Groiss Informatics GmbH. All Rights Reserved.