oracle.calendar.soap.client
Class CalendarUtils

java.lang.Object
  |
  +--oracle.calendar.soap.client.CalendarUtils

public class CalendarUtils
extends java.lang.Object

The Calendar Utilities provide some help methods required for generating and processing calendarlet methods.


Constructor Summary
CalendarUtils()
          Default constructor is not really used.

 

Method Summary
static BasicChallenge getBasicChallenge(java.util.Vector in_elements)
          Returns a BasicChallenge object with information pulled from the SOAP header.
static java.util.Calendar getCalendarFromUTC(java.lang.String in_utcTime)
          Takes a UTC time string and converts it to a Java Calendar object
static java.lang.String getDateRangeQuery(java.util.Calendar in_startDate, java.util.Calendar in_endDate)
          Constructs a date range query that can be used for a where clause in the vQuery.
static java.lang.String getReceiveBuffer(org.apache.soap.messaging.Message in_message)
          Retrieves the receive buffer from a TCP/IP message.
static java.lang.String getSendBuffer(org.apache.soap.messaging.Message in_message)
          Retrieves the send buffer from a TCP/IP message.
static org.apache.soap.Fault getSOAPFault(java.util.Vector in_elements)
          To retrieve a SOAP fault that was returned in the Calendarlet response, call this method with the vector of body elements from the Calendar response class.
static java.util.Calendar getToday()
          Retrieves the Calendar object with today's date and the local timezone set.
static java.lang.String getUTCDate(java.util.Calendar in_date)
          Get the UTC date string from a Java Calendar object.
static java.lang.String getUTCDateTime(java.util.Calendar in_date)
          Get the UTC date time string from a Java Calendar object, converted from the local timezone if required.
static boolean isBasicChallenge(java.util.Vector in_elements)
          This utility method will help determine if a BasicChallenge was returned in the SOAP header.
static boolean isSOAPFault(java.util.Vector in_elements)
          To determine whether or not a SOAP fault was returned in the Calendarlet response, call this method with the vector of body elements from the Calendar response class.

 

Methods inherited from class java.lang.Object
<clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait

 

Constructor Detail

CalendarUtils

public CalendarUtils()
Default constructor is not really used.
Method Detail

isSOAPFault

public static boolean isSOAPFault(java.util.Vector in_elements)
To determine whether or not a SOAP fault was returned in the Calendarlet response, call this method with the vector of body elements from the Calendar response class.
Parameters:
in_elements - a vector of XML elements
Returns:
boolean a true if a SOAP fault was returned
See Also:
CalendaringResponse.getBodyEntries()

getSOAPFault

public static org.apache.soap.Fault getSOAPFault(java.util.Vector in_elements)
                                          throws java.lang.Exception
To retrieve a SOAP fault that was returned in the Calendarlet response, call this method with the vector of body elements from the Calendar response class. A new Fault object will be created each time this method is called.
Parameters:
in_elements - a vector of XML elements
Returns:
Fault a soap Fault
Throws:
java.lang.Exception -  
See Also:
CalendaringResponse.getBodyEntries()

isBasicChallenge

public static boolean isBasicChallenge(java.util.Vector in_elements)
This utility method will help determine if a BasicChallenge was returned in the SOAP header. The input elements vector is that one taken from the CalendaringReponse object's getHeaderEntries method.
Parameters:
in_elements - a vector of XML elements
Returns:
boolean TRUE for a BasicChallenge
See Also:
CalendaringResponse.getHeaderEntries()

getBasicChallenge

public static BasicChallenge getBasicChallenge(java.util.Vector in_elements)
                                        throws java.lang.Exception
Returns a BasicChallenge object with information pulled from the SOAP header. The input elements vector is that one taken from the CalendaringReponse object's getHeaderEntries method.
Parameters:
in_elements - a vector of XML elements
Returns:
BasicChallenge a new basic challenge object
Throws:
java.lang.Exception -  
See Also:
CalendaringResponse.getHeaderEntries()

getSendBuffer

public static java.lang.String getSendBuffer(org.apache.soap.messaging.Message in_message)
Retrieves the send buffer from a TCP/IP message. This is used internally by the Calendarlet and Webclientlet classes.
Parameters:
in_message - a TCP/IP message
Returns:
String an HTTP buffer contents

getReceiveBuffer

public static java.lang.String getReceiveBuffer(org.apache.soap.messaging.Message in_message)
Retrieves the receive buffer from a TCP/IP message. This is used internally by the Calendarlet and WebClientlet classes.
Parameters:
in_message - a TCP/IP message
Returns:
String an HTTP buffer contents

getUTCDateTime

public static java.lang.String getUTCDateTime(java.util.Calendar in_date)
Get the UTC date time string from a Java Calendar object, converted from the local timezone if required. The UTC date time string is compatible with the iCal standard.
Parameters:
in_date - a date object
Returns:
String a UTC string

getUTCDate

public static java.lang.String getUTCDate(java.util.Calendar in_date)
Get the UTC date string from a Java Calendar object. Only the date portion of the Calendar object is used. There is no timezone conversion. The UTC date string is compatible with the iCal standard.
Parameters:
in_date - a date object
Returns:
String a UTC string

getToday

public static java.util.Calendar getToday()
Retrieves the Calendar object with today's date and the local timezone set. The time string in UTC would be yyyyMMddTXX0000Z (i.e. today's date at midnight local) where XX is the offset to GMT.
Returns:
Calendar a calendar object with todays date

getDateRangeQuery

public static java.lang.String getDateRangeQuery(java.util.Calendar in_startDate,
                                                 java.util.Calendar in_endDate)
Constructs a date range query that can be used for a where clause in the vQuery. The vQuery will be of the form DTEND >= 'start date' AND DTSTART <= 'end date'
Parameters:
in_startDate - the start date for the vQuery
in_enddate - the end date for the vQuery
Returns:
String a vQuery where clause
See Also:
vQuery

getCalendarFromUTC

public static java.util.Calendar getCalendarFromUTC(java.lang.String in_utcTime)
Takes a UTC time string and converts it to a Java Calendar object
Parameters:
in_utcTime - a UTC date time string
Returns:
Calendar a Calendar object