|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PRAuthorization
The Security object encapsulates access to a single PRThread authorization and authentication data
Field Summary | |
---|---|
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_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
|
Method Summary | |
---|---|
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 |
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. |
Field Detail |
---|
static final java.lang.String COPYRIGHT
static final java.lang.String VERSION
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 UPDATE_PREPEND
static final int UPDATE_APPEND
static final int UPDATE_DELETE
static final int UPDATE_DELETE_UPTO
static final int UPDATE_REPLACE
Method Detail |
---|
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 requested
PRSecurityException
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 version
PRSecurityException
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 requested
PRSecurityException
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 none
PRSecurityException
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 list
PRSecurityException
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 list
PRSecurityException
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 List
boolean 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 input
PRSecurityException
- 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 date
java.lang.IllegalArgumentException
- on bad inputs
PRSecurityException
- on errorboolean restoreRuleSetList()
java.lang.String getEncodedRuleSetList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |