|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.model.PO
org.compiere.model.X_AD_Role
org.compiere.model.MRole
public final class MRole
Role Model. Includes AD_User runtime info for Personal Access The class is final, so that you cannot overwrite the security rules.
| Field Summary | |
|---|---|
static boolean |
SQL_FULLYQUALIFIED
Access SQL Fully Qualified |
static boolean |
SQL_NOTQUALIFIED
Access SQL Not Fully Qualified |
static boolean |
SQL_RO
Access SQL Read Only |
static boolean |
SQL_RW
Access SQL Read Write |
static int |
SUPERUSER_USER_ID
The AD_User_ID of the SuperUser |
static int |
SYSTEM_USER_ID
The AD_User_ID of the System Administrator |
| Fields inherited from class org.compiere.model.PO |
|---|
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID |
| Constructor Summary | |
|---|---|
MRole(Properties ctx,
int AD_Role_ID,
String trxName)
Standard Constructor |
|
MRole(Properties ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
| Method Summary | |
|---|---|
String |
addAccessSQL(String SQL,
String TableNameIn,
boolean fullyQualified,
boolean rw)
Appends where clause to SQL statement for Table |
protected boolean |
afterDelete(boolean success)
Executed after Delete operation. |
protected boolean |
afterSave(boolean newRecord,
boolean success)
After Save |
protected boolean |
beforeSave(boolean newRecord)
Before Save |
boolean |
canUpdate(int AD_Client_ID,
int AD_Org_ID,
int AD_Table_ID,
int Record_ID,
boolean createError)
UPADATE - Can I Update the record. |
boolean |
canView(Properties ctx,
String TableLevel)
VIEW - Can I view record in Table with given TableLevel. |
static MRole |
get(Properties ctx,
int AD_Role_ID)
Get Role (cached). |
static MRole |
get(Properties ctx,
int AD_Role_ID,
int AD_User_ID,
boolean reload)
Get Role for User |
int |
getAD_User_ID()
Get Logged in user |
String |
getClientWhere(boolean rw)
Get Client Where Clause Value |
int |
getConfirmQueryRecords()
Get Confirm Query Records |
static MRole |
getDefault()
Get Default (Client) Role |
static MRole |
getDefault(Properties ctx,
boolean reload)
Get/Set Default Role. |
Boolean |
getFormAccess(int AD_Form_ID)
Get Form Access |
static MRole[] |
getOf(Properties ctx,
String whereClause)
Get Roles With where clause |
static MRole[] |
getOfClient(Properties ctx)
Get Roles Of Client |
String |
getOrgWhere(boolean rw)
Get Org Where Clause Value |
Boolean |
getProcessAccess(int AD_Process_ID)
Get Process Access |
Boolean |
getTaskAccess(int AD_Task_ID)
Get Task Access |
Boolean |
getWindowAccess(int AD_Window_ID)
Get Window Access |
Boolean |
getWorkflowAccess(int AD_Workflow_ID)
Get Workflow Access |
boolean |
isCanExport(int AD_Table_ID)
Can Export Table |
boolean |
isCanReport(int AD_Table_ID)
Can Report on table |
boolean |
isClientAccess(int AD_Client_ID,
boolean rw)
Access to Client |
boolean |
isColumnAccess(int AD_Table_ID,
int AD_Column_ID,
boolean ro)
Access to Column |
boolean |
isOrgAccess(int AD_Org_ID,
boolean rw)
Access to Org |
boolean |
isQueryMax(int noRecords)
Over max Query |
boolean |
isQueryRequire(int noRecords)
Require Query |
boolean |
isRecordAccess(int AD_Table_ID,
int Record_ID,
boolean ro)
Access to Record (no check of table) |
boolean |
isShowPreference()
Show (Value) Preference Menu |
boolean |
isTableAccess(int AD_Table_ID,
boolean ro)
Access to Table |
boolean |
isTableAccessLevel(int AD_Table_ID,
boolean ro)
Access to Table based on Role User Level Table Access Level |
void |
loadAccess(boolean reload)
Load Access Info |
void |
setAD_User_ID(int AD_User_ID)
Set Logged in user |
String |
toString()
String Representation |
String |
toStringX(Properties ctx)
Extended String Representation |
String |
updateAccessRecords()
Create Access Records |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.compiere.model.I_Persistent |
|---|
save |
| Field Detail |
|---|
public static final boolean SQL_RW
public static final boolean SQL_RO
public static final boolean SQL_FULLYQUALIFIED
public static final boolean SQL_NOTQUALIFIED
public static final int SUPERUSER_USER_ID
public static final int SYSTEM_USER_ID
| Constructor Detail |
|---|
public MRole(Properties ctx,
int AD_Role_ID,
String trxName)
ctx - contextAD_Role_ID - idtrxName - transaction
public MRole(Properties ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result settrxName - transaction| Method Detail |
|---|
public static MRole getDefault()
public static MRole getDefault(Properties ctx,
boolean reload)
ctx - contextreload - if true forces load
Login.loadPreferences(KeyNamePair, KeyNamePair, java.sql.Timestamp, String)
public static MRole get(Properties ctx,
int AD_Role_ID,
int AD_User_ID,
boolean reload)
ctx - contextAD_Role_ID - roleAD_User_ID - userreload - if true forces load
public static MRole get(Properties ctx,
int AD_Role_ID)
ctx - contextAD_Role_ID - role
public static MRole[] getOfClient(Properties ctx)
ctx - context
public static MRole[] getOf(Properties ctx,
String whereClause)
ctx - contextwhereClause - where clause
public int getConfirmQueryRecords()
getConfirmQueryRecords in interface I_AD_RolegetConfirmQueryRecords in class X_AD_Rolepublic boolean isQueryRequire(int noRecords)
noRecords - records
public boolean isQueryMax(int noRecords)
noRecords - records
protected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
protected boolean afterSave(boolean newRecord,
boolean success)
afterSave in class POnewRecord - newsuccess - success
protected boolean afterDelete(boolean success)
afterDelete in class POsuccess - true if record deleted
public String updateAccessRecords()
public String toString()
toString in class X_AD_Rolepublic String toStringX(Properties ctx)
ctx - Properties
public void setAD_User_ID(int AD_User_ID)
AD_User_ID - user requesting infopublic int getAD_User_ID()
public void loadAccess(boolean reload)
reload - re-load from diskpublic String getClientWhere(boolean rw)
rw - read write
public boolean isClientAccess(int AD_Client_ID,
boolean rw)
AD_Client_ID - clientrw - read write access
public String getOrgWhere(boolean rw)
rw - read write
public boolean isOrgAccess(int AD_Org_ID,
boolean rw)
AD_Org_ID - orgrw - read write access
public boolean isCanReport(int AD_Table_ID)
AD_Table_ID - table
public boolean isCanExport(int AD_Table_ID)
AD_Table_ID -
public boolean isTableAccess(int AD_Table_ID,
boolean ro)
AD_Table_ID - tablero - check read only access otherwise read write access level
public boolean isTableAccessLevel(int AD_Table_ID,
boolean ro)
AD_Table_ID - tablero - check read only access otherwise read write access level
public boolean isColumnAccess(int AD_Table_ID,
int AD_Column_ID,
boolean ro)
AD_Table_ID - tableAD_Column_ID - columnro - read only
public boolean isRecordAccess(int AD_Table_ID,
int Record_ID,
boolean ro)
AD_Table_ID - tableRecord_ID - recordro - read only
public Boolean getWindowAccess(int AD_Window_ID)
AD_Window_ID - window
public Boolean getProcessAccess(int AD_Process_ID)
AD_Process_ID - process
public Boolean getTaskAccess(int AD_Task_ID)
AD_Task_ID - task
public Boolean getFormAccess(int AD_Form_ID)
AD_Form_ID - form
public Boolean getWorkflowAccess(int AD_Workflow_ID)
AD_Workflow_ID - workflow
public String addAccessSQL(String SQL,
String TableNameIn,
boolean fullyQualified,
boolean rw)
SQL - existing SQL statementTableNameIn - Table Name or list of table names AAA, BBB or AAA a, BBB bfullyQualified - fullyQualified namesrw - if false, includes System Data
public boolean canUpdate(int AD_Client_ID,
int AD_Org_ID,
int AD_Table_ID,
int Record_ID,
boolean createError)
AD_Client_ID - comntext to derive client/org/user levelAD_Org_ID - number of the current window to retrieve contextAD_Table_ID - tableRecord_ID - record idcreateError - boolean
public boolean canView(Properties ctx,
String TableLevel)
TableLevel S__ 100 4 System info
SCO 111 7 System shared info
SC_ 110 6 System/Client info
_CO 011 3 Client shared info
_C_ 011 2 Client shared info
__O 001 1 Organization info
ctx - contextTableLevel - AccessLevel
public boolean isShowPreference()
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||