Package com.groiss.wfxml
Class WfXMLWebLink
java.lang.Object
com.groiss.wfxml.WfXMLObject
com.groiss.wfxml.WfXMLWebLink
- All Implemented Interfaces:
Cloneable
Instances of this class represent web links. You can use it to create new web
links, create web links out of JDOM elements, and create a web link out of an
existing DMSWebLink object.
See the super class
See the super class
WfXMLObject
for details and examples.-
Field Summary
Fields inherited from class com.groiss.wfxml.WfXMLObject
notes, userId
-
Constructor Summary
ConstructorDescriptionWfXMLWebLink
(DMSWebLink dmsWebLink) Use this constructor to build a WfXMLWebLink out of aDMSWebLink
.WfXMLWebLink
(String name, String url, String description, String userId) Creates a web link with all possible fields.WfXMLWebLink
(org.apache.xmlbeans.XmlObject obj) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a deep copy of this web link.createDMSObject
(User defaultCreator) Creates aDMSWebLink
object out of thisWfXMLWebLink
.void
This method fills an existingDMSWebLink
with the data of this WfXMLWebLink and updates it to the database.Returns the description of this web link.getName()
Returns the name string of this web link.getURL()
Returns the URL (asString
) of this web link.org.apache.xmlbeans.XmlObject
void
setDescription
(String description) Set a new description for this web link.void
Set the name of this web link.void
Set the URL for this web link.Methods inherited from class com.groiss.wfxml.WfXMLObject
createInstance, createInstance, getUser, getUser, getUserId, setUserId
-
Constructor Details
-
WfXMLWebLink
Creates a web link with all possible fields.- Parameters:
name
- A subject for the note.url
- The content of the note.description
- A description text for the web link. A description is not obligatory, so you can providenull
if you don't want to set something special.userId
- Id of the user who will be (or is) the creator of the note. You can usenull
here, if you don't want to use a special user. In that case the note will be created by another user (if possible), or an error will occur.
-
WfXMLWebLink
public WfXMLWebLink(org.apache.xmlbeans.XmlObject obj) -
WfXMLWebLink
Use this constructor to build a WfXMLWebLink out of aDMSWebLink
. The WfXMLWebLink will be filled with the values of theDMSWebLink
.- Parameters:
dmsWebLink
- ADMSWebLink
object.- Throws:
Exception
- if there occur problems reading data from theDMSWebLink
object.
-
-
Method Details
-
getName
Returns the name string of this web link.- Specified by:
getName
in classWfXMLObject
- Returns:
- A
String
containing the name of this web link ornull
if no name has been defined.
-
getURL
Returns the URL (asString
) of this web link.- Returns:
- A
String
with the URL of this web link ornull
if no URL has been set.
-
getDescription
Returns the description of this web link.- Returns:
- A
String
holding the description of this web link ornull
if no description has been defined.
-
setName
Set the name of this web link.- Parameters:
name
- AString
containing a new name for this web link.
-
setURL
Set the URL for this web link. You should provide a complete URL here (like "http://www...
") so that the link will work properly in @enterprise.- Parameters:
url
- AString
with the new URL for the web link
-
setDescription
Set a new description for this web link.- Parameters:
description
- AString
holding the new description.
-
fill
This method fills an existingDMSWebLink
with the data of this WfXMLWebLink and updates it to the database.- Specified by:
fill
in classWfXMLObject
- Parameters:
existingWebLink
- The existingDMSWebLink
. If you pass an object that is noDMSWebLink
, this method will simply do nothing.defaultCreator
- A creator for objects that must be created. As this method updates a web link, the user will not be used, because it will not be necessary to create anything here. You can simply pass innull
.- Throws:
Exception
- If updating theDMSWebLink
with the data fails.
-
createDMSObject
Creates aDMSWebLink
object out of thisWfXMLWebLink
.- Specified by:
createDMSObject
in classWfXMLObject
- Parameters:
defaultCreator
- You can specify a default creator with this parameter. If there is no user defined in thisWfXMLWebLink
object, or if the defined user cannot be found, thedefaultCreator
will be used. If this user also does not exist, anApplicationException
will be thrown.- Returns:
- The new
DMSWebLink
object, ornull
if creating the web link didn't work.
-
clone
Creates a deep copy of this web link. The returned object can be casted toWfXMLWebLink
. -
getXMLObject
public org.apache.xmlbeans.XmlObject getXMLObject()- Specified by:
getXMLObject
in classWfXMLObject
-