Package org.compiere.model
Class MRole
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_AD_Role
-
- org.compiere.model.MRole
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_AD_Role
,I_Persistent
,Evaluatee
,ImmutablePOSupport
public final class MRole extends X_AD_Role implements ImmutablePOSupport
Role Model. Includes AD_User runtime info for Personal Access The class is final, so that you cannot overwrite the security rules.- Version:
- $Id: MRole.java,v 1.5 2006/08/09 16:38:47 jjanke Exp $
- Author:
- Jorg Janke, Karsten Thiemann FR [ 1782412 ], Carlos Ruiz - globalqss - FR [ 1846929 ] - implement ASP
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
SQL_FULLYQUALIFIED
Access SQL Fully Qualifiedstatic boolean
SQL_NOTQUALIFIED
Access SQL Not Fully Qualifiedstatic boolean
SQL_RO
Access SQL Read Onlystatic boolean
SQL_RW
Access SQL Read Writestatic int
SUPERUSER_USER_ID
The AD_User_ID of the SuperUserstatic int
SYSTEM_USER_ID
The AD_User_ID of the System Administrator-
Fields inherited from class org.compiere.model.X_AD_Role
PREFERENCETYPE_AD_Reference_ID, PREFERENCETYPE_Client, PREFERENCETYPE_None, PREFERENCETYPE_Organization, PREFERENCETYPE_User, ROLETYPE_AD_Reference_ID, ROLETYPE_ExternalApp1, ROLETYPE_ExternalApp2, ROLETYPE_ExternalApp3, ROLETYPE_ExternalApp4, ROLETYPE_ExternalApp5, ROLETYPE_Mobile, ROLETYPE_Swing, ROLETYPE_SystemSupport, ROLETYPE_WebService, ROLETYPE_WebUI, USERLEVEL_AD_Reference_ID, USERLEVEL_Client, USERLEVEL_ClientPlusOrganization, USERLEVEL_Organization, USERLEVEL_System
-
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, LOCAL_TRX_PREFIX, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
-
Fields inherited from interface org.compiere.model.I_AD_Role
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_Role_ID, COLUMNNAME_AD_Role_UU, COLUMNNAME_AD_Tree_Menu_ID, COLUMNNAME_AD_Tree_Org_ID, COLUMNNAME_Allow_Info_Account, COLUMNNAME_Allow_Info_Asset, COLUMNNAME_Allow_Info_BPartner, COLUMNNAME_Allow_Info_InOut, COLUMNNAME_Allow_Info_Invoice, COLUMNNAME_Allow_Info_Order, COLUMNNAME_Allow_Info_Payment, COLUMNNAME_Allow_Info_Product, COLUMNNAME_Allow_Info_Resource, COLUMNNAME_Allow_Info_Schedule, COLUMNNAME_AmtApproval, COLUMNNAME_AmtApprovalAccum, COLUMNNAME_C_Currency_ID, COLUMNNAME_ConfirmQueryRecords, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DaysApprovalAccum, COLUMNNAME_Description, COLUMNNAME_IsAccessAdvanced, COLUMNNAME_IsAccessAllOrgs, COLUMNNAME_IsActive, COLUMNNAME_IsCanApproveOwnDoc, COLUMNNAME_IsCanExport, COLUMNNAME_IsCanReport, COLUMNNAME_IsChangeLog, COLUMNNAME_IsDiscountAllowedOnTotal, COLUMNNAME_IsDiscountUptoLimitPrice, COLUMNNAME_IsManual, COLUMNNAME_IsMasterRole, COLUMNNAME_IsMenuAutoExpand, COLUMNNAME_IsPersonalAccess, COLUMNNAME_IsPersonalLock, COLUMNNAME_IsShowAcct, COLUMNNAME_IsUseUserOrgAccess, COLUMNNAME_MaxQueryRecords, COLUMNNAME_Name, COLUMNNAME_OverwritePriceLimit, COLUMNNAME_PreferenceType, COLUMNNAME_RoleType, COLUMNNAME_Supervisor_ID, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_UserDiscount, COLUMNNAME_UserLevel, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MRole(Properties ctx, int AD_Role_ID, String trxName)
Standard Constructor NOTE - This method must not be used when the role is being requested to manage permissions, in such case is necessary to use one of the get methods setting the userIDMRole(Properties ctx, ResultSet rs, String trxName)
Load Constructor NOTE - This method must not be used when the role is being requested to manage permissions, in such case is necessary to use one of the get methods setting the userIDMRole(Properties ctx, MRole copy)
MRole(Properties ctx, MRole copy, String trxName)
MRole(MRole copy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
addAccessSQL(String SQL, String TableNameIn, boolean fullyQualified, boolean rw)
Appends where clause to SQL statement for Tableprotected boolean
afterDelete(boolean success)
Executed after Delete operation.protected boolean
afterSave(boolean newRecord, boolean success)
After Saveprotected boolean
beforeSave(boolean newRecord)
Before Saveboolean
canAccess_Info_Product()
boolean
canUpdate(int AD_Client_ID, int AD_Org_ID, int AD_Table_ID, int Record_ID, boolean createError)
UPDATE - Can I Update the record.boolean
canView(Properties ctx, String TableLevel)
VIEW - Can I view record in Table with given TableLevel.int
checkActionAccess(int clientId, int docTypeId, String[] options, int maxIndex)
Checks the access rights of the given role/client for the given document actions.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 from cacheint
getAD_User_ID()
Get Logged in userString
getClientWhere(boolean rw)
Get Client Where Clause Valueint
getConfirmQueryRecords()
Get Confirm Query Recordsstatic MRole
getDefault()
Get Default (Client) Rolestatic MRole
getDefault(Properties ctx, boolean reload)
Get/Set Default Role.Boolean
getFormAccess(int AD_Form_ID)
Get Form AccessList<MRole>
getIncludedRoles(boolean recursive)
String
getIncludedRolesWhereClause(String roleColumnSQL, List<Object> params)
Get Role Where Clause.Boolean
getInfoAccess(int AD_InfoWindow_ID)
static MRole[]
getOf(Properties ctx, String whereClause)
Get Roles With where clausestatic MRole[]
getOfClient(Properties ctx)
Get Roles Of Clientstatic MRole[]
getOfClient(Properties ctx, String trxName)
Get Roles Of ClientString
getOrgWhere(boolean rw)
Get Org Where Clause ValueBoolean
getProcessAccess(int AD_Process_ID)
Get Process AccessBoolean
getTaskAccess(int AD_Task_ID)
Get Task Accessstatic String
getWhereRoleType(String roleType, String tableName)
Get where clause for a role types listBoolean
getWindowAccess(int AD_Window_ID)
Get Window AccessBoolean
getWorkflowAccess(int AD_Workflow_ID)
Get Workflow Accessboolean
isCanExport(int AD_Table_ID)
Can Export Tableboolean
isCanReport(int AD_Table_ID)
Can Report on tableboolean
isClientAccess(int AD_Client_ID, boolean rw)
Access to Clientboolean
isColumnAccess(int AD_Table_ID, int AD_Column_ID, boolean ro)
Access to Columnboolean
isOrgAccess(int AD_Org_ID, boolean rw)
Access to Orgboolean
isQueryMax(int noRecords)
Over max Queryboolean
isQueryRequire(int noRecords)
Require Queryboolean
isRecordAccess(int AD_Table_ID, int Record_ID, boolean ro)
Access to Record (no check of table)boolean
isShowPreference()
Show (Value) Preference Menuboolean
isTableAccess(int AD_Table_ID, boolean ro)
Access to Tableboolean
isTableAccessExcluded(int tableID)
Does the table is excluded for current role (this method doesn't check the level of the table, use isTableAccess for this purpose)boolean
isTableAccessLevel(int AD_Table_ID, boolean ro)
Access to Table based on Role User Level Table Access Levelvoid
loadAccess(boolean reload)
Load Access InfoMRole
markImmutable()
mark PO as immutablevoid
setAD_User_ID(int AD_User_ID)
Set Logged in userString
toString()
String RepresentationString
toStringX(Properties ctx)
Extended String RepresentationString
updateAccessRecords()
Create Access RecordsString
updateAccessRecords(boolean reset)
Create Access Records-
Methods inherited from class org.compiere.model.X_AD_Role
get_AccessLevel, getAD_Role_ID, getAD_Role_UU, getAD_Tree_Menu, getAD_Tree_Menu_ID, getAD_Tree_Org, getAD_Tree_Org_ID, getAmtApproval, getAmtApprovalAccum, getC_Currency, getC_Currency_ID, getDaysApprovalAccum, getDescription, getKeyNamePair, getMaxQueryRecords, getName, getPreferenceType, getRoleType, getSupervisor, getSupervisor_ID, getUserDiscount, getUserLevel, initPO, isAccessAdvanced, isAccessAllOrgs, isAllow_Info_Account, isAllow_Info_Asset, isAllow_Info_BPartner, isAllow_Info_InOut, isAllow_Info_Invoice, isAllow_Info_Order, isAllow_Info_Payment, isAllow_Info_Product, isAllow_Info_Resource, isAllow_Info_Schedule, isCanApproveOwnDoc, isCanExport, isCanReport, isChangeLog, isDiscountAllowedOnTotal, isDiscountUptoLimitPrice, isManual, isMasterRole, isMenuAutoExpand, isOverwritePriceLimit, isPersonalAccess, isPersonalLock, isShowAcct, isUseUserOrgAccess, setAD_Role_ID, setAD_Role_UU, setAD_Tree_Menu_ID, setAD_Tree_Org_ID, setAllow_Info_Account, setAllow_Info_Asset, setAllow_Info_BPartner, setAllow_Info_InOut, setAllow_Info_Invoice, setAllow_Info_Order, setAllow_Info_Payment, setAllow_Info_Product, setAllow_Info_Resource, setAllow_Info_Schedule, setAmtApproval, setAmtApprovalAccum, setC_Currency_ID, setConfirmQueryRecords, setDaysApprovalAccum, setDescription, setIsAccessAdvanced, setIsAccessAllOrgs, setIsCanApproveOwnDoc, setIsCanExport, setIsCanReport, setIsChangeLog, setIsDiscountAllowedOnTotal, setIsDiscountUptoLimitPrice, setIsManual, setIsMasterRole, setIsMenuAutoExpand, setIsPersonalAccess, setIsPersonalLock, setIsShowAcct, setIsUseUserOrgAccess, setMaxQueryRecords, setName, setOverwritePriceLimit, setPreferenceType, setRoleType, setSupervisor_ID, setUserDiscount, setUserLevel
-
Methods inherited from class org.compiere.model.PO
beforeDelete, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock, update_Tree, validForeignKeys
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface org.compiere.model.I_AD_Role
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
Methods inherited from interface org.compiere.model.I_Persistent
save
-
-
-
-
Field Detail
-
SQL_RW
public static final boolean SQL_RW
Access SQL Read Write- See Also:
- Constant Field Values
-
SQL_RO
public static final boolean SQL_RO
Access SQL Read Only- See Also:
- Constant Field Values
-
SQL_FULLYQUALIFIED
public static final boolean SQL_FULLYQUALIFIED
Access SQL Fully Qualified- See Also:
- Constant Field Values
-
SQL_NOTQUALIFIED
public static final boolean SQL_NOTQUALIFIED
Access SQL Not Fully Qualified- See Also:
- Constant Field Values
-
SUPERUSER_USER_ID
public static final int SUPERUSER_USER_ID
The AD_User_ID of the SuperUser- See Also:
- Constant Field Values
-
SYSTEM_USER_ID
public static final int SYSTEM_USER_ID
The AD_User_ID of the System Administrator- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MRole
public MRole(Properties ctx, int AD_Role_ID, String trxName)
Standard Constructor NOTE - This method must not be used when the role is being requested to manage permissions, in such case is necessary to use one of the get methods setting the userID- Parameters:
ctx
- contextAD_Role_ID
- idtrxName
- transaction
-
MRole
public MRole(Properties ctx, ResultSet rs, String trxName)
Load Constructor NOTE - This method must not be used when the role is being requested to manage permissions, in such case is necessary to use one of the get methods setting the userID- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
MRole
public MRole(MRole copy)
- Parameters:
copy
-
-
MRole
public MRole(Properties ctx, MRole copy)
- Parameters:
ctx
-copy
-
-
MRole
public MRole(Properties ctx, MRole copy, String trxName)
- Parameters:
ctx
-copy
-trxName
-
-
-
Method Detail
-
getDefault
public static MRole getDefault()
Get Default (Client) Role- Returns:
- role
-
getDefault
public static MRole getDefault(Properties ctx, boolean reload)
Get/Set Default Role.- Parameters:
ctx
- contextreload
- if true forces load- Returns:
- role
- See Also:
Login.loadPreferences(KeyNamePair, KeyNamePair, java.sql.Timestamp, String)
-
get
public static MRole get(Properties ctx, int AD_Role_ID, int AD_User_ID, boolean reload)
Get Role for User from cache- Parameters:
ctx
- contextAD_Role_ID
- roleAD_User_ID
- userreload
- if true forces load- Returns:
- role
-
get
public static MRole get(Properties ctx, int AD_Role_ID)
Get Role (cached). Did not set user - so no access loaded- Parameters:
ctx
- contextAD_Role_ID
- role- Returns:
- role
-
getOfClient
public static MRole[] getOfClient(Properties ctx)
Get Roles Of Client- Parameters:
ctx
- context- Returns:
- roles of client
-
getOfClient
public static MRole[] getOfClient(Properties ctx, String trxName)
Get Roles Of Client- Parameters:
ctx
- contexttrxName
-- Returns:
- roles of client
-
getOf
public static MRole[] getOf(Properties ctx, String whereClause)
Get Roles With where clause- Parameters:
ctx
- contextwhereClause
- where clause- Returns:
- roles of client
-
getConfirmQueryRecords
public int getConfirmQueryRecords()
Get Confirm Query Records- Specified by:
getConfirmQueryRecords
in interfaceI_AD_Role
- Overrides:
getConfirmQueryRecords
in classX_AD_Role
- Returns:
- entered records or 500 (default)
-
isQueryRequire
public boolean isQueryRequire(int noRecords)
Require Query- Parameters:
noRecords
- records- Returns:
- true if query required
-
isQueryMax
public boolean isQueryMax(int noRecords)
Over max Query- Parameters:
noRecords
- records- Returns:
- true if over max query
-
beforeSave
protected boolean beforeSave(boolean newRecord)
Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- true if it can be saved
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success)
After Save
-
afterDelete
protected boolean afterDelete(boolean success)
Executed after Delete operation.- Overrides:
afterDelete
in classPO
- Parameters:
success
- true if record deleted- Returns:
- true if delete is a success
-
updateAccessRecords
public String updateAccessRecords()
Create Access Records- Returns:
- info
-
updateAccessRecords
public String updateAccessRecords(boolean reset)
Create Access Records- Parameters:
reset
- true will reset existing access- Returns:
- info
-
toString
public String toString()
String Representation
-
toStringX
public String toStringX(Properties ctx)
Extended String Representation- Parameters:
ctx
- Properties- Returns:
- extended info
-
setAD_User_ID
public void setAD_User_ID(int AD_User_ID)
Set Logged in user- Parameters:
AD_User_ID
- user requesting info
-
getAD_User_ID
public int getAD_User_ID()
Get Logged in user- Returns:
- AD_User_ID user requesting info
-
loadAccess
public void loadAccess(boolean reload)
Load Access Info- Parameters:
reload
- re-load from disk
-
getClientWhere
public String getClientWhere(boolean rw)
Get Client Where Clause Value- Parameters:
rw
- read write- Returns:
- "AD_Client_ID=0" or "AD_Client_ID IN(0,1)"
-
isClientAccess
public boolean isClientAccess(int AD_Client_ID, boolean rw)
Access to Client- Parameters:
AD_Client_ID
- clientrw
- read write access- Returns:
- true if access
-
getOrgWhere
public String getOrgWhere(boolean rw)
Get Org Where Clause Value- Parameters:
rw
- read write- Returns:
- "AD_Org_ID=0" or "AD_Org_ID IN(0,1)" or null (if access all org)
-
isOrgAccess
public boolean isOrgAccess(int AD_Org_ID, boolean rw)
Access to Org- Parameters:
AD_Org_ID
- orgrw
- read write access- Returns:
- true if access
-
isCanReport
public boolean isCanReport(int AD_Table_ID)
Can Report on table- Parameters:
AD_Table_ID
- table- Returns:
- true if access
-
isCanExport
public boolean isCanExport(int AD_Table_ID)
Can Export Table- Parameters:
AD_Table_ID
-- Returns:
- true if access
-
isTableAccess
public boolean isTableAccess(int AD_Table_ID, boolean ro)
Access to Table- Parameters:
AD_Table_ID
- tablero
- check read only access otherwise read write access level- Returns:
- has RO/RW access to table
-
isTableAccessLevel
public boolean isTableAccessLevel(int AD_Table_ID, boolean ro)
Access to Table based on Role User Level Table Access Level- Parameters:
AD_Table_ID
- tablero
- check read only access otherwise read write access level- Returns:
- has RO/RW access to table
-
isColumnAccess
public boolean isColumnAccess(int AD_Table_ID, int AD_Column_ID, boolean ro)
Access to Column- Parameters:
AD_Table_ID
- tableAD_Column_ID
- columnro
- read only- Returns:
- true if access
-
isRecordAccess
public boolean isRecordAccess(int AD_Table_ID, int Record_ID, boolean ro)
Access to Record (no check of table)- Parameters:
AD_Table_ID
- tableRecord_ID
- recordro
- read only- Returns:
- boolean
-
getWindowAccess
public Boolean getWindowAccess(int AD_Window_ID)
Get Window Access- Parameters:
AD_Window_ID
- window- Returns:
- null in no access, TRUE if r/w and FALSE if r/o
-
getProcessAccess
public Boolean getProcessAccess(int AD_Process_ID)
Get Process Access- Parameters:
AD_Process_ID
- process- Returns:
- null in no access, TRUE if r/w and FALSE if r/o
-
getTaskAccess
public Boolean getTaskAccess(int AD_Task_ID)
Get Task Access- Parameters:
AD_Task_ID
- task- Returns:
- null in no access, TRUE if r/w and FALSE if r/o
-
getFormAccess
public Boolean getFormAccess(int AD_Form_ID)
Get Form Access- Parameters:
AD_Form_ID
- form- Returns:
- null in no access, TRUE if r/w and FALSE if r/o
-
getWorkflowAccess
public Boolean getWorkflowAccess(int AD_Workflow_ID)
Get Workflow Access- Parameters:
AD_Workflow_ID
- workflow- Returns:
- null in no access, TRUE if r/w and FALSE if r/o
-
addAccessSQL
public String addAccessSQL(String SQL, String TableNameIn, boolean fullyQualified, boolean rw)
Appends where clause to SQL statement for Table- Parameters:
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- Returns:
- updated SQL statement
-
canUpdate
public boolean canUpdate(int AD_Client_ID, int AD_Org_ID, int AD_Table_ID, int Record_ID, boolean createError)
UPDATE - Can I Update the record. Access error info (AccessTableNoUpdate) is saved in the log- Parameters:
AD_Client_ID
- context to derive client/org/user levelAD_Org_ID
- number of the current window to retrieve contextAD_Table_ID
- tableRecord_ID
- record idcreateError
- boolean- Returns:
- true if you can update see org.compiere.model.MTable#dataSave(boolean)
-
canView
public boolean canView(Properties ctx, String TableLevel)
VIEW - Can I view record in Table with given 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
- Parameters:
ctx
- contextTableLevel
- AccessLevel- Returns:
- true/false Access error info (AccessTableNoUpdate, AccessTableNoView) is saved in the log see org.compiere.model.MTabVO#loadTabDetails(MTabVO, ResultSet)
-
isShowPreference
public boolean isShowPreference()
Show (Value) Preference Menu- Returns:
- true if preference type is not None
-
checkActionAccess
public int checkActionAccess(int clientId, int docTypeId, String[] options, int maxIndex)
Checks the access rights of the given role/client for the given document actions.- Parameters:
clientId
-docTypeId
-options
-maxIndex
-- Returns:
- number of valid actions in the String[] options
-
getIncludedRoles
public List<MRole> getIncludedRoles(boolean recursive)
- Returns:
- unmodifiable list of included roles
-
getIncludedRolesWhereClause
public String getIncludedRolesWhereClause(String roleColumnSQL, List<Object> params)
Get Role Where Clause. It will look something like myalias.AD_Role_ID IN (?, ?, ?).- Parameters:
roleColumnSQL
- role columnname or role column SQL (e.g. myalias.AD_Role_ID)params
- a list where the method will put SQL parameters. If null, this method will generate a not parametrized query- Returns:
- role SQL where clause
-
getInfoAccess
public Boolean getInfoAccess(int AD_InfoWindow_ID)
-
canAccess_Info_Product
public boolean canAccess_Info_Product()
-
getWhereRoleType
public static String getWhereRoleType(String roleType, String tableName)
Get where clause for a role types list- Parameters:
roleType
- - comma separated list of role types, NULL can be usedtableName
- - if table needs to be qualified- Returns:
- whereClause - return null if roleType is null or empty
-
isTableAccessExcluded
public boolean isTableAccessExcluded(int tableID)
Does the table is excluded for current role (this method doesn't check the level of the table, use isTableAccess for this purpose)- Parameters:
tableID
- ID of the table- Returns:
-
markImmutable
public MRole markImmutable()
Description copied from interface:ImmutablePOSupport
mark PO as immutable- Specified by:
markImmutable
in interfaceImmutablePOSupport
- Returns:
- PO
-
-