Package org.openbravo.scheduling
Class ProcessContext
- java.lang.Object
-
- org.openbravo.scheduling.ProcessContext
-
- All Implemented Interfaces:
Serializable
public class ProcessContext extends Object implements Serializable
- Author:
- awolski
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProcessContext()
Creates an empty ProcessContext.ProcessContext(VariablesSecureApp vars)
Creates a ProcessContext using the information of VariablesSecureApp object.ProcessContext(VariablesSecureApp vars, String client, String org, boolean roleSecurity)
Create a request with the selected client and organization.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAccessLevel()
String
getClient()
String
getCommand()
String
getDbSessionID()
String
getJavaDateFormat()
String
getJavaDateTimeFormat()
String
getJsDateFormat()
String
getLanguage()
String
getOrganization()
String
getRole()
String
getSqlDateFormat()
String
getTheme()
String
getUser()
String
getUserClient()
String
getUserOrganization()
String
getWarehouse()
boolean
isRoleSecurity()
static ProcessContext
newInstance(String processContext)
String
toString()
VariablesSecureApp
toVars()
-
-
-
Field Detail
-
KEY
public static final String KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProcessContext
public ProcessContext()
Creates an empty ProcessContext.
-
ProcessContext
public ProcessContext(VariablesSecureApp vars)
Creates a ProcessContext using the information of VariablesSecureApp object.- Parameters:
vars
- a VariablesSecureApp object with the session information used to initialize the ProcessContext properties.
-
ProcessContext
public ProcessContext(VariablesSecureApp vars, String client, String org, boolean roleSecurity)
Create a request with the selected client and organization.- Parameters:
vars
-client
-org
-
-
-
Method Detail
-
toVars
public VariablesSecureApp toVars()
- Returns:
- a new instance of
VariablesSecureApp
created from the client, organization and user. - See Also:
getClient()
,getOrganization()
,getUser()
-
getUser
public String getUser()
- Returns:
- the user
-
getRole
public String getRole()
- Returns:
- the role
-
getLanguage
public String getLanguage()
- Returns:
- the language
-
getTheme
public String getTheme()
- Returns:
- the theme
-
getClient
public String getClient()
- Returns:
- the client
-
getOrganization
public String getOrganization()
- Returns:
- the organization
-
getWarehouse
public String getWarehouse()
- Returns:
- the warehouse
-
getCommand
public String getCommand()
- Returns:
- the command
-
getUserClient
public String getUserClient()
- Returns:
- the userClient
-
getUserOrganization
public String getUserOrganization()
- Returns:
- the userOrganization
-
getDbSessionID
public String getDbSessionID()
- Returns:
- the dbSessionID
-
getJavaDateFormat
public String getJavaDateFormat()
- Returns:
- the javaDateFormat
-
getJavaDateTimeFormat
public String getJavaDateTimeFormat()
- Returns:
- the javaDateTimeFormat
-
getJsDateFormat
public String getJsDateFormat()
- Returns:
- the jsDateFormat
-
getSqlDateFormat
public String getSqlDateFormat()
- Returns:
- the sqlDateFormat
-
getAccessLevel
public String getAccessLevel()
- Returns:
- the accessLevel
-
isRoleSecurity
public boolean isRoleSecurity()
- Returns:
- whether the security for the process is based on role.
-
toString
public String toString()
-
newInstance
public static ProcessContext newInstance(String processContext)
- Parameters:
processContext
- a String with the JSON representation of a ProcessContext- Returns:
- a new instance created from the provided JSON representation of a ProcessContext. This method returns null if the provided String is null, empty or if it is an invalid JSON definition of a ProcessContext.
-
-