|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.groiss.wfxml.WfXMLObject com.groiss.wfxml.WfXMLForm com.groiss.wfxml.WfXMLFolder
public class WfXMLFolder
This class represents a DMSFolder. Other WfXMLObject
objects can be
added as content to the folder.
See WfXMLObject
for examples on how to use the WfXMLObject objects in
general.
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 | |
---|---|
WfXMLFolder(DMSFolder folder)
This constructor creates a WfXMLFolder out of a DMSFolder . |
|
WfXMLFolder(org.jdom.Element folderFormElem)
Deprecated. |
|
WfXMLFolder(java.lang.String name,
java.lang.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 |
Method Summary | |
---|---|
void |
addContent(WfXMLObject obj)
Add another WfXMLObject to the content of this folder. |
java.lang.Object |
clone()
Creates a copy of this WfXMLFolder. |
DMSObject |
createDMSObject(User defaultCreator)
This method creates a DMSFolder out of this WfXMLObject
object. |
void |
fill(DMSObject existingFolder,
User defaultCreator)
This method fills an existing DMS folder with the data contained in this WfXML folder. |
org.jdom.Element |
getAsXML()
Deprecated. |
java.lang.String |
getName()
Get the name of the folder. |
org.apache.xmlbeans.XmlObject |
getXMLObject()
|
java.util.List<WfXMLObject> |
listContent()
You get a List filled with the content of this
folder. |
java.util.List |
listSubFolders()
Use this method to get a list containing all subfolders of this folder. |
void |
setFormTypesRestriction(java.util.Collection<FormType> formTypes)
Sets a form type restriction for WfXMLDocForm objects in this folder and its subfolders. |
void |
setName(java.lang.String name)
Set a name for the folder. |
Methods inherited from class com.groiss.wfxml.WfXMLForm |
---|
addSubForm, attachNote, attachNote, 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, 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 WfXMLFolder(java.lang.String name, java.lang.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(org.jdom.Element folderFormElem) throws java.lang.IllegalArgumentException
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.
java.lang.IllegalArgumentException
- if the folderFormElem
parameter
is not a valid folder element.public WfXMLFolder(DMSFolder folder) throws java.lang.Exception
DMSFolder
. All content of the folder is also
transformed to WfXMLObject
objects...
folder
- The DMSFolder folder.
java.lang.Exception
- if an item of the folder cannot be created.Method Detail |
---|
public void setFormTypesRestriction(java.util.Collection<FormType> formTypes)
listContent()
only lists WfXMLDocForm objects of the defined
form types. Other WfXMLObject types are not affected.getAsXML()
also only includes WfXMLDocForm objects of the
defined form types.fill(com.groiss.dms.DMSObject, com.groiss.org.User)
ignores WfXMLDocForm objects that are not contained in
the defined form types.createDMSObject(com.groiss.org.User)
creates only the WfXMLDocForm objects of the
defined form types.
formTypes
- A collection with FormType
objects, or
null
if you want to remove a previously set restriction.public java.lang.String getName()
getName
in class WfXMLForm
String
with the folder's name.public void setName(java.lang.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 java.util.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 java.util.List 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 java.lang.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.
java.lang.Exception
- if filling the DMSFolder
fails (update
of existing elements or creation of new elements doesn't work).public DMSObject createDMSObject(User defaultCreator) throws java.lang.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
.
java.lang.Exception
- if no user can be found for creating the
DMSObject
objects, or if creating the folder or
parts of its content fails.@Deprecated public org.jdom.Element getAsXML()
Element
contains all the data of the folder (including
all WfXMLObject
objects and subfolders, etc.).
getAsXML
in class WfXMLForm
Element
with all the content of the folder.public java.lang.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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |