Skip navigation links

Oracle Content Database Web Services Java API Reference
10g Release 1 (10.2)

B31408-02


oracle.ifs.fdk
Class ClientUtils

java.lang.Object
  extended byoracle.ifs.fdk.ClientUtils


public class ClientUtils
extends java.lang.Object

Utilities for the client side of Web Services, but they can also be used by in-process callers.


Method Summary
static java.util.Calendar convertDate(java.lang.Object date)
          Converts an object to a Calendar.
static java.lang.String fdkExceptionEntryToString(FdkExceptionEntry fdkee)
          Returns a String representation of a FdkExceptionEntry, suitable for detail logging.
static java.lang.String fdkExceptionToString(FdkException fdke, boolean includeStackTrace)
          Returns a String representation of a FdkException, suitable for detail logging.
static long[] getSupportedCapabilities()
          Returns a list of capabilities that are supported.
static boolean isDocument(java.lang.String type)
          Returns true if the given type is one of the document types.
static boolean isFolder(java.lang.String type)
          Returns true if the given type is one of the folder types.
static boolean isLink(java.lang.String type)
          Returns true if the given type is one of the link types.
static java.lang.String itemToString(Item item)
          Returns a String representation of an Item.
static NamedValue[] mapToNamedValues(java.util.Map map)
          Converts an Map of named values to NamedValue[].
static java.util.Map namedValuesToMap(NamedValue[] namedValues)
          Converts a NamedValue[] to a Map for easy access.
static java.lang.String namedValueToString(NamedValue nv)
          Returns a String representation of a NamedValue.
static AttributeRequest newAttributeRequest(java.lang.String attributeName)
          Creates a new AttributeRequest without requesting any additional attributes.
static AttributeRequest newAttributeRequest(java.lang.String attributeName, AttributeRequest[] attributes)
          Creates a new AttributeRequest.
static NamedValue newNamedValue(java.lang.String name, java.lang.Object value)
          Creates a new NamedValue.
static java.lang.String stackTraceToString(java.lang.Throwable t)
          Converts an exception stack trace to a String.
static java.lang.String toString(java.lang.Object o)
          Returns a String representation of any Object, with special handling for known objects such as Item, NamedValue, FdkException, FdkExceptionEntry, etc.

 

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

 

Method Detail

namedValuesToMap

public static final java.util.Map namedValuesToMap(NamedValue[] namedValues)
Converts a NamedValue[] to a Map for easy access. This method guarantees that an Iterator over the Map will return the entries in the same order they were in the array. The keys in the returned map will be of type String.
Parameters:
namedValues - The NamedValue[] to convert. A zero-length array will result into an empty map and a null array will result into a null return value.

mapToNamedValues

public static final NamedValue[] mapToNamedValues(java.util.Map map)
Converts an Map of named values to NamedValue[]. If the Map instance guarantees a certain order, it will be preserved in the array.
Parameters:
map - The Map to convert. The keys in the map must be of type String. An empty map will result in a zero-length NamedValue[] and a null map will result into a null return value.

toString

public static final java.lang.String toString(java.lang.Object o)
Returns a String representation of any Object, with special handling for known objects such as Item, NamedValue, FdkException, FdkExceptionEntry, etc.
Parameters:
o - Object to convert to a String.

itemToString

public static final java.lang.String itemToString(Item item)
Returns a String representation of an Item.
Parameters:
item - Item to convert to String.

namedValueToString

public static final java.lang.String namedValueToString(NamedValue nv)
Returns a String representation of a NamedValue.
Parameters:
nv - NamedValue to convert to String.

fdkExceptionToString

public static final java.lang.String fdkExceptionToString(FdkException fdke,
                                                          boolean includeStackTrace)
Returns a String representation of a FdkException, suitable for detail logging.
Parameters:
fdke - Exception to convert to String.
includeStackTrace - Whether to include the stack trace of the exception in the returned String.

fdkExceptionEntryToString

public static final java.lang.String fdkExceptionEntryToString(FdkExceptionEntry fdkee)
Returns a String representation of a FdkExceptionEntry, suitable for detail logging.
Parameters:
fdkee - Entry to convert to String.

stackTraceToString

public static final java.lang.String stackTraceToString(java.lang.Throwable t)
Converts an exception stack trace to a String.
Parameters:
t - The exception to convert.

newNamedValue

public static final NamedValue newNamedValue(java.lang.String name,
                                             java.lang.Object value)
Creates a new NamedValue.
Parameters:
name - The name.
value - The value.
(Published)

newAttributeRequest

public static final AttributeRequest newAttributeRequest(java.lang.String attributeName,
                                                         AttributeRequest[] attributes)
Creates a new AttributeRequest.
Parameters:
attributeName - The attribute name.
attributes - The requested attributes to be retrieved for the attribute.
(Published)

newAttributeRequest

public static final AttributeRequest newAttributeRequest(java.lang.String attributeName)
Creates a new AttributeRequest without requesting any additional attributes.
Parameters:
attributeName - The attribute name.
(Published)

isFolder

public static final boolean isFolder(java.lang.String type)
Returns true if the given type is one of the folder types.
Parameters:
type - The type to check,

isDocument

public static final boolean isDocument(java.lang.String type)
Returns true if the given type is one of the document types.
Parameters:
type - The type to check,

isLink

public static final boolean isLink(java.lang.String type)
Returns true if the given type is one of the link types.
Parameters:
type - The type to check,

convertDate

public static final java.util.Calendar convertDate(java.lang.Object date)
Converts an object to a Calendar. The argument can already be a Calendar or a Date. This method is useful to account for potential differences between running remotely and in-process.
Parameters:
date - The Calendar or Date object to convert. For other object types a RuntimeException will be thrown.
Returns:
The converted Calendar object.

getSupportedCapabilities

public static long[] getSupportedCapabilities()
Returns a list of capabilities that are supported. This is an enumeration of the CAPABILITY_xxx constants defined in FdkConstants.
Returns:
long[] of the capabilities that are supported

Skip navigation links

Oracle Content Database Web Services Java API Reference
10g Release 1 (10.2)

B31408-02


Copyright © 2002, 2006, Oracle. All rights reserved.