|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectXGTRBAC.Policy
public class Policy
This class contains methods and members for maintaining policies. It is instantiated in RBACModule class (addPolicy method).
| Field Summary | |
|---|---|
private boolean |
applied
|
private java.util.LinkedList |
DSDRoleSetList
|
private java.util.LinkedList |
DurationExprList
|
private GTRBACModule |
gtrbacModule
|
private java.lang.String[] |
InfoItems
|
private java.util.LinkedList |
IntervalExprList
|
static int |
NumDefFiles
|
static int |
NumInfoItems
|
static int |
NumPolicySheets
|
private java.util.LinkedList |
PeriodicTimeExprList
|
private java.util.LinkedList |
PermissionList
|
private java.util.LinkedList |
PermissionRoleList
|
private java.lang.String[] |
PolicyDefIds
|
private java.lang.String[] |
PolicyDefPaths
|
private org.w3c.dom.Document[] |
PolicyDefs
|
private java.lang.String |
PolicyName
|
private java.lang.String[] |
PolicySheetIds
|
private java.lang.String[] |
PolicySheetPaths
|
private org.w3c.dom.Document[] |
PolicySheets
|
private java.util.LinkedList |
RoleList
|
private java.util.LinkedList |
SSDRoleSetList
|
private java.util.LinkedList |
UserList
|
private java.util.LinkedList |
UserRoleList
|
| Constructor Summary | |
|---|---|
Policy(java.lang.String name)
Creates a new instance of Policy |
|
| Method Summary | |
|---|---|
int |
addDSDRoleSet(java.lang.String dsd_id)
Adds a new DSD role set to the DSDRoleSetList |
int |
addDurationExpr(java.lang.String d_expr_id)
Adds a new duration expression to the DurationExprList |
int |
addIntervalExpr(java.lang.String i_expr_id)
Adds a new interval expression to the IntervalExprList |
int |
addPeriodicTimeExpr(java.lang.String pt_expr_id)
Adds a new periodic time expression to the Periodic TimeExprList |
int |
addPermission(java.lang.String perm_id)
Adds a new permission to the PermissionList |
int |
addPRAssign(java.lang.String pr_id)
Adds a new PRAssign to the PermissionRoleList |
int |
addRole(java.lang.String role_id)
Adds a new role to the RoleList |
int |
addSSDRoleSet(java.lang.String ssd_id)
Adds a new SSD role set to the SSDRoleSetList |
int |
addURAssign(java.lang.String ur_id)
Adds a new URAssign to the UserRoleList |
int |
addUser(java.lang.String user_id)
Adds a new user to the UserList |
boolean |
checkApplied()
Checks whether the policy has been applied |
boolean |
checkLoadedDef(int index)
Checks if a given policy definition is loaded |
boolean |
checkLoadedFile(int type,
int index)
Checks if a given policy file is loaded |
boolean |
checkLoadedSheet(int index)
Checks if a given policy sheet is loaded |
java.lang.String |
checkUnloadedDef()
Returns the name of first unloaded definition file of a policy object |
java.lang.String |
checkUnloadedFile()
Returns the name of first unloaded file of a policy object |
java.lang.String |
checkUnloadedSheet()
Returns the name of first unloaded policy sheet of a policy object |
java.lang.String |
getDefName(int index)
Returns the name of definition file given its index |
int |
getDefNum(java.lang.String defn)
Returns the index of the selected definition file |
DSDRoleSet |
getDSDRoleSet(java.lang.String dsd_id)
Returns the DSD role set object |
int |
getDSDRoleSetCount()
Returns the number of DSD role sets |
java.lang.String |
getDSDRoleSetId(int index)
Returns the DSD role set id at the given index |
DurationExpr |
getDurationExpr(java.lang.String d_expr_id)
Returns the duration expression object |
int |
getDurationExprCount()
Returns the number of duration expressions |
java.lang.String |
getDurationExprId(int index)
Returns the duration expression id at the given index |
java.lang.String |
getFileName(int type,
int index)
Returns the name of policy file given its type and index |
GTRBACModule |
getGTRBACModule()
Returns the gtrbac module object running this policy |
java.lang.String |
getInfoItem(int index)
Returns the info item for the policy |
int |
getInfoItemNum(java.lang.String item)
Returns the index of selected info item |
IntervalExpr |
getIntervalExpr(java.lang.String i_expr_id)
Returns the interval expression object |
int |
getIntervalExprCount()
Returns the number of interval expressions |
java.lang.String |
getIntervalExprId(int index)
Returns the interval expression id at the given index |
PeriodicTimeExpr |
getPeriodicTimeExpr(java.lang.String pt_expr_id)
Returns the periodic time expression object |
int |
getPeriodicTimeExprCount()
Returns the number of periodic time expressions |
java.lang.String |
getPeriodicTimeExprId(int index)
Returns the periodic time expression id at the given index |
java.lang.String |
getPermId(int index)
Returns the permission id at the given index- used to fill combo box |
Permission |
getPermission(java.lang.String perm_id)
Returns the permission object |
int |
getPermissionCount()
Returns the number of permissions |
org.w3c.dom.Document |
getPolicyDef(int index)
Returns the policy definition file given its index |
java.lang.String |
getPolicyDefId(int index)
Returns the id of a policy definition file |
java.lang.String |
getPolicyDefPath(int index)
Returns the path of a policy definition file |
java.lang.String |
getPolicyName()
Returns the name of a policy |
org.w3c.dom.Document |
getPolicySheet(int index)
Returns the policy sheet given its index |
java.lang.String |
getPolicySheetId(int index)
Returns the id of a policy sheet |
java.lang.String |
getPolicySheetPath(int index)
Returns the path of a policy sheet |
PermRoleAssign |
getPRAssign(java.lang.String pr_id)
Returns the PRAssign object |
int |
getPRAssignCount()
Returns the number of permission-to-role assignments |
java.lang.String |
getPRAssignId(int index)
Returns the PRAssign id at the given index |
Role |
getRole(java.lang.String role_id)
Returns the role object given role id |
int |
getRoleCount()
Returns the number of roles |
java.lang.String |
getRoleId(java.lang.String role_name)
Returns the id of the role given the name |
java.lang.String |
getRoleName(int index)
Returns the role name at the given index- used to fill combo box |
java.lang.String |
getSheetName(int index)
Returns the name of policy sheet given its index |
int |
getSheetNum(java.lang.String sheet)
Returns the index of the selected sheet |
SSDRoleSet |
getSSDRoleSet(java.lang.String ssd_id)
Returns the SSD role set object |
int |
getSSDRoleSetCount()
Returns the number of SSD role sets |
java.lang.String |
getSSDRoleSetId(int index)
Returns the SSD role set id at the given index |
UserRoleAssign |
getURAssign(java.lang.String ur_id)
Returns the URAssign object |
int |
getURAssignCount()
Returns the number of user-role assignments |
java.lang.String |
getURAssignId(int index)
Returns the URAssign id at the given index |
User |
getUser(java.lang.String user_id)
Returns the user object |
int |
getUserCount()
Returns the number of users |
java.lang.String |
getUserId(int index)
Returns the user id at the given index- used to fill combo box |
void |
setApplied(boolean value)
Sets whether the policy has been applied |
void |
setGTRBACModule(GTRBACModule gtrbac)
Sets the gtrbac module object running this policy |
void |
setInfoItem(int index)
Sets the info items for the policy |
void |
setPolicyDef(org.w3c.dom.Document doc,
int index)
Sets the policy definition file at a given index |
void |
setPolicyDefId(java.lang.String id,
int index)
Sets the id of a policy object |
void |
setPolicyDefPath(java.lang.String path,
int index)
Sets the path of a policy object |
void |
setPolicySheet(org.w3c.dom.Document doc,
int index)
Sets the policy sheet at a given index |
void |
setPolicySheetId(java.lang.String id,
int index)
Sets the id of a policy object |
void |
setPolicySheetPath(java.lang.String path,
int index)
Sets the path of a policy object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String PolicyName
private org.w3c.dom.Document[] PolicyDefs
private java.lang.String[] PolicyDefPaths
private java.lang.String[] PolicyDefIds
private org.w3c.dom.Document[] PolicySheets
private java.lang.String[] PolicySheetPaths
private java.lang.String[] PolicySheetIds
private java.lang.String[] InfoItems
private boolean applied
private GTRBACModule gtrbacModule
private java.util.LinkedList UserList
private java.util.LinkedList RoleList
private java.util.LinkedList SSDRoleSetList
private java.util.LinkedList DSDRoleSetList
private java.util.LinkedList PermissionList
private java.util.LinkedList UserRoleList
private java.util.LinkedList PermissionRoleList
private java.util.LinkedList IntervalExprList
private java.util.LinkedList DurationExprList
private java.util.LinkedList PeriodicTimeExprList
public static final int NumDefFiles
public static final int NumPolicySheets
public static final int NumInfoItems
| Constructor Detail |
|---|
public Policy(java.lang.String name)
| Method Detail |
|---|
public java.lang.String getPolicyName()
public org.w3c.dom.Document getPolicySheet(int index)
index - The integer index of policy sheet
public void setPolicySheet(org.w3c.dom.Document doc,
int index)
doc - The policy sheet supplied as Documentindex - The integer index of policy sheetpublic java.lang.String getPolicySheetPath(int index)
index - The integer index of policy sheet
public void setPolicySheetPath(java.lang.String path,
int index)
path - The policy sheet path supplied as Stringindex - The integer index of policy sheetpublic java.lang.String getPolicySheetId(int index)
index - The integer index of policy sheet
public void setPolicySheetId(java.lang.String id,
int index)
id - The policy sheet id supplied as Stringindex - The integer index of policy sheetpublic org.w3c.dom.Document getPolicyDef(int index)
index - The integer index of policy definition file
public void setPolicyDef(org.w3c.dom.Document doc,
int index)
doc - The policy definition file supplied as Documentindex - The integer index of policy definition filepublic java.lang.String getPolicyDefPath(int index)
index - The integer index of policy definition file
public void setPolicyDefPath(java.lang.String path,
int index)
path - The policy definition file path supplied as Stringindex - The integer index of policy definition filepublic java.lang.String getPolicyDefId(int index)
index - The integer index of policy definition file
public void setPolicyDefId(java.lang.String id,
int index)
id - The policy definition file id supplied as Stringindex - The integer index of policy definition filepublic int getUserCount()
public int getRoleCount()
public int getSSDRoleSetCount()
public int getDSDRoleSetCount()
public int getPermissionCount()
public int getURAssignCount()
public int getPRAssignCount()
public int getIntervalExprCount()
public int getDurationExprCount()
public int getPeriodicTimeExprCount()
public boolean checkApplied()
public void setApplied(boolean value)
value - The applied status supplied as booleanpublic GTRBACModule getGTRBACModule()
public void setGTRBACModule(GTRBACModule gtrbac)
gtrbac - The gtrbac module object supplied as GTRBACModule
public boolean checkLoadedFile(int type,
int index)
type - An integer type of the policy file.
'0' indicates a definiton file, '1' indicates a policy sheet.index - An integer index of the policy file.
Type '0' Index '0' = XCredTyoeDef
Type '0' Index '1' = XSoDDef
Type '0' Index '2' = XTempConstDef
Type '1' Index '0' = XUS
Type '1' Index '1' = XRS
Type '1' Index '2' = XPS
Type '1' Index '3' = XURAS
Type '1' Index '4' = XPRAS
public java.lang.String checkUnloadedFile()
public boolean checkLoadedDef(int index)
index - The integer index of policy definition
public java.lang.String checkUnloadedDef()
public boolean checkLoadedSheet(int index)
index - The integer index of policy sheet
public java.lang.String checkUnloadedSheet()
public void setInfoItem(int index)
index - The integer array index of info itempublic java.lang.String getInfoItem(int index)
index - The integer array index of info item
public java.lang.String getFileName(int type,
int index)
type - An integer type of the policy file.
'0' indicates a definiton file, '1' indicates a policy sheet.index - An integer index of the policy file.
Type '0' Index '0' = XCredTyoeDef
Type '0' Index '1' = XSoDDef
Type '0' Index '2' = XTempConstDef
Type '1' Index '0' = XUS
Type '1' Index '1' = XRS
Type '1' Index '2' = XPS
Type '1' Index '3' = XURAS
Type '1' Index '4' = XPRAS
public java.lang.String getDefName(int index)
index - The integer array index of definition file
public int getDefNum(java.lang.String defn)
defn - The name of the definition file supplied as String
public java.lang.String getSheetName(int index)
index - The integer array index of policy sheet
public int getSheetNum(java.lang.String sheet)
sheet - The name of the sheet supplied as String
public int getInfoItemNum(java.lang.String item)
item - The info item supplied as String
public int addUser(java.lang.String user_id)
user_id - The ID of the user supplied as String
public java.lang.String getUserId(int index)
index - The integer index of the user from the combo box
public User getUser(java.lang.String user_id)
user_id - The ID of the user supplied as String
public int addRole(java.lang.String role_id)
role_id - The ID of the role supplied as String
public java.lang.String getRoleName(int index)
index - The integer index of the role from the combo box
public java.lang.String getRoleId(java.lang.String role_name)
role_name - The name of the role supplied as type String
public Role getRole(java.lang.String role_id)
role_id - The ID of the role supplied as String
public int addSSDRoleSet(java.lang.String ssd_id)
ssd_id - The ID of the role set supplied as String
public java.lang.String getSSDRoleSetId(int index)
index - The integer index of the role set
public SSDRoleSet getSSDRoleSet(java.lang.String ssd_id)
ssd_id - The ID of the role set supplied as String
public int addDSDRoleSet(java.lang.String dsd_id)
dsd_id - The ID of the role set supplied as String
public java.lang.String getDSDRoleSetId(int index)
index - The integer index of the role set
public DSDRoleSet getDSDRoleSet(java.lang.String dsd_id)
dsd_id - The ID of the role set supplied as String
public int addPermission(java.lang.String perm_id)
perm_id - The ID of the permission supplied as String
public java.lang.String getPermId(int index)
index - The integer index of the permission from the combo box
public Permission getPermission(java.lang.String perm_id)
perm_id - The id of the permission supplied as String
public int addURAssign(java.lang.String ur_id)
ur_id - The ID of the URAssign supplied as String
public java.lang.String getURAssignId(int index)
index - The integer index of the URAssign
public UserRoleAssign getURAssign(java.lang.String ur_id)
ur_id - The id of the URAssign supplied as String
public int addPRAssign(java.lang.String pr_id)
pr_id - The ID of the PRAssign supplied as String
public java.lang.String getPRAssignId(int index)
index - The integer index of the PRAssign
public PermRoleAssign getPRAssign(java.lang.String pr_id)
pr_id - The id of the PRAssign supplied as String
public int addIntervalExpr(java.lang.String i_expr_id)
i_expr_id - The ID of the supplied as String
public java.lang.String getIntervalExprId(int index)
index - The integer index of the expression
public IntervalExpr getIntervalExpr(java.lang.String i_expr_id)
i_expr_id - The ID of the expression supplied as String
public int addDurationExpr(java.lang.String d_expr_id)
d_expr_id - The ID of the supplied as String
public java.lang.String getDurationExprId(int index)
index - The integer index of the expression
public DurationExpr getDurationExpr(java.lang.String d_expr_id)
d_expr_id - The ID of the expression supplied as String
public int addPeriodicTimeExpr(java.lang.String pt_expr_id)
pt_expr_id - The ID of the supplied as String
public java.lang.String getPeriodicTimeExprId(int index)
index - The integer index of the expression
public PeriodicTimeExpr getPeriodicTimeExpr(java.lang.String pt_expr_id)
pt_expr_id - The ID of the expression supplied as String
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||