Package com.groiss.wfxml
Class WfXML2
java.lang.Object
com.groiss.wfxml.WfXML2
Utility methods for the WfXML functionality.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
Operating mode active means that WfXML is fully active.static final short
Operating mode off means that WfXML is deactivated.static final short
Operating mode passive means that WfXML is activated. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
dateToWfXMLDate
(Date date) Transforms a date to a WfXML date (like specified in the WfXML specification).static com.dec.avw.core.Server
static User
static int
static short
Use this method to find out if the local server operates in passive, active, or off mode.static Partner
getPartner
(String id) Use this method to get a Partner object representing a WfXML communication partner that you know (you must know the id with which the partner has been defined).static boolean
isLogEnabled
(String object) static Date
wfXMLDateToDate
(String dateString) Transforms a WfXML date to a JavaDate
object.
-
Field Details
-
MODE_ACTIVE
public static final short MODE_ACTIVEOperating mode active means that WfXML is fully active. Incoming requests are handled and outgoing requests are sent.- See Also:
-
MODE_OFF
public static final short MODE_OFFOperating mode off means that WfXML is deactivated. It means that incoming requests are not handled. Anyway, outgoing requests can still be sent from this server.- See Also:
-
MODE_PASSIVE
public static final short MODE_PASSIVEOperating mode passive means that WfXML is activated. Incoming requests are handled but outgoing messages are not sent actively (they require an active communication partner who will request these messages).- See Also:
-
-
Method Details
-
dateToWfXMLDate
Transforms a date to a WfXML date (like specified in the WfXML specification). WfXML dates are in the formYYYY-MM-DDThh:mm:ssZ
and always in GMT (Greenwich Mean Time). So this method transforms the given date to this requirements.
For transformations in the other direction, use thewfXMLDateToDate(String)
method.- Parameters:
date
- A Date object containing a date/time which you want to tranform to WfXML representation- Returns:
- a String containing the WfXML representation of the Date object.
-
getDefaultServer
public static com.dec.avw.core.Server getDefaultServer() -
getDefaultUser
-
getMaxLogSize
public static int getMaxLogSize() -
getOperatingMode
public static short getOperatingMode()Use this method to find out if the local server operates in passive, active, or off mode.- Returns:
- A
short
value representing the operating mode of the local server. This can be one of the constants of this class, e.g.,MODE_ACTIVE
.
-
getPartner
Use this method to get a Partner object representing a WfXML communication partner that you know (you must know the id with which the partner has been defined). For enterprise servers, this id is the server id.- Parameters:
id
- The id with which the partner has been defined in the enterprise configuration of the local server.- Returns:
- A reference to the Partner with the given id, or
null
if no partner with this id exists.
-
isLogEnabled
-
wfXMLDateToDate
Transforms a WfXML date to a JavaDate
object. The WfXML date must be in the specified formatYYYY-MM-DDThh:mm:ssZ
and in GMT (Greenwich Mean Time). The returned date object will represent the time in the current timezone, depending on where the computer is located. For transformations in the other direction, use thedateToWfXMLDate
method.- Parameters:
dateString
- A String object containing the WfXML representation of a date/time.- Returns:
- A
Date
object containing the date and time. - Throws:
ApplicationException
- if the StringdateString
is not formatted according to the above mentioned format.
-