com.pega.pegarules.pub.context
Interface PRThread

All Superinterfaces:
PageDirectory

public interface PRThread
extends PageDirectory

The PRThread interface encapsulates the information about a single stream (or set of interactions) by a Requestor.

Version:
$Revision: 29281 $ $Date: 2012-06-12 09:42:57 -0400 (Tue, 12 Jun 2012) $
Author:
Kenneth Olson

Field Summary
static int CHANGESCOPE_COMMIT
          Used to track property changes in the Commit scope (indexing)
static int CHANGESCOPE_STEP
          Used to track property changes in the Step scope (declarative rules)
static java.lang.String COPYRIGHT
           
static byte LIST_ACTIVITY
          Identifies the "activity" activity list (middle priority to run)
static byte LIST_CURRENT
          Identifies the "current" activity list (highest priority to run)
static byte LIST_WORKFLOW
          Identifies the "workflow" activity list (lowest priority to run)
static int LOCALE_DEFAULT
          Identifies Locale for generic purposes
static int LOCALE_FOR_DATES
          Identifies Locale desired for Date formatting
static int LOCALE_FOR_MESSAGES
          Identifies Locale desired for Messages and Text
static int LOCALE_FOR_NUMBERS
          Identifies Locale desired for Number formatting
static java.lang.String VERSION
           
 
Fields inherited from interface com.pega.pegarules.pub.context.PageDirectory
SCOPE_NODE, SCOPE_REQUESTOR, SCOPE_THREAD
 
Method Summary
 void appendActivity(int aWhichList, java.lang.String aClassName, java.lang.String aActivityName, ClipboardPage aPrimaryPage, ParameterPage aParamPage)
          Append a standard activty to one of the run queues.
 void appendActivity(int aWhichList, java.lang.String aActivityRuleClass, java.lang.String aClassName, java.lang.String aActivityName, ClipboardPage aPrimaryPage, ParameterPage aParamPage)
          Append alternate activty class to one of the run queues.
 void clearActivityLists()
          Clear the activity lists
 ClipboardPage createPage(java.lang.String aClassName, java.lang.String aPageName)
          Create a new page of the specified class If an existing page has the same name, the old page becomes an unnamed page.
 ClipboardPage createPageForPageNew(java.lang.String aClassName, java.lang.String aPageName)
          Create a new page of the specified class If an existing page has the same name, the old page becomes an unnamed page.
 ProcessingStatus getActivityStatus()
          Returns the cumulative ProcessingStatus instance to which the current instance will be added.
 PRAuthorization getAuthorization()
           
 boolean getCacheEnabled()
          Reports the state of caching for this Requestor
 java.lang.String getCurrencyName()
          Returns the name of the default Currency to be used for the current user.
 Database getDatabase()
          Returns the Database context for this Thread
 DateTimeUtils getDateTimeUtils()
          returns a reference to the singleton DateTime utility object.
 Dictionary getDictionary()
          is a factory method for Dictionary objects.
 com.pega.pegarules.priv.InfEngUtils getInfEngUtils()
           
 char[] getInitializedCharBuffer(int maxSize)
           
 java.text.FieldPosition getInitializedFieldPosition()
           
 java.text.ParsePosition getInitializedParsePosition()
           
 char[] getInitializedStringPoolSetCharBuffer(int maxSize)
           
 java.lang.String getLocaleName(int aType)
          Returns the name of a Locale to be used for the specified purpose
 java.lang.String getName()
          Get the assigned name for this PRThread instance.
 ClipboardPage getNodePage()
          Obtain a reference to the pxProces page
 PAL getPAL()
          Returns the performance statistics manager for this Thread's Requestor.
 PublicAPI getPublicAPI()
          Identifies the PublicAPI instance, if any, that is currently active for this Thread.
 PRQueueManager getQueueManager()
          Return the Agent Queue Manager interface
 PRRequestor getRequestor()
          Obtain a reference to the Requestor associated with this Thread.
 ClipboardPage getRequestorPage()
          Obtain a reference to the pxRequestor page
 PRRequestProcessor getRequestProcessor()
          Return the Request Processor interface
 java.util.Map getStepChangeList()
          Deprecated. This function will be removed in 5.2.
 ProcessingStatus getStepStatus()
          Returns the ProcessingStatus associated with the current stack frame.
 Random getSystemRandom()
          returns a reference to the singleton PRRandom utility object.
 ClipboardPage getThreadPage()
          Return the pxThread page
 java.lang.String getTimeZoneName()
          Returns the name of a TimeZone to be used for the current user.
 boolean isProcessingDeferredOperations()
          flag to block certain calls when we are processing deferred operations *
 void prependActivity(int aWhichList, java.lang.String aClassName, java.lang.String aActivityName, ClipboardPage aPrimaryPage, ParameterPage aParamPage)
          Prepend an activty to one of the run queues.
 void removeAllPages(java.util.Vector aKeepPages)
          Remove all pages at the Thread level.
 void removeAllPagesFromGatewayCache()
          remove all the Clipboard Pages from the Gateway cache.
 void resetRuleImpl()
          clear thread-local list of rules resolved.
 void runActivities()
          Run all activities in the activity lists.
 void saveRuleImpl(StringMap aKeys, GeneratedJava aImpl)
          Adds the implementation of a generated rule to the local thread-level cache.
 void setCacheEnabled(boolean aEnable)
          Sets the database cache enable/disable state for this Requestor
 void setLocaleName(int aID, java.lang.String aName)
          Sets the name of the Locale to be used for the current user.
 
Methods inherited from interface com.pega.pegarules.pub.context.PageDirectory
findName, getPage, getPageNames, getScope, pageExists, removePage, removePage, renamePage
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
See Also:
Constant Field Values

LIST_CURRENT

static final byte LIST_CURRENT
Identifies the "current" activity list (highest priority to run)

See Also:
Constant Field Values

LIST_ACTIVITY

static final byte LIST_ACTIVITY
Identifies the "activity" activity list (middle priority to run)

See Also:
Constant Field Values

LIST_WORKFLOW

static final byte LIST_WORKFLOW
Identifies the "workflow" activity list (lowest priority to run)

See Also:
Constant Field Values

CHANGESCOPE_STEP

static final int CHANGESCOPE_STEP
Used to track property changes in the Step scope (declarative rules)

See Also:
Constant Field Values

CHANGESCOPE_COMMIT

static final int CHANGESCOPE_COMMIT
Used to track property changes in the Commit scope (indexing)

See Also:
Constant Field Values

LOCALE_DEFAULT

static final int LOCALE_DEFAULT
Identifies Locale for generic purposes

See Also:
Constant Field Values

LOCALE_FOR_DATES

static final int LOCALE_FOR_DATES
Identifies Locale desired for Date formatting

See Also:
Constant Field Values

LOCALE_FOR_NUMBERS

static final int LOCALE_FOR_NUMBERS
Identifies Locale desired for Number formatting

See Also:
Constant Field Values

LOCALE_FOR_MESSAGES

static final int LOCALE_FOR_MESSAGES
Identifies Locale desired for Messages and Text

See Also:
Constant Field Values
Method Detail

appendActivity

void appendActivity(int aWhichList,
                    java.lang.String aClassName,
                    java.lang.String aActivityName,
                    ClipboardPage aPrimaryPage,
                    ParameterPage aParamPage)
Append a standard activty to one of the run queues.

Parameters:
aWhichList - identify which activity list to use
aClassName - class of Activity
aActivityName - name of activity
aPrimaryPage - Primary page
aParamPage - parameter page for activty

appendActivity

void appendActivity(int aWhichList,
                    java.lang.String aActivityRuleClass,
                    java.lang.String aClassName,
                    java.lang.String aActivityName,
                    ClipboardPage aPrimaryPage,
                    ParameterPage aParamPage)
Append alternate activty class to one of the run queues.

This method allows you to sepcify an activity class other than Rule-Obj-Activity.

Parameters:
aWhichList - identify which activity list to use
aActivityRuleClass - class derived from Rule-Obj-Activity
aClassName - class of Activity
aActivityName - name of activity
aPrimaryPage - Reference to primary page
aParamPage - parameter page for activty

clearActivityLists

void clearActivityLists()
Clear the activity lists


getStepChangeList

java.util.Map getStepChangeList()
Deprecated. This function will be removed in 5.2.

Returns the list of changed properties in the Step scope.

Returns:
the list

getDatabase

Database getDatabase()
Returns the Database context for this Thread

Returns:
Database instance

getName

java.lang.String getName()
Get the assigned name for this PRThread instance.

Returns:
String Name of this Thread

getNodePage

ClipboardPage getNodePage()
Obtain a reference to the pxProces page

Returns:
pxProcess page

getRequestor

PRRequestor getRequestor()
Obtain a reference to the Requestor associated with this Thread.

Returns:
PRRequestor instance

getRequestorPage

ClipboardPage getRequestorPage()
Obtain a reference to the pxRequestor page

Returns:
pxRequestor page

getThreadPage

ClipboardPage getThreadPage()
Return the pxThread page

Returns:
the thread page

createPage

ClipboardPage createPage(java.lang.String aClassName,
                         java.lang.String aPageName)
Create a new page of the specified class If an existing page has the same name, the old page becomes an unnamed page. Pages with reserved names (starting with "px", "pz", etc.) cannot be created.

Parameters:
aClassName - object class
aPageName - name of page
Returns:
ClipboardPage

prependActivity

void prependActivity(int aWhichList,
                     java.lang.String aClassName,
                     java.lang.String aActivityName,
                     ClipboardPage aPrimaryPage,
                     ParameterPage aParamPage)
Prepend an activty to one of the run queues.

Parameters:
aWhichList - identify which activity list to use
aClassName - class of Activity
aActivityName - name of activity
aPrimaryPage - Primary page
aParamPage - parameter page for activty

removeAllPages

void removeAllPages(java.util.Vector aKeepPages)
Remove all pages at the Thread level.

Parameters:
aKeepPages - Page names (String) that should not be removed.

runActivities

void runActivities()
Run all activities in the activity lists.


getDateTimeUtils

DateTimeUtils getDateTimeUtils()
returns a reference to the singleton DateTime utility object. It is a singleton because of the cost of setting up DateTimeFormat objects.

Returns:
DateTimeUtils

getPublicAPI

PublicAPI getPublicAPI()
Identifies the PublicAPI instance, if any, that is currently active for this Thread.

Returns:
the active PublicAPI instance, or null if none is active. It is generally not safe to assume that this object will implement any particular interface that extends PublicAPI--in particular, you should not assume that it will implement StreamBuilderToolKit.

getSystemRandom

Random getSystemRandom()
returns a reference to the singleton PRRandom utility object. It is a singleton to avoid having to reseed random numbers.

Returns:
com.pega.pegarules.util.Random

getDictionary

Dictionary getDictionary()
is a factory method for Dictionary objects. Dictionary objects are the factory and cache for ClassInfo objects which are used in page validation.

Returns:
Dictionary for the class requested

getActivityStatus

ProcessingStatus getActivityStatus()
Returns the cumulative ProcessingStatus instance to which the current instance will be added.

Returns:
cumulative ProcessingStatus instance that includes current processing

getStepStatus

ProcessingStatus getStepStatus()
Returns the ProcessingStatus associated with the current stack frame.

Returns:
current ProcessingStatus

getPAL

PAL getPAL()
Returns the performance statistics manager for this Thread's Requestor.

Returns:
performance statistics manager (PAL instance)

getLocaleName

java.lang.String getLocaleName(int aType)
Returns the name of a Locale to be used for the specified purpose

Parameters:
aType - one of the LOCALE_* constants
Returns:
String name of Locale to use

getTimeZoneName

java.lang.String getTimeZoneName()
Returns the name of a TimeZone to be used for the current user.

Returns:
String name of TimeZone to use

getCurrencyName

java.lang.String getCurrencyName()
Returns the name of the default Currency to be used for the current user.

Returns:
String name of Currency to use

setLocaleName

void setLocaleName(int aID,
                   java.lang.String aName)
                   throws InvalidLocaleException
Sets the name of the Locale to be used for the current user.

Parameters:
aID - int ID for the property
aName - String the locale name
Throws:
InvalidLocaleException

getCacheEnabled

boolean getCacheEnabled()
Reports the state of caching for this Requestor

Returns:
true indicates the database cache is enabled for this requestor

setCacheEnabled

void setCacheEnabled(boolean aEnable)
Sets the database cache enable/disable state for this Requestor

Parameters:
aEnable -

saveRuleImpl

void saveRuleImpl(StringMap aKeys,
                  GeneratedJava aImpl)
Adds the implementation of a generated rule to the local thread-level cache.

Parameters:
aKeys - the keys to the rule
aImpl - the rule implementation

resetRuleImpl

void resetRuleImpl()
clear thread-local list of rules resolved.


getInfEngUtils

com.pega.pegarules.priv.InfEngUtils getInfEngUtils()

isProcessingDeferredOperations

boolean isProcessingDeferredOperations()
flag to block certain calls when we are processing deferred operations *

Returns:
true if deferred operations are being processed now

getQueueManager

PRQueueManager getQueueManager()
                               throws DatabaseException
Return the Agent Queue Manager interface

Returns:
queue manager
Throws:
DatabaseException

getRequestProcessor

PRRequestProcessor getRequestProcessor()
Return the Request Processor interface

Returns:
request processor

getAuthorization

PRAuthorization getAuthorization()

createPageForPageNew

ClipboardPage createPageForPageNew(java.lang.String aClassName,
                                   java.lang.String aPageName)
Create a new page of the specified class If an existing page has the same name, the old page becomes an unnamed page. Pages with reserved names (starting with "px", "pz", etc.) cannot be created.

Parameters:
aClassName - object class
aPageName - name of page
Returns:
ClipboardPage

removeAllPagesFromGatewayCache

void removeAllPagesFromGatewayCache()
remove all the Clipboard Pages from the Gateway cache.


getInitializedParsePosition

java.text.ParsePosition getInitializedParsePosition()

getInitializedFieldPosition

java.text.FieldPosition getInitializedFieldPosition()

getInitializedCharBuffer

char[] getInitializedCharBuffer(int maxSize)

getInitializedStringPoolSetCharBuffer

char[] getInitializedStringPoolSetCharBuffer(int maxSize)


Copyright © 2012 Pegasystems Inc. All Rights Reserved.