com.ibm.tws.conn.util
Class Context

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended bycom.ibm.tws.conn.util.Context
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class Context
extends java.util.HashMap
implements java.io.Serializable

This class is used to pass additional information to the generic connector APIs for managing TWS objects. As an example, the user session and the user locale are passed to the TWS back-end through this class.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright
static int JOB_STREAM_SCOPE_DEFAULT
          Default job stream scope
static int OBJECT_COUNT_DEFAULT
          Default object count
static int OBJECT_COUNT_NO
          The integer used to specify that no object count is requested in plan queries
static int OBJECT_COUNT_YES
          The integer used to specify that object count is requested in plan queries
static int PLAN_DEPENDENCIES_SCOPE_DEFAULT
          Default plan dependencies scope
static int SCOPE_NO_PLAN_DEPENDENCIES
          Disables loading of dependencies in plan queries
static int SCOPE_PROPERTIES
          The scope integer used to identify the properties of a job stream
static int SCOPE_PROPERTIES_AND_RUN_CYCLES
          The scope integer used to identify a job stream with its run cycles only
static int SCOPE_WHOLE
          The scope integer used to identify the whole content of a job stream
static int SCOPE_WHOLE_NO_JOB_DEFINITIONS
          The scope integer used to identify the whole content of a job stream without job definitions
static int SCOPE_WHOLE_NO_RUN_CYCLES
          The scope integer used to identify the whole content of a job stream, except for run cycles
static int SCOPE_YES_PLAN_DEPENDENCIES
          Enables loading of dependencies in plan queries
static int TRANSFER_MODE_BYTES
          The transfer mode integer used to specify that plan query results must be transferred in bytes
static int TRANSFER_MODE_DEFAULT
          Default transfer mode
static int TRANSFER_MODE_OBJECTS
          The transfer mode integer used to specify that plan query results must be transferred in objects
 
Constructor Summary
Context()
          Constructor
 
Method Summary
 boolean checkClientVersionCompatibility(int version, int release, int maintenance, int fixPack)
          This method check the JSC version compatibility
 int getJobStreamScope()
          Returns the job stream scope
 java.util.Locale getLocale()
          Returns the user Locale
 int getObjectCount()
          Returns the request for the object count in plan queries
 int getPlanDependenciesScope()
          Returns the plan dependencies scope
 PlanIdentifier getPlanIdentifier()
          Returns the value of the plan identifier
 java.lang.String getSession()
          Returns the session string
 int getTransferMode()
          Returns the transfer mode
 boolean isUseScaffoldingCode()
          This method must be used for development purposes only
 void setJobStreamScope(int jobStreamScope)
          Sets the job stream scope
 void setLocale(java.util.Locale locale)
          Sets the user Locale
 void setObjectCount(int objectCount)
          Sets the request for the object count in plan queries
 void setPlanDependenciesScope(int planDependenciesScope)
          Sets the plan dependencies scope
 void setPlanIdentifier(PlanIdentifier pid)
          Sets the plan identifier
 void setSession(java.lang.String session)
          Sets the session string
 void setTransferMode(int transferMode)
          Sets the transfer mode
 void setUseScaffoldingCode(boolean useScaffCode)
          This method must be used for development purposes only.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright


SCOPE_PROPERTIES

public static final int SCOPE_PROPERTIES
The scope integer used to identify the properties of a job stream


SCOPE_PROPERTIES_AND_RUN_CYCLES

public static final int SCOPE_PROPERTIES_AND_RUN_CYCLES
The scope integer used to identify a job stream with its run cycles only


SCOPE_WHOLE_NO_RUN_CYCLES

public static final int SCOPE_WHOLE_NO_RUN_CYCLES
The scope integer used to identify the whole content of a job stream, except for run cycles


SCOPE_WHOLE

public static final int SCOPE_WHOLE
The scope integer used to identify the whole content of a job stream


SCOPE_WHOLE_NO_JOB_DEFINITIONS

public static final int SCOPE_WHOLE_NO_JOB_DEFINITIONS
The scope integer used to identify the whole content of a job stream without job definitions


JOB_STREAM_SCOPE_DEFAULT

public static final int JOB_STREAM_SCOPE_DEFAULT
Default job stream scope


SCOPE_NO_PLAN_DEPENDENCIES

public static final int SCOPE_NO_PLAN_DEPENDENCIES
Disables loading of dependencies in plan queries

See Also:
Constant Field Values

SCOPE_YES_PLAN_DEPENDENCIES

public static final int SCOPE_YES_PLAN_DEPENDENCIES
Enables loading of dependencies in plan queries

See Also:
Constant Field Values

PLAN_DEPENDENCIES_SCOPE_DEFAULT

public static final int PLAN_DEPENDENCIES_SCOPE_DEFAULT
Default plan dependencies scope

See Also:
Constant Field Values

TRANSFER_MODE_OBJECTS

public static final int TRANSFER_MODE_OBJECTS
The transfer mode integer used to specify that plan query results must be transferred in objects

See Also:
Constant Field Values

TRANSFER_MODE_BYTES

public static final int TRANSFER_MODE_BYTES
The transfer mode integer used to specify that plan query results must be transferred in bytes

See Also:
Constant Field Values

TRANSFER_MODE_DEFAULT

public static final int TRANSFER_MODE_DEFAULT
Default transfer mode

See Also:
Constant Field Values

OBJECT_COUNT_NO

public static final int OBJECT_COUNT_NO
The integer used to specify that no object count is requested in plan queries

See Also:
Constant Field Values

OBJECT_COUNT_YES

public static final int OBJECT_COUNT_YES
The integer used to specify that object count is requested in plan queries

See Also:
Constant Field Values

OBJECT_COUNT_DEFAULT

public static final int OBJECT_COUNT_DEFAULT
Default object count

See Also:
Constant Field Values
Constructor Detail

Context

public Context()
Constructor

Method Detail

setSession

public void setSession(java.lang.String session)
                throws ConnInvalidParameterException
Sets the session string

Parameters:
session - The new value of the session string
Throws:
ConnInvalidParameterException - The session string is invalid

getSession

public java.lang.String getSession()
Returns the session string

Returns:
The current value of the session string

setLocale

public void setLocale(java.util.Locale locale)
Sets the user Locale

Parameters:
locale - The new value of the user Locale

getLocale

public java.util.Locale getLocale()
Returns the user Locale

Returns:
The current value of the user Locale

setJobStreamScope

public void setJobStreamScope(int jobStreamScope)
Sets the job stream scope

Parameters:
jobStreamScope - The new value of the job stream scope

getJobStreamScope

public int getJobStreamScope()
Returns the job stream scope

Returns:
The current value of the job stream scope

setPlanDependenciesScope

public void setPlanDependenciesScope(int planDependenciesScope)
Sets the plan dependencies scope

Parameters:
planDependenciesScope - The new value of the plan dependencies scope

getPlanDependenciesScope

public int getPlanDependenciesScope()
Returns the plan dependencies scope

Returns:
The current value of the plan dependencies scope

setTransferMode

public void setTransferMode(int transferMode)
Sets the transfer mode

Parameters:
transferMode - The new value of the transfer mode

getTransferMode

public int getTransferMode()
Returns the transfer mode

Returns:
The current value of the transfer mode

setObjectCount

public void setObjectCount(int objectCount)
Sets the request for the object count in plan queries

Parameters:
objectCount - The new value of the request for the object count in plan queries

getObjectCount

public int getObjectCount()
Returns the request for the object count in plan queries

Returns:
The current value of the request for the object count in plan queries

setPlanIdentifier

public void setPlanIdentifier(PlanIdentifier pid)
Sets the plan identifier

Parameters:
pid - The new value of the plan identifier

getPlanIdentifier

public PlanIdentifier getPlanIdentifier()
Returns the value of the plan identifier

Returns:
The current value of the plan identifier

setUseScaffoldingCode

public void setUseScaffoldingCode(boolean useScaffCode)
This method must be used for development purposes only. If used, it allows to use the EJB scaffolded code to return values.

Parameters:
useScaffCode - Set this to true if you want to use the scaffolded EJB version and you do not want to exchange messages with the TWS back-end.

isUseScaffoldingCode

public boolean isUseScaffoldingCode()
This method must be used for development purposes only

Returns:
True if the user has set the useScaffoldingCode flag

checkClientVersionCompatibility

public boolean checkClientVersionCompatibility(int version,
                                               int release,
                                               int maintenance,
                                               int fixPack)
This method check the JSC version compatibility

Parameters:
version -
release -
maintenance -
Returns:
true if the version is equal or grater


Copyright © 2005 IBM All Rights Reserved.