|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.are.xml.rules.Rule
com.ibm.ibmi.are.xml.rules.authority.AuthorityRule
com.ibm.ibmi.are.xml.rules.authority.ObjectAuthorityRule
public class ObjectAuthorityRule
Rule class that verifies a specified user's private object authorities to a file, directory, or Library object
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
Copyright for class bytecode |
static java.lang.String |
MAP_ITEM_OBJECT_AUTH
The private object authority for the user to the file, directory, or Library object |
static java.lang.String |
MAP_ITEM_USER
The user with private authority to the file, directory, or Library object |
Fields inherited from class com.ibm.ibmi.are.xml.rules.authority.AuthorityRule |
---|
MAP_ITEM_FOLLOW_SYMLINK, MAP_ITEM_NAME |
Fields inherited from class com.ibm.are.xml.rules.Rule |
---|
MAP_ITEM_CHECK_CLASS, MAP_ITEM_CHECK_OBJECT, MAP_ITEM_CHECK_TYPE, MAP_ITEM_ERROR_LEVEL, MAP_ITEM_EXPECTED_VALUE, MAP_ITEM_MATCH_CASE |
Constructor Summary | |
---|---|
ObjectAuthorityRule(java.util.Map ruleInfo)
The API constructor for this class. |
|
ObjectAuthorityRule(com.ibm.are.xml.rules.XmlNodeInfo nodeInfo,
java.lang.String theFile,
java.lang.String user,
java.lang.String theObjectAuth,
boolean followSymlink)
This constructor is for internal class use only. |
Method Summary | |
---|---|
java.lang.String |
getObjectAuthority()
Retrieves the expected object authority |
java.lang.String |
getUser()
Retrieves the user whose private authority is being verified |
boolean |
run(com.ibm.are.plugin.Plugin plugin)
Runs the rule, which performs the check/verification implemented by that rule. |
void |
setObjectAuthority(java.lang.String objectAuthority)
Sets the expected object authority |
void |
setUser(java.lang.String user)
Sets the user whose private authority is being verified |
Methods inherited from class com.ibm.are.xml.rules.Rule |
---|
getNodeInfo, report, report |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String MAP_ITEM_USER
public static final java.lang.String MAP_ITEM_OBJECT_AUTH
Constructor Detail |
---|
public ObjectAuthorityRule(java.util.Map ruleInfo)
ruleInfo
- Any object that implements the java.util.Map
interface.
This map contains a set of key/value pairs which specify all of the
information needed by this rule class to perform its check.
Rule Info Map Contents
The table below describes all items, both required and optional, that are allowed to be
in the ruleInfo
map passed to the API constructor.
Key | Description | Required | Valid Values | Default Value |
---|---|---|---|---|
name | The full path of the directory, file, or Library object to verify | Yes | The path must be fully qualified. If the file to verify is in the Library file system, the path must be an IFS path, such as /QSYS.LIB/MYLIB.LIB/THEFILE.PGM | N/A |
user | The user profile whose data authority to the file is to be verified | Yes | Must be a valid IBM i user profile | N/A |
objAuth | The expected object authority granted to the specified user profile | Yes |
Or an combination of the above four parameters, with no separate between values (just directly appended to one another). |
N/A |
followSymlink | If the file or directory is a symbolic link, this item determines if the authority of the symbolic link is verified, or if the authority of the symbolic link target is verified. | No |
|
false |
errorLevel | Specifies the severity level a problem is reported at for this check. If the comparison between the
expected and actual values is not successful, which means the comparison result was false ,
a problem is reported. The severity of the reported problem is determined by the error level. |
No |
|
error |
public ObjectAuthorityRule(com.ibm.are.xml.rules.XmlNodeInfo nodeInfo, java.lang.String theFile, java.lang.String user, java.lang.String theObjectAuth, boolean followSymlink)
Method Detail |
---|
public java.lang.String getObjectAuthority()
public void setObjectAuthority(java.lang.String objectAuthority)
objectAuthority
- The expected object authoritypublic java.lang.String getUser()
public void setUser(java.lang.String user)
user
- The user whose private authority is being verifiedpublic boolean run(com.ibm.are.plugin.Plugin plugin)
run
in class Rule
plugin
- The plugin for which the rule is being run for.
true
if the verification was successful and no problems were found.
false
if the verification resulted in a problem being found and reported.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |