public interface PRAuthorization
Modifier and Type | Field and Description |
---|---|
static int |
ACCESS_DELETE
Access constant permitting use of Obj-Delete
|
static int |
ACCESS_DELETE_RULE
Access constant permitting Obj-Delete of a Rule
|
static int |
ACCESS_EXECUTE
Access constant permitting execution of Rule-Obj-Activity instances
|
static int |
ACCESS_MODIFY
Access constant permitting use of Obj-Save
|
static int |
ACCESS_MODIFY_RULE
Access constant permitting Obj-Save of a Rule
|
static int |
ACCESS_OPEN
Access constant permitting use of Obj-Open
|
static int |
ACCESS_OPEN_RULE
Access constant permitting Obj-Open of a Rule
|
static int |
ACCESS_PERFORM |
static int |
ACCESS_SEARCH
Access constant permitting use of Obj-List
|
static java.lang.String |
COPYRIGHT |
static int |
UPDATE_APPEND
Update action: append to existing list
|
static int |
UPDATE_DELETE
Update action: delete specified entries
|
static int |
UPDATE_DELETE_UPTO
Update action: delete this entry and all preceeding entries
|
static int |
UPDATE_PREPEND
Update action: prepend to existing list
|
static int |
UPDATE_REPLACE
Update action: replace all existing entries with new values
|
static java.lang.String |
VERSION |
Modifier and Type | Method and Description |
---|---|
boolean |
canUpdateRuleSet(java.lang.String aRuleSetName,
ClassDefinition aInstanceClass)
Determine if a user is permitted to update a specified ruleset
This comes into effect on a MT setup.
|
boolean |
canUpdateRuleSet(java.lang.String aRuleSetName,
java.lang.String aRuleSetVersion)
Determine if a user is permitted to update a specified ruleset version
|
boolean |
enableUpdateRuleSet(PublicAPI aCaller,
java.lang.String aRuleSetName,
java.lang.String aRuleSetVersion,
java.lang.String aPassword)
Enable the user to update the specified ruleset version
|
java.lang.String |
getEncodedRuleSetList()
This is a unique string (hash) that identifies the requestor's complete rulesetlist.
|
java.lang.String |
getPersonalRuleSetName()
Return the name of this user's personal ruleset list, if they're allowed to
check instances out into their personal ruleset
|
java.util.Date |
getSettingAsDate(java.lang.String aClassName,
java.lang.String aSettingName)
This method returns the value of a Rule-Access-Setting for the
current user.
|
double |
getSettingAsDouble(java.lang.String aClassName,
java.lang.String aSettingName)
This method returns the value of a Rule-Access-Setting for the
current user.
|
int |
getSettingAsInt(java.lang.String aClassName,
java.lang.String aSettingName)
This method returns the value of a Rule-Access-Setting for the
current user.
|
java.lang.String |
getSettingAsString(java.lang.String aClassName,
java.lang.String aSettingName)
This method returns the value of a Rule-Access-Setting for the
current user as an Integer.
|
java.lang.String |
getSettingType(java.lang.String aClassName,
java.lang.String aSettingName)
This method returns the type of a Rule-Access-Setting for the
current user.
|
boolean |
haveAccess(java.lang.Object aCaller,
java.lang.String aClassName,
int aAccessCode,
ClipboardPage aPage)
Return true if specified access is permitted
Similar logic is used to evaluate pre-defined access types and
application-specific privileges.
|
boolean |
haveAuthorization(java.lang.Object aCaller,
java.lang.String aClassName,
java.lang.String aRoles,
java.lang.String aPrivileges,
java.lang.String aConditions,
ClipboardPage aPage)
Return true if specified roles, privileges are held, or if specified conditions are satisfied
|
boolean |
havePrivilege(java.lang.Object aCaller,
java.lang.String aPrivilegeName,
java.lang.String aClassName,
ClipboardPage aPage)
Return true if specified privileges are held
|
boolean |
havePrivilege(java.lang.Object aCaller,
java.lang.String aPrivilegeName,
java.lang.String aClassName,
ClipboardPage aPage,
boolean aCheckForAccessManagerPrivilege)
Return true if specified privileges are held
|
boolean |
haveRole(java.lang.String aRoleName)
Return true if specifed role is held
|
boolean |
restoreRuleSetList()
Restore the RuleSet list of this requestor to its previous state.
|
boolean |
setRoles(PublicAPI aCaller,
int aAction,
ClipboardProperty aRefValue)
Set the roles to be used in this authorization context
|
boolean |
setRoles(PublicAPI aCaller,
int aAction,
java.util.List aRoleList) |
boolean |
setRuleSets(ClipboardProperty aOriginals,
ClipboardProperty aReplacements)
Apply a change (or list of changes) to the RuleSet list.
|
boolean |
setRuleSets(ClipboardProperty aOriginals,
ClipboardProperty aReplacements,
ClipboardProperty aEffectiveAsOfDate)
Apply a change (or list of changes) to the RuleSet list, but make sure the replacements are
valid starting on a certain date.
|
boolean |
setRuleSets(PublicAPI aCaller,
int aAction,
ClipboardProperty aRefValue)
Set the rulesets to be used in this authorization context
|
boolean |
setRuleSets(PublicAPI aCaller,
int aAction,
ClipboardProperty aRefValue,
ClipboardProperty aEffectiveAsOfDate)
Set the rulesets to be used in this authorization context.
|
static final java.lang.String VERSION
static final java.lang.String COPYRIGHT
static final int ACCESS_OPEN
static final int ACCESS_MODIFY
static final int ACCESS_DELETE
static final int ACCESS_SEARCH
static final int ACCESS_EXECUTE
static final int ACCESS_OPEN_RULE
static final int ACCESS_MODIFY_RULE
static final int ACCESS_DELETE_RULE
static final int ACCESS_PERFORM
static final int UPDATE_PREPEND
static final int UPDATE_APPEND
static final int UPDATE_DELETE
static final int UPDATE_DELETE_UPTO
static final int UPDATE_REPLACE
boolean canUpdateRuleSet(java.lang.String aRuleSetName, java.lang.String aRuleSetVersion) throws PRSecurityException
aRuleSetName
- name of ruleset for which update access is requestedaRuleSetVersion
- version of ruleset for which update access is requestedPRSecurityException
boolean canUpdateRuleSet(java.lang.String aRuleSetName, ClassDefinition aInstanceClass) throws PRSecurityException
aRuleSetName
- name of ruleset for which update access is requestedaInstanceClass
- Class defintion of the instance typePRSecurityException
boolean enableUpdateRuleSet(PublicAPI aCaller, java.lang.String aRuleSetName, java.lang.String aRuleSetVersion, java.lang.String aPassword) throws PRSecurityException
aCaller
- "executable" element to verify caller may make this requestaRuleSetName
- name of ruleset for which update access is requestedaRuleSetVersion
- version of ruleset for which update access is requestedaPassword
- cleartext password for the ruleset versionPRSecurityException
java.lang.String getPersonalRuleSetName()
boolean haveAccess(java.lang.Object aCaller, java.lang.String aClassName, int aAccessCode, ClipboardPage aPage) throws PRSecurityException
aCaller
- Object PRTHread or Executable instance that called this methodaClassName
- class (pxObjClass) on which access is requestedaAccessCode
- one of the pre-defined access constantsaPage
- instance on which access is requestedPRSecurityException
boolean haveAuthorization(java.lang.Object aCaller, java.lang.String aClassName, java.lang.String aRoles, java.lang.String aPrivileges, java.lang.String aConditions, ClipboardPage aPage) throws PRSecurityException
aCaller
- Object PRThread or Executable instance that called this methodaClassName
- class on which access is requestedaRoles
- comma-separated list of role namesaPrivileges
- comma-separated list of privileges in the format class-name.privilege-name
or in the format privilege-name. In the latter case the aClassName is assumed.aConditions
- comma-separated list of Rule-Access-When conditionsaPage
- instance on which authorization is requested; this page must
be of class aClassName
PRSecurityException
boolean havePrivilege(java.lang.Object aCaller, java.lang.String aPrivilegeName, java.lang.String aClassName, ClipboardPage aPage) throws PRSecurityException
aCaller
- Object PRThread or Executable instance that called this methodaPrivilegeName
- comma-separated privileges in the format class-name.privilege-name
or privilege-nameaClassName
- class defining the privilege name (if null use pxObjClass of aPage)aPage
- instance on which privilege is requested, or null if nonePRSecurityException
boolean havePrivilege(java.lang.Object aCaller, java.lang.String aPrivilegeName, java.lang.String aClassName, ClipboardPage aPage, boolean aCheckForAccessManagerPrivilege) throws PRSecurityException
aCaller
- Object PRThread or Executable instance that called this methodaPrivilegeName
- comma-separated privileges in the format class-name.privilege-name
or privilege-nameaClassName
- class defining the privilege name (if null use pxObjClass of aPage)aPage
- instance on which privilege is requested, or null if noneaCheckForAccessManagerPrivilege
- - true if no privileges are required on rule && rule security mode is NOT DenyPRSecurityException
boolean haveRole(java.lang.String aRoleName) throws PRSecurityException
aRoleName
- PRSecurityException
boolean setRoles(PublicAPI aCaller, int aAction, ClipboardProperty aRefValue) throws PRSecurityException
aCaller
- "executable" element to verify caller may make this requestaAction
- one of the UPDATE_* constantsaRefValue
- role name or listPRSecurityException
boolean setRoles(PublicAPI aCaller, int aAction, java.util.List aRoleList) throws PRSecurityException
PRSecurityException
boolean setRuleSets(PublicAPI aCaller, int aAction, ClipboardProperty aRefValue) throws PRSecurityException
aCaller
- "executable" element to verify caller may make this requestaAction
- one of the UPDATE_* constantsaRefValue
- ruleset name or listPRSecurityException
java.lang.String getSettingType(java.lang.String aClassName, java.lang.String aSettingName)
aClassName
- The rule class.aSettingName
- The setting name.java.lang.String getSettingAsString(java.lang.String aClassName, java.lang.String aSettingName)
aClassName
- The rule class.aSettingName
- The setting name.int getSettingAsInt(java.lang.String aClassName, java.lang.String aSettingName) throws PRSecurityException
aClassName
- The rule class.aSettingName
- The setting name.PRSecurityException
- If setting is of a different type.double getSettingAsDouble(java.lang.String aClassName, java.lang.String aSettingName) throws PRSecurityException
aClassName
- The rule class.aSettingName
- The setting name.PRSecurityException
- If setting is of a different type.java.util.Date getSettingAsDate(java.lang.String aClassName, java.lang.String aSettingName) throws PRSecurityException
aClassName
- The rule class.aSettingName
- The setting name.PRSecurityException
- If setting is of a different type.boolean setRuleSets(ClipboardProperty aOriginals, ClipboardProperty aReplacements)
If for some reasons this fails, a message will appear on the console, and this function will return false. When the function fails, the RuleSet list will be the same as it was before the function call.
Warning: No effort is made to validate the RuleSet list after these changes.
aOriginals
- A Scalar or String List ClipboardProperty, with entries that should appear
in the RuleSet listaReplacements
- A Scalar or String List ClipboardProperty, with entries that will replace
contents in the RuleSet Listboolean setRuleSets(ClipboardProperty aOriginals, ClipboardProperty aReplacements, ClipboardProperty aEffectiveAsOfDate)
The third parameter specifies an effective date, where partial RuleSet specifications (i.e. YourRuleSet:07-02) are refined to specific versions based on their pyRuleSetVersionEffectiveDate or pxCreateDateTime, in that order.
If for some reasons this fails, a message will appear on the console, and this function will return false. When the function fails, the RuleSet list will be the same as it was before the function call.
Warning: No effort is made to validate the RuleSet list after these changes.
aOriginals
- A Scalar or String List ClipboardProperty, with entries that should appear
in the RuleSet listaReplacements
- A Scalar or String List ClipboardProperty, with entries that will replace
contents in the RuleSet ListaEffectiveAsOfDate
- java.lang.IllegalArgumentException
- on bad inputPRSecurityException
- on an internal errorboolean setRuleSets(PublicAPI aCaller, int aAction, ClipboardProperty aRefValue, ClipboardProperty aEffectiveAsOfDate) throws PRSecurityException
aCaller
- "executable" element to verify caller may make this requestaAction
- one of the UPDATE_* constantsaRefValue
- ruleset name or listaEffectiveAsOfDate
- ruleset effective datejava.lang.IllegalArgumentException
- on bad inputsPRSecurityException
- on errorboolean restoreRuleSetList()
java.lang.String getEncodedRuleSetList()
Copyright © 2015 Pegasystems Inc. All Rights Reserved.