com.pega.pegarules.pub.context
Interface PRRequestor

All Superinterfaces:
PageDirectory

public interface PRRequestor
extends PageDirectory

The PRRequestor interface encapsulates the information about a single user of PegaRULES via a specific connection to the outside world.

Version:
$Revision: 21965 $ $Date: 2012-03-05 14:42:50 -0500 (Mon, 05 Mar 2012) $
Author:
Kenneth Olson

Field Summary
static java.lang.String COPYRIGHT
           
static int ORIENTATION_LEFT_TO_RIGHT
          Orientation of this user's text should be left-to-right
static int ORIENTATION_RIGHT_TO_LEFT
          Orientation of this user's text should be right-to-left
static int ORIENTATION_UNKNOWN
          Orientation of this user's text is unknown
static java.lang.String sDefaultThread
          Default thread name
static java.lang.String sNewThread
          Thread name that will force engine to create a unique thread
static java.lang.String sTypeApplication
          Requestor type: Application
static java.lang.String sTypeBatch
          Requestor type: Batch
static java.lang.String sTypeBrowser
          Requestor type: Browser
static java.lang.String sTypePortal
          Requestor type: Portal
static java.lang.String VERSION
           
 
Fields inherited from interface com.pega.pegarules.pub.context.PageDirectory
SCOPE_NODE, SCOPE_REQUESTOR, SCOPE_THREAD
 
Method Summary
 PRAuthorization getAuthorizationHandle()
          Deprecated. Since PegaRULES 5.4
 java.lang.String getDiagID()
          Get this Requestor's diagnostic id string
 java.lang.String getEncodedRuleSetList()
          Deprecated. since 5.4, use PRPRAuthorization.getEncodedRuleSetList()
 java.lang.String getEncodedUserId()
          This returns an MD5 encoded copy of the users personal ruleset name.
 java.lang.String getId()
          Get this Requestor's identification string
 java.lang.String getLocale()
           
 PRNode getNode()
          Identifies the Node that 'owns' this Requestor.
 PAL getPAL()
          Returns the performance statistics manager for this Requestor.
 java.lang.String getProcessedRuleSetList()
          Deprecated. since 5.4, use PRPRAuthorization.getEncodedRuleSetList()
 ClipboardPage getRequestorPage()
          obtain a reference to the pxRequestor page
 boolean getSuppressShowMethod()
          Get the 'suppress show method' flag value.
 int getTextOrientation()
          Get the direction of text for this user
 PRThread getThread(java.lang.String aName)
          obtain a reference to the specified PRThread instance.
 java.util.Set getThreadNames()
          Returns a set of Strings for the PRThread objects contained within this Requestor.
 java.lang.String getTypeName()
          Return the associated type name.
 boolean hasPersonalRuleset()
           
 boolean isIgnoreDBByteGovernor()
          Check if the ignore DBByte Governor flag value
 void queueBatchActivity(java.lang.String aClassName, java.lang.String aActivityName, ParameterPage aParamPage)
          Queue an activity to be executed within a new batch requestor
Note that v2 permitted the specification of another "dequeue" activity, but there are no uses of that parameter in existing code, so it is omitted.
 java.lang.Object queueBatchActivity(java.lang.String aClassName, java.lang.String aActivityName, ParameterPage aParamPage, ClipboardPage aPrimaryPage)
          Queue an activity to be executed within a new batch requestor
 java.lang.Object queueBatchActivity(java.lang.String aClassName, java.lang.String aActivityName, ParameterPage aParamPage, ClipboardPage aPrimaryPage, java.util.List aOtherPages, boolean aIsDetachedTask)
          Queue an activity to be executed within a new batch requestor
 void removeAllPages(java.util.Vector aKeepPages)
          Remove all pages from Requestor level, except for those listed in aKeepPages
 void setIgnoreDBByteGovernor(boolean aIgnoreDBByteGovernor)
          Set the ignore DBByte Governor flag value
 void setSuppressShowMethod(boolean value)
          Set the 'suppress show method' flag
 void stopBatchActivities()
          Send the stop command to all children of this requestor.
 void stopBatchActivity(java.lang.Object aChildIdentifier)
          Ask a child requestor and all of its children to stop as soon as possible.
 void waitOnAllBatchActivities()
          Wait forever for all batch activities to complete.
 void waitOnAllBatchActivities(long aTimeout)
          Wait for all children requestors to complete their activities, or for a timeout, whichever comes first.
 void waitOnBatchActivity(java.lang.Object aChildIdentifier)
          Wait forever for a child requestor to finish.
 void waitOnBatchActivity(java.lang.Object aChildIdentifier, long aTimeout)
          Wait for a child requestor to finish, or for some timeout to be reached.
 
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

sDefaultThread

static final java.lang.String sDefaultThread
Default thread name

See Also:
Constant Field Values

sTypeApplication

static final java.lang.String sTypeApplication
Requestor type: Application

See Also:
Constant Field Values

sTypeBatch

static final java.lang.String sTypeBatch
Requestor type: Batch

See Also:
Constant Field Values

sTypeBrowser

static final java.lang.String sTypeBrowser
Requestor type: Browser

See Also:
Constant Field Values

sTypePortal

static final java.lang.String sTypePortal
Requestor type: Portal

See Also:
Constant Field Values

sNewThread

static final java.lang.String sNewThread
Thread name that will force engine to create a unique thread

See Also:
Constant Field Values

ORIENTATION_LEFT_TO_RIGHT

static final int ORIENTATION_LEFT_TO_RIGHT
Orientation of this user's text should be left-to-right

See Also:
Constant Field Values

ORIENTATION_RIGHT_TO_LEFT

static final int ORIENTATION_RIGHT_TO_LEFT
Orientation of this user's text should be right-to-left

See Also:
Constant Field Values

ORIENTATION_UNKNOWN

static final int ORIENTATION_UNKNOWN
Orientation of this user's text is unknown

See Also:
Constant Field Values
Method Detail

getThread

PRThread getThread(java.lang.String aName)
obtain a reference to the specified PRThread instance. If the instance does not exist, it will not be created.

Parameters:
aName - name of Thread
Returns:
PRThread matching the name, or null if it doesn't exist

getRequestorPage

ClipboardPage getRequestorPage()
obtain a reference to the pxRequestor page

Returns:
pxRequestor page

getAuthorizationHandle

PRAuthorization getAuthorizationHandle()
Deprecated. Since PegaRULES 5.4

Get the PRAuthorization object for this requestor

Returns:
PRAuthorization instance to use

queueBatchActivity

void queueBatchActivity(java.lang.String aClassName,
                        java.lang.String aActivityName,
                        ParameterPage aParamPage)
Queue an activity to be executed within a new batch requestor
Note that v2 permitted the specification of another "dequeue" activity, but there are no uses of that parameter in existing code, so it is omitted. Also in v2 was the optional specification of a user name and password to authenticate the batch requestor. No uses of this facility were found in code, so it is omitted (if needed these values can be passed on the parameter page).

Parameters:
aClassName - class of Activity
aActivityName - name of activity
aParamPage - parameter page for activty

queueBatchActivity

java.lang.Object queueBatchActivity(java.lang.String aClassName,
                                    java.lang.String aActivityName,
                                    ParameterPage aParamPage,
                                    ClipboardPage aPrimaryPage)
Queue an activity to be executed within a new batch requestor

Parameters:
aClassName - Class to which Activity belongs
aActivityName - Name of Activity to execute
aParamPage - Parameter page for activty. May be null.
aPrimaryPage - Primary page for the activity. Must be of the type Code-Pega-Child, or null.
Returns:
BatchRequestorTask

queueBatchActivity

java.lang.Object queueBatchActivity(java.lang.String aClassName,
                                    java.lang.String aActivityName,
                                    ParameterPage aParamPage,
                                    ClipboardPage aPrimaryPage,
                                    java.util.List aOtherPages,
                                    boolean aIsDetachedTask)
                                    throws IncompatibleClassException
Queue an activity to be executed within a new batch requestor

Parameters:
aClassName - Class to which Activity belongs
aActivityName - Name of Activity to execute
aParamPage - Parameter page for activty. May be null.
aPrimaryPage - Primary page for the activity. Must be of the type Code-Pega-Child, or null.
aOtherPages - list of ClipboardPages (which must be top level named pages). Copies of these pages will be placed into the agents clipboard before execution of this activity. May be null.
aIsDetachedTask - true if detached, false if a child requestor task
Returns:
BatchRequestorTask
Throws:
IncompatibleClassException - The primary page is not of Code-Pega-Child class

stopBatchActivity

void stopBatchActivity(java.lang.Object aChildIdentifier)
                       throws PRNoSuchChildException
Ask a child requestor and all of its children to stop as soon as possible. The check for whether to stop or not is done at the activity step prolog.

Note that the caller should still follow this with a call to waitOnAllBatchActivities() in order to properly finish its task.

Parameters:
aChildIdentifier - The object handle representing a child requestor
Throws:
PRNoSuchChildException - The given child is not valid.

stopBatchActivities

void stopBatchActivities()
Send the stop command to all children of this requestor.

Unlike stopBatchActivity(Object), it is not necessary to call waitOnAllBatchActivities() to cleanup the child requestors.


waitOnBatchActivity

void waitOnBatchActivity(java.lang.Object aChildIdentifier)
                         throws PRNoSuchChildException
Wait forever for a child requestor to finish. Once finished, it removes the child requestor.

Parameters:
aChildIdentifier - The child to wait for
Throws:
PRNoSuchChildException - The given child is not valid.

waitOnBatchActivity

void waitOnBatchActivity(java.lang.Object aChildIdentifier,
                         long aTimeout)
                         throws PRNoSuchChildException,
                                PRTimeoutExpiredException
Wait for a child requestor to finish, or for some timeout to be reached. Once finished, it removes the child requestor.

Parameters:
aChildIdentifier - The child requestor to wait for
aTimeout - the number of milliseonds to wait for the child. If the timeout is reached before the child is done, a PRTimeoutOccurredException is thrown
Throws:
PRNoSuchChildException - The given child is not valid.
PRTimeoutExpiredException - Thrown when specified amount of time runs out and the child has yet to terminate

waitOnAllBatchActivities

void waitOnAllBatchActivities()
Wait forever for all batch activities to complete. Once finished, it removes all child requestors.


waitOnAllBatchActivities

void waitOnAllBatchActivities(long aTimeout)
                              throws PRTimeoutExpiredException
Wait for all children requestors to complete their activities, or for a timeout, whichever comes first. Once finished, it removes all child requestors.

Parameters:
aTimeout -
Throws:
PRTimeoutExpiredException - when any of the activites fails to complete before the timeout.

removeAllPages

void removeAllPages(java.util.Vector aKeepPages)
Remove all pages from Requestor level, except for those listed in aKeepPages

Parameters:
aKeepPages - a list of page names that should be retained.

getDiagID

java.lang.String getDiagID()
Get this Requestor's diagnostic id string

Returns:
id

getId

java.lang.String getId()
Get this Requestor's identification string

Returns:
id

getTypeName

java.lang.String getTypeName()
Return the associated type name.

Returns:
type name

getSuppressShowMethod

boolean getSuppressShowMethod()
Get the 'suppress show method' flag value.

Returns:
the value of mSuppressShowMethod

setSuppressShowMethod

void setSuppressShowMethod(boolean value)
Set the 'suppress show method' flag

Parameters:
value - new value for the flag

getNode

PRNode getNode()
Identifies the Node that 'owns' this Requestor.

Returns:
PRNode instance associated with this Requestor.

getPAL

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

Returns:
performance statistics manager (PAL instance)

getThreadNames

java.util.Set getThreadNames()
Returns a set of Strings for the PRThread objects contained within this Requestor.

Returns:
Set of String names of all PRThreads in this Requestor.

hasPersonalRuleset

boolean hasPersonalRuleset()
Returns:
true if this requestor's rulesetlist contains a personal ruleset

getEncodedUserId

java.lang.String getEncodedUserId()
This returns an MD5 encoded copy of the users personal ruleset name.

Returns:
the encoded personal ruleset.

getEncodedRuleSetList

java.lang.String getEncodedRuleSetList()
Deprecated. since 5.4, use PRPRAuthorization.getEncodedRuleSetList()

This is a unique string (hash) that identifies the requestor's complete rulesetlist.

Returns:
value of hash

getProcessedRuleSetList

java.lang.String getProcessedRuleSetList()
Deprecated. since 5.4, use PRPRAuthorization.getEncodedRuleSetList()

This is a unique string that identifies the requestor's rulesetlist. This is used as a directory path for rule-file- extractions and customizes the value to handle the quirks of that process. For RuleSetLists < 03-05-00 the value returned is "Standard".

Returns:
value of hash

getTextOrientation

int getTextOrientation()
Get the direction of text for this user

Returns:
One of the ORIENTATATION_* constants

setIgnoreDBByteGovernor

void setIgnoreDBByteGovernor(boolean aIgnoreDBByteGovernor)
Set the ignore DBByte Governor flag value

Parameters:
aIgnoreDBByteGovernor - value for the flag

isIgnoreDBByteGovernor

boolean isIgnoreDBByteGovernor()
Check if the ignore DBByte Governor flag value

Returns:
value of the flag

getLocale

java.lang.String getLocale()


Copyright © 2012 Pegasystems Inc. All Rights Reserved.