Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


oracle.wcps.conductor.services
Class ClientContext

java.lang.Object
  extended by oracle.wcps.conductor.services.ClientContext

All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
RemoteClientContext

public class ClientContext
extends java.lang.Object
implements java.lang.Cloneable

The context in which the client action/api is performed.


Nested Class Summary
static class ClientContext.Projection
          Defines the projection to use when making the call.

 

Field Summary
static java.lang.Integer DEFAULT_ITEMS_PER_PAGE
          Default page size.
static java.lang.Integer DEFAULT_START_INDEX
          Default start index (for pagination)
static java.lang.String PROPERTY_CLASS_CONTEXT
          The context property for client class contexts.
static java.lang.String PROPERTY_ITEMS_PER_PAGE
          The context property for items per page (for pagination).
static java.lang.String PROPERTY_LOCALE
          The context property for locale.
static java.lang.String PROPERTY_LOG_ERRORS
          The context property for error logging.
static java.lang.String PROPERTY_NAMESPACE
          The context property for namespace.
static java.lang.String PROPERTY_PROJECTION
          The context property for projection.
static java.lang.String PROPERTY_START_INDEX
          The context property for start index (for pagination).
static java.lang.String PROPERTY_USERNAME
          The context property for username.

 

Constructor Summary
  ClientContext()
           
protected ClientContext(java.util.HashMap<java.lang.String,java.lang.Object> contextParams)
          Construct ClientContext based on the specified map of key/value pairs.
  ClientContext(java.util.Properties properties)
          Construct ClientContext based on the specified properties.
  ClientContext(java.lang.String namespace)
          Construct ClientContext for the specified namespace.

 

Method Summary
 void addContextClasses(java.lang.Class<?>... classes)
          Add the specified array of context classes to the ClientContext.
protected  java.lang.Object clone()
           
 ClientContext copy()
          Copy the current client context.
 java.lang.Object getAttribute(java.lang.String name)
          Get a client context attribute by name
 java.lang.Object getAttribute(java.lang.String name, java.lang.Object defaultValue)
          Returns the context attribute by name.
 java.lang.Integer getItemsPerPage()
          Retrieve the page size.
 java.util.Locale getLocale()
          Returns the specified locale.
 boolean getLogErrorMessages()
          Returns whether error logging has been enabled.
 java.lang.String getNamespace()
          Returns the current namespace.
 ClientContext.Projection getProjection()
          Retrieve the specified projection.
 java.lang.Integer getStartIndex()
          Retrieve the start index.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Sets a client context attribute.
 void setItemsPerPage(java.lang.Integer itemsPerPage)
          Sets the page size (for pagination).
 void setLocale(java.util.Locale locale)
          Sets the locale for localized metadata.
 void setLogErrorMessages(java.lang.Boolean b)
          Enables/Disables logging of error messages.
 void setNamespace(java.lang.String namespace)
          Sets the current namespace
 void setProjection(ClientContext.Projection projection)
          Sets the projection in the client context.
 void setStartIndex(java.lang.Integer startIndex)
          Sets the start index (for pagination).
 java.lang.String toString()
          Returns the string version of this client context.

 

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

 

Field Detail

PROPERTY_NAMESPACE

public static final java.lang.String PROPERTY_NAMESPACE
The context property for namespace.
See Also:
Constant Field Values

PROPERTY_LOCALE

public static final java.lang.String PROPERTY_LOCALE
The context property for locale.
See Also:
Constant Field Values

PROPERTY_START_INDEX

public static final java.lang.String PROPERTY_START_INDEX
The context property for start index (for pagination).
See Also:
Constant Field Values

PROPERTY_ITEMS_PER_PAGE

public static final java.lang.String PROPERTY_ITEMS_PER_PAGE
The context property for items per page (for pagination).
See Also:
Constant Field Values

PROPERTY_PROJECTION

public static final java.lang.String PROPERTY_PROJECTION
The context property for projection.
See Also:
Constant Field Values

PROPERTY_USERNAME

public static final java.lang.String PROPERTY_USERNAME
The context property for username.
See Also:
Constant Field Values

PROPERTY_CLASS_CONTEXT

public static final java.lang.String PROPERTY_CLASS_CONTEXT
The context property for client class contexts.
See Also:
Constant Field Values

PROPERTY_LOG_ERRORS

public static final java.lang.String PROPERTY_LOG_ERRORS
The context property for error logging.
See Also:
Constant Field Values

DEFAULT_START_INDEX

public static final java.lang.Integer DEFAULT_START_INDEX
Default start index (for pagination)

DEFAULT_ITEMS_PER_PAGE

public static final java.lang.Integer DEFAULT_ITEMS_PER_PAGE
Default page size.

Constructor Detail

ClientContext

public ClientContext()

ClientContext

public ClientContext(java.lang.String namespace)
Construct ClientContext for the specified namespace.

ClientContext

public ClientContext(java.util.Properties properties)
Construct ClientContext based on the specified properties.

ClientContext

protected ClientContext(java.util.HashMap<java.lang.String,java.lang.Object> contextParams)
Construct ClientContext based on the specified map of key/value pairs.

Method Detail

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Sets a client context attribute.

getAttribute

public java.lang.Object getAttribute(java.lang.String name,
                                     java.lang.Object defaultValue)
Returns the context attribute by name.

This method will first check the local instance map by name, and then look for a system property by that name. If both are null, defaultValue is returned.

If the specified attribute is not set, then the default value will be set in the context for future reference.


getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Get a client context attribute by name

setNamespace

public void setNamespace(java.lang.String namespace)
Sets the current namespace

getNamespace

public java.lang.String getNamespace()
Returns the current namespace.

setStartIndex

public void setStartIndex(java.lang.Integer startIndex)
Sets the start index (for pagination).

getStartIndex

public java.lang.Integer getStartIndex()
Retrieve the start index. If not specified, the default will be returned.

getItemsPerPage

public java.lang.Integer getItemsPerPage()
Retrieve the page size. If not specified, the default will be returned.

getProjection

public ClientContext.Projection getProjection()
Retrieve the specified projection. If not specified, the default will depend on the individual use case.

setProjection

public void setProjection(ClientContext.Projection projection)
Sets the projection in the client context.

setItemsPerPage

public void setItemsPerPage(java.lang.Integer itemsPerPage)
Sets the page size (for pagination).

getLogErrorMessages

public boolean getLogErrorMessages()
Returns whether error logging has been enabled. If not specified, default of true will be returned

setLogErrorMessages

public void setLogErrorMessages(java.lang.Boolean b)
Enables/Disables logging of error messages.

addContextClasses

public void addContextClasses(java.lang.Class<?>... classes)
Add the specified array of context classes to the ClientContext.

May be required to marshal/unmarshal complex java types that are returned as results of a scenario.


setLocale

public void setLocale(java.util.Locale locale)
Sets the locale for localized metadata.

getLocale

public java.util.Locale getLocale()
Returns the specified locale.

copy

public ClientContext copy()
Copy the current client context. This does not perform a deep copy.

toString

public java.lang.String toString()
Returns the string version of this client context.
Overrides:
toString in class java.lang.Object

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.