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
Role Model.
Includes AD_User runtime info for Personal Access.
The class is final, so that you cannot overwrite the security rules.
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:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
Access SQL Fully Qualifiedstatic final boolean
Access SQL Not Fully Qualifiedstatic final boolean
Access SQL Read Onlystatic final boolean
Access SQL Read Writestatic final int
The AD_User_ID of the SuperUserstatic final int
The AD_User_ID of the System AdministratorFields 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, UUID_NEW_RECORD, 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_IsClientAdministrator, 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_PredefinedContextVariables, COLUMNNAME_PreferenceType, COLUMNNAME_RoleType, COLUMNNAME_Supervisor_ID, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_UserDiscount, COLUMNNAME_UserLevel, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMRole
(Properties ctx, int AD_Role_ID, String trxName) Standard Constructor.MRole
(Properties ctx, String AD_Role_UU, String trxName) UUID based ConstructorMRole
(Properties ctx, ResultSet rs, String trxName) Load Constructor.MRole
(Properties ctx, MRole copy) Copy constructorMRole
(Properties ctx, MRole copy, String trxName) Copy constructorCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionaddAccessSQL
(String SQL, String TableNameIn, boolean fullyQualified, boolean rw) Appends access where clause to SQL statement for Tablesprotected boolean
afterDelete
(boolean success) Executed after Delete operation.protected boolean
afterSave
(boolean newRecord, boolean success) After Saveprotected boolean
beforeSave
(boolean newRecord) Before Saveboolean
boolean
canUpdate
(int AD_Client_ID, int AD_Org_ID, int AD_Table_ID, int Record_ID, boolean createError) Check update access.boolean
canView
(Properties ctx, String TableLevel) VIEW - Can I view record in Table with given TableLevel.boolean
checkAccessSQL
(MTable table, int recordId, String uuid, boolean rw) Check record access throughaddAccessSQL(String, String, boolean, boolean)
using
either record id or record uuidint
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
Get Logged in usergetClientWhere
(boolean rw) Get Where Clause for client filterint
Get Confirm Query Recordsstatic MRole
Get role for current session/contextstatic MRole
getDefault
(Properties ctx, boolean reload) Get role for current session/contextgetFormAccess
(int AD_Form_ID) Get Form Access (AD_Form_Access).
Check ASP record as well if client is using ASP access control.getIncludedRoles
(boolean recursive) getIncludedRolesWhereClause
(String roleColumnSQL, List<Object> params) Get Where Clause filter for this role and included roles.
It will look something like myalias.AD_Role_ID IN (?getInfoAccess
(int AD_InfoWindow_ID) Get info window access (AD_InfoWindow_Access)static MRole[]
getOf
(Properties ctx, String whereClause) Get Roles via where clausestatic MRole[]
getOfClient
(Properties ctx) Get Roles Of Clientstatic MRole[]
getOfClient
(Properties ctx, String trxName) Get Roles Of ClientgetOrgWhere
(boolean rw) Get Where Clause for organization filtergetProcessAccess
(int AD_Process_ID) Get Process Access (AD_Process_Access).getTaskAccess
(int AD_Task_ID) Get Task Access (AD_Task_Access).static String
getWhereRoleType
(String roleType, String tableName) Get where clause for a role types listgetWindowAccess
(int AD_Window_ID) Get Window Access (AD_Window_Access).
Check ASP record as well if client is using ASP access control.getWorkflowAccess
(int AD_Workflow_ID) Get Workflow Access (AD_Workflow_Access).
Check ASP record as well if client is using ASP access control.boolean
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
isColumnAccess
(int AD_Table_ID, int AD_Column_ID, boolean ro, String trxName) Access to Columnboolean
isOrgAccess
(int AD_Org_ID, boolean rw) Access to Orgboolean
isQueryMax
(int noRecords) Deprecated.boolean
isQueryRequire
(int noRecords) Deprecated.replace byGridTab.isQueryRequire(int)
boolean
isRecordAccess
(int AD_Table_ID, int Record_ID, boolean ro) Access to Record (AD_Record_Access)boolean
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 access level of the table, use isTableAccessLevel for that purpose)boolean
isTableAccessLevel
(int AD_Table_ID, boolean ro) Access to Table based on User Level and Table Access Levelvoid
loadAccess
(boolean reload) Load Access Infomark PO as immutablevoid
setAD_User_ID
(int AD_User_ID) Set Logged in usertoString()
String RepresentationtoStringX
(Properties ctx) Extended String RepresentationCreate Access Records (delete existing access records prior to that)updateAccessRecords
(boolean reset) Create Access RecordsMethods 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, getPredefinedContextVariables, 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, isClientAdministrator, 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, setIsClientAdministrator, setIsDiscountAllowedOnTotal, setIsDiscountUptoLimitPrice, setIsManual, setIsMasterRole, setIsMenuAutoExpand, setIsPersonalAccess, setIsPersonalLock, setIsShowAcct, setIsUseUserOrgAccess, setMaxQueryRecords, setName, setOverwritePriceLimit, setPredefinedContextVariables, setPreferenceType, setRoleType, setSupervisor_ID, setUserDiscount, setUserLevel
Methods inherited from class org.compiere.model.PO
beforeDelete, buildInsertSQL, 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_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, 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, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, 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, toInsertSQL, 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 Details
-
SQL_RW
public static final boolean SQL_RWAccess SQL Read Write- See Also:
-
SQL_RO
public static final boolean SQL_ROAccess SQL Read Only- See Also:
-
SQL_FULLYQUALIFIED
public static final boolean SQL_FULLYQUALIFIEDAccess SQL Fully Qualified- See Also:
-
SQL_NOTQUALIFIED
public static final boolean SQL_NOTQUALIFIEDAccess SQL Not Fully Qualified- See Also:
-
SUPERUSER_USER_ID
public static final int SUPERUSER_USER_IDThe AD_User_ID of the SuperUser- See Also:
-
SYSTEM_USER_ID
public static final int SYSTEM_USER_IDThe AD_User_ID of the System Administrator- See Also:
-
-
Constructor Details
-
MRole
UUID based Constructor- Parameters:
ctx
- ContextAD_Role_UU
- UUID keytrxName
- Transaction
-
MRole
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 AD_User_ID.
- Parameters:
ctx
- contextAD_Role_ID
- idtrxName
- transaction
-
MRole
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 AD_User_ID.
- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
MRole
Copy constructor- Parameters:
copy
-
-
MRole
Copy constructor- Parameters:
ctx
-copy
-
-
MRole
Copy constructor- Parameters:
ctx
-copy
-trxName
-
-
-
Method Details
-
getDefault
Get role for current session/context- Returns:
- role
-
getDefault
Get role for current session/context- Parameters:
ctx
- contextreload
- if true forces reload- Returns:
- role
- See Also:
-
get
Get Role for User from cache- Parameters:
ctx
- contextAD_Role_ID
- roleAD_User_ID
- userreload
- if true forces load- Returns:
- role
-
get
Get Role (cached). Did not set user - so no access loaded.- Parameters:
ctx
- contextAD_Role_ID
- role- Returns:
- role
-
getOfClient
Get Roles Of Client- Parameters:
ctx
- context- Returns:
- roles of client
-
getOfClient
Get Roles Of Client- Parameters:
ctx
- contexttrxName
-- Returns:
- roles of client
-
getOf
Get Roles via where clause- Parameters:
ctx
- contextwhereClause
- SQL where clause- Returns:
- roles matching where clause
-
getConfirmQueryRecords
public int getConfirmQueryRecords()Get Confirm Query Records- Specified by:
getConfirmQueryRecords
in interfaceI_AD_Role
- Overrides:
getConfirmQueryRecords
in classX_AD_Role
- Returns:
- value of ConfirmQueryRecords or 500 if value of ConfirmQueryRecords is 0.
-
isQueryRequire
Deprecated.replace byGridTab.isQueryRequire(int)
- Parameters:
noRecords
- records- Returns:
- true if query required
-
isQueryMax
Deprecated.replace byGridTab.isQueryMax(int)
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
Create Access Records (delete existing access records prior to that)- Returns:
- info
-
updateAccessRecords
Create Access Records- Parameters:
reset
- true to delete existing access records- Returns:
- info
-
toString
String Representation -
toStringX
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
- logged in user id
-
getAD_User_ID
public int getAD_User_ID()Get Logged in user- Returns:
- AD_User_ID
-
loadAccess
public void loadAccess(boolean reload) Load Access Info- Parameters:
reload
- re-load from DB
-
getClientWhere
Get Where Clause for client filter- 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 can access
-
getOrgWhere
Get Where Clause for organization filter- 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 can report
-
isCanExport
public boolean isCanExport(int AD_Table_ID) Can Export Table- Parameters:
AD_Table_ID
-- Returns:
- true if can export
-
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:
- true if has RO/RW access to table
-
isTableAccessLevel
public boolean isTableAccessLevel(int AD_Table_ID, boolean ro) Access to Table based on User Level and Table Access Level- Parameters:
AD_Table_ID
- tablero
- check read only access otherwise read write access level- Returns:
- true if 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
- true for read only, false for read write- Returns:
- true if can access
-
isColumnAccess
Access to Column- Parameters:
AD_Table_ID
- tableAD_Column_ID
- columnro
- true for read only, false for read writetrxName
-- Returns:
- true if can access
-
isRecordAccess
public boolean isRecordAccess(int AD_Table_ID, int Record_ID, boolean ro) Access to Record (AD_Record_Access)- Parameters:
AD_Table_ID
- tableRecord_ID
- recordro
- true for read only, false for read write- Returns:
- true if can access
-
getWindowAccess
Get Window Access (AD_Window_Access).
Check ASP record as well if client is using ASP access control.- Parameters:
AD_Window_ID
- window- Returns:
- null if can't access, TRUE if r/w and FALSE if r/o
-
getProcessAccess
Get Process Access (AD_Process_Access). Check ASP record as well if client is using ASP access control.- Parameters:
AD_Process_ID
- process- Returns:
- null if can't access, TRUE if r/w and FALSE if r/o
-
getTaskAccess
Get Task Access (AD_Task_Access).
Check ASP record as well if client is using ASP access control.- Parameters:
AD_Task_ID
- task- Returns:
- null if can't access, TRUE if r/w and FALSE if r/o
-
getFormAccess
Get Form Access (AD_Form_Access).
Check ASP record as well if client is using ASP access control.- Parameters:
AD_Form_ID
- form- Returns:
- null if can't access, TRUE if r/w and FALSE if r/o
-
getWorkflowAccess
Get Workflow Access (AD_Workflow_Access).
Check ASP record as well if client is using ASP access control.- Parameters:
AD_Workflow_ID
- workflow- Returns:
- null if can't access, TRUE if r/w and FALSE if r/o
-
addAccessSQL
Appends access where clause to SQL statement for Tables- Parameters:
SQL
- existing SQL statementTableNameIn
- Table Name or list of table names AAA, BBB or AAA a, BBB bfullyQualified
- fullyQualified column namerw
- if false, includes records belongs to System client (AD_Client_ID=0).- 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) Check update access. 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
- true to capture error into server log- Returns:
- true if can update see org.compiere.model.MTable#dataSave(boolean)
-
canView
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
- table access level- Returns:
- true if can view
Access error info (AccessTableNoUpdate, AccessTableNoView) is saved in the log - See Also:
-
GridTabVO.loadTabDetails(GridTabVO, ResultSet)
-
isShowPreference
public boolean isShowPreference()Show (Value) Preference Menu- Returns:
- true if preference type is not None
-
checkActionAccess
Checks the access rights of the given role/client for the given document actions.- Parameters:
clientId
- AD_Client_IDdocTypeId
- C_DocType_IDoptions
- array of document actionsmaxIndex
- define the range of elements to examine in options (>= 0 and < maxIndex)- Returns:
- number of valid actions in the String[] options argument
-
getIncludedRoles
- Parameters:
recursive
-- Returns:
- unmodifiable list of included roles
-
getIncludedRolesWhereClause
Get Where Clause filter for this role and included roles.
It will look something like myalias.AD_Role_ID IN (?, ?, ?).- Parameters:
roleColumnSQL
- role column name 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 parameterized query- Returns:
- SQL where clause
-
getInfoAccess
Get info window access (AD_InfoWindow_Access)- Parameters:
AD_InfoWindow_ID
-- Returns:
- null if can't access, TRUE if r/w and FALSE if r/o
-
canAccess_Info_Product
public boolean canAccess_Info_Product()- Returns:
- true if can access info window for product
-
getWhereRoleType
Get where clause for a role types list- Parameters:
roleType
- - comma separated list of role types, NULL can be usedtableName
- - if column 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 access level of the table, use isTableAccessLevel for that purpose)- Parameters:
tableID
- AD_Table_ID- Returns:
- true if table access is excluded for this role
-
markImmutable
Description copied from interface:ImmutablePOSupport
mark PO as immutable- Specified by:
markImmutable
in interfaceImmutablePOSupport
- Returns:
- PO
-
checkAccessSQL
Check record access throughaddAccessSQL(String, String, boolean, boolean)
using
either record id or record uuid- Parameters:
table
-recordId
- ignore if uuid is useuuid
- null to use recordIdrw
- true for writable, false for readonly- Returns:
- true if role has access to record
-
GridTab.isQueryMax(int)