public class VariablesSecureApp extends VariablesBase
isMultipart
Constructor and Description |
---|
VariablesSecureApp(javax.servlet.http.HttpServletRequest request)
Constructor that parses the session variables to initialize the class' internal variables.
|
VariablesSecureApp(javax.servlet.http.HttpServletRequest request,
boolean f)
Constructor that parses the session variables to initialize the class' internal variables for
multipart requests.
|
VariablesSecureApp(String strUser,
String strClient,
String strOrganization)
Constructor used to make an empty/manual instance of this class.
|
VariablesSecureApp(String strUser,
String strClient,
String strOrganization,
String strRole)
Constructor used to make an empty/manual instance of this class.
|
VariablesSecureApp(String strUser,
String strClient,
String strOrganization,
String strRole,
String strLanguage)
Constructor used to make an empty/manual instance of this class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
commandIn(String... commands)
Returns true if the Command parameter of the HTTP POST/GET request to the servlet is one of the
specified values, false if not.
|
String |
getAccessLevel() |
String |
getClient()
Returns the ID of the client (AD_CLIENT_ID) as defined by the role of the user's current
session.
|
String |
getCommand()
Returns the command that was passed to the servlet through the Command parameter of the HTTP
POST/GET.
|
String |
getDBSession()
Returns the ID of the session stored within the AD_SESSION database table.
|
FieldProvider |
getEditionData(String AD_Tab_ID) |
String |
getJavaDataTimeFormat() |
String |
getJavaDateFormat()
Returns the date format used in Java formatting as defined by the dateFormat.java variable
within the config/Openbravo.properties configuration file.
|
String |
getJsDateFormat()
Returns the date format used in Javascript formatting as defined by the dateFormat.java
variable within the config/Openbravo.properties configuration file.
|
String |
getLanguage()
Returns the code of the language currently selected by the authenticated user according to the
RFC 4646 format LANG_REGION, e.g.
|
OBError |
getMessage(String AD_Tab_ID)
Returns a deserialized OBError object retrieved from the session data that might contain the
error information for the specified tab.
|
String |
getOrg()
Returns the ID of the organization (AD_ORG_ID) selected by the user among the ones available
within the role of the current session.
|
String |
getRole()
Returns the primary key (AD_ROLE_ID) of the role of the authenticated user deriving as entered
in the AD_ROLE table.
|
String |
getSqlDateFormat()
Returns the date format used in SQL formatting as defined by the dateFormat.sql variable within
the config/Openbravo.properties configuration file.
|
String |
getTheme()
Returns the unique name of the theme currently selected for the session.
|
String |
getUser()
Returns the primary key (AD_USER_ID) of the authenticated user deriving from the AD_USER table.
|
String |
getUserClient() |
String |
getUserOrg() |
String |
getWarehouse()
Returns the ID of the current default warehouse that will be used with transactions that
require a warehouse selected.
|
void |
removeEditionData(String AD_Tab_ID) |
void |
removeMessage(String AD_Tab_ID)
Removes the error object for the specified tab from the session data.
|
void |
setEditionData(String AD_Tab_ID,
FieldProvider data) |
void |
setMessage(String AD_Tab_ID,
OBError error)
Serializes and saves the error object to a session variable, specific to the tab which ID is
being passed.
|
clearSession, getGlobalVariable, getGlobalVariable, getGlobalVariable, getGlobalVariable, getGlobalVariable, getGlobalVariable, getInGlobalVariable, getInGlobalVariable, getInGlobalVariable, getInGlobalVariable, getInGlobalVariable, getInGlobalVariable, getInParameter, getInParameter, getInParameter, getInParameter, getInParameter, getInParameter, getInStringParameter, getInStringParameter, getInStringParameter, getInStringParameter, getInStringParameter, getInStringParameter, getListFromInString, getMultiFile, getMultiParameter, getMultiParameter, getMultiParameters, getMultiParameters, getMultiValueStringParameter, getNumericGlobalVariable, getNumericParameter, getNumericParameter, getNumericRequestGlobalVariable, getParameterNames, getPostDataHash, getRequestGlobalVariable, getRequestGlobalVariable, getRequestInGlobalVariable, getRequestInGlobalVariable, getRequiredGlobalVariable, getRequiredGlobalVariable, getRequiredInGlobalVariable, getRequiredInGlobalVariable, getRequiredInParameter, getRequiredInParameter, getRequiredInputGlobalVariable, getRequiredInputGlobalVariable, getRequiredInStringParameter, getRequiredInStringParameter, getRequiredNumericParameter, getRequiredNumericParameter, getRequiredStringParameter, getRequiredStringParameter, getSessionObject, getSessionValue, getSessionValue, getStringParameter, getStringParameter, getStringParameter, getStringParameter, getStringParameter, getStringParameter, hasParameter, removeSessionValue, setSessionObject, setSessionValue
public VariablesSecureApp(String strUser, String strClient, String strOrganization)
strUser
- ID of the user as specified by the AD_USER_ID column within the AD_USER database
table.strClient
- ID of the client as specified by the AD_CLIENT_ID column within the AD_CLIENT database
table.strOrganization
- ID of the organization as specified by the AD_ORG_ID column within the AD_ORG database
table.public VariablesSecureApp(String strUser, String strClient, String strOrganization, String strRole)
strUser
- ID of the user as specified by the AD_USER_ID column within the AD_USER database
table.strClient
- ID of the client as specified by the AD_CLIENT_ID column within the AD_CLIENT database
table.strOrganization
- ID of the organization as specified by the AD_ORG_ID column within the AD_ORG database
table.strRole
- ID of the role as specified by the AD_ROLE_ID column within the AD_ROLE database
table.public VariablesSecureApp(String strUser, String strClient, String strOrganization, String strRole, String strLanguage)
strUser
- ID of the user as specified by the AD_USER_ID column within the AD_USER database
table.strClient
- ID of the client as specified by the AD_CLIENT_ID column within the AD_CLIENT database
table.strOrganization
- ID of the organization as specified by the AD_ORG_ID column within the AD_ORG database
table.strLanguage
- Languagepublic VariablesSecureApp(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequest object originating from the user request.public VariablesSecureApp(javax.servlet.http.HttpServletRequest request, boolean f)
request
- HttpServletRequest object originating from the user request.public String getUser()
public String getRole()
public String getLanguage()
public String getTheme()
public String getClient()
public String getOrg()
public String getUserClient()
public String getUserOrg()
public String getWarehouse()
public String getDBSession()
public String getCommand()
public String getAccessLevel()
public boolean commandIn(String... commands)
commands
- The list of strings to compare Command parameter to.true
in case current command is any of the ones passed as parametergetCommand()
public String getJavaDateFormat()
public String getJavaDataTimeFormat()
public String getJsDateFormat()
public String getSqlDateFormat()
public OBError getMessage(String AD_Tab_ID)
AD_Tab_ID
- String with the primary key (ID) of the tab as entered within the AD_TAB database
table.setMessage(String, OBError)
,
removeMessage(String)
public void setMessage(String AD_Tab_ID, OBError error)
AD_Tab_ID
- String with the primary key (ID) of the tab as entered within the AD_TAB database
table.error
- The OBError object that needs to be set.setMessage(String, OBError)
,
removeMessage(String)
public void removeMessage(String AD_Tab_ID)
AD_Tab_ID
- String with the primary key (ID) of the tab as entered within the AD_TAB database
table.setMessage(String, OBError)
,
getMessage(String)
public FieldProvider getEditionData(String AD_Tab_ID)
public void setEditionData(String AD_Tab_ID, FieldProvider data)
public void removeEditionData(String AD_Tab_ID)