|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.swt.client.ui.builder.ApplicationParameters
public final class ApplicationParameters
A class that can be used to identify all URL parameters that are related to a specific application, as well as helpers used to build such URLs. In each URL you specify a list of applications that there are parameters for using the parameter APPL. For example you can specify parameters for the application sageERP, and sageCRM by listing the applications by using the following URL:
http://myserver?APPL=sageERP&APPL=sageCRM
To specify application specific parameters they must be prefixed with the application name followed by an underscore followed by the parameter name. For example you can specify parameters for applications sageERP, and sageCRM by using the following URL:
http://myserver?APPL=sageERP&APPL=sageCRM&sageERP_DATASET=SAMINC& sageCRM_DATASET=myCompany
In the above example the application sageERP has one parameter namely DATASET whose value is SAMINC, and the application sageCRM has one parameter namely DATASET whose value is myCompany.
Note: When the parameters are referenced or enumerated for each application the are not prefixed by there application name. So if the parameters are enumerated for sageERP the values returned would be DATASET=SAMINC.
Field Summary | |
---|---|
static java.lang.String |
SAGEERP_APP
|
Method Summary | |
---|---|
static java.lang.String |
buildSageERPURL(java.lang.String urlPath,
java.util.Map<java.lang.String,java.lang.String> parameters)
Builds a URL that includes the specified path, a special parameter indicating that the application name for parameters will have a SAGEERP prefix, and parameters relating to the SAGEERP application. |
static java.lang.String |
buildURL(java.lang.String urlPath,
java.lang.String appName,
java.util.Map<java.lang.String,java.lang.String> parameters)
Builds a URL that includes the specified path, a special parameter indicating the application name, and parameters relating to that application. |
static java.lang.String |
get(java.lang.String applicationName,
java.lang.String parameterName)
This method returns a parameter for a given application and parameter name. |
static java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> |
getAllParameters(java.lang.String application)
This method performs a case insensitive lookup for the parameters for a given application. |
static java.util.List<java.lang.String> |
getApplications()
This method returns a list of applications that there are parameters for. |
static java.lang.String |
getDebugName()
Class debug name. |
static boolean |
getKeepSessionAlive()
Returns true if the KEEPSESSIONALIVE_PARAMETER is set to "true" or "yes". |
static java.lang.String |
getQueryString()
This method returns the application specific parameter query string. |
static java.lang.String |
getQueryString(java.lang.String applicationName)
This method returns a query string for a specific application. |
static java.lang.String |
getSageERPDataset()
Gets the DATASET for the Sage ERP application, or null if that dataset has not been set yet. |
static java.lang.String |
getSageERPLanguage()
Gets the LANGUAGE for the Sage ERP application, or null if that has not been set yet. |
static java.util.Date |
getSageERPSessionDate()
Gets the session date for the Sage ERP application, or null if that date has not been set yet. |
static java.lang.String |
getSwtServicesDataset()
Gets the DATASET for the SWT Services application, or null if that dataset has not been set yet. |
static java.util.List<java.lang.String> |
getValues(java.lang.String applicationName,
java.lang.String parameterName)
This method returns a list of parameter values for a given application and parameter name. |
static boolean |
isKeepSessionAliveSet()
Returns whether or not the KEEPSESSIONALIVE parameter for the Sage ERP application has been specified. |
static boolean |
isSageERPDatasetSet()
Returns whether or not the DATASET for the Sage ERP application has been specified. |
static boolean |
isSageERPLanguageSet()
Returns whether or not the LANGUAGE parameter for the Sage ERP application has been specified. |
static boolean |
isSageERPSessionDateSet()
Returns whether or not the Sage ERP application's Session Date has been set. |
static boolean |
isSwtServicesDatasetSet()
Returns whether or not the DATASET for the Sage ERP application has been specified. |
static void |
setKeepSessionAlive(boolean keepSessionAlive)
Sets the keep session alive parameter. |
static void |
setSageERPDataset(java.lang.String dataset)
Set the DATASET parameter for the Sage ERP application. |
static void |
setSageERPLanguage(java.lang.String language)
Set the LANGUAGE parameter for the Sage ERP application. |
static void |
setSageERPSessionDate(java.util.Date sessionDate)
Set the session date parameter for the Sage ERP application. |
static void |
setSwtServicesDataset(java.lang.String dataset)
Set the DATASET parameter for the SWT Services application. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SAGEERP_APP
Method Detail |
---|
public static java.lang.String getDebugName()
public static java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> getAllParameters(java.lang.String application)
For example: getApplicationsParameters("sageERP") would return all of the application parameters specified for sageERP.
application
- name to look up the parameters for. The look up is case
insensitive.
public static java.lang.String get(java.lang.String applicationName, java.lang.String parameterName)
applicationName
- for example "sageERP"parameterName
- for example "DATASET"
public static java.util.List<java.lang.String> getValues(java.lang.String applicationName, java.lang.String parameterName)
applicationName
- for example "sageERP"parameterName
- for example "DATASET"
public static java.util.List<java.lang.String> getApplications()
public static java.lang.String getQueryString()
For example:
&APPL=SAGEERP&APPL=SAGECRM&SAGEERP_DATASET=SAMINC&SAGEERP_SESSIONDATE= 2000-12-31&SAGECRM_DATASET=SAGE
public static java.lang.String getQueryString(java.lang.String applicationName)
For example:
&APPL=SAGEERP&SAGEERP_DATASET=SAMINC&SAGEERP_SESSIONDATE=2000-12-31
applicationName
- the application name for example SAGEERP
public static java.lang.String getSageERPDataset()
public static void setSageERPDataset(java.lang.String dataset)
dataset
- The DATASET parameter for the Sage ERP application.public static java.lang.String getSageERPLanguage()
public static void setSageERPLanguage(java.lang.String language)
language
- The LANGUAGE parameter for the Sage ERP application.public static boolean isSageERPLanguageSet()
public static boolean isKeepSessionAliveSet()
public static boolean getKeepSessionAlive()
public static void setKeepSessionAlive(boolean keepSessionAlive)
keepSessionAlive
- public static boolean isSageERPDatasetSet()
public static java.util.Date getSageERPSessionDate()
public static void setSageERPSessionDate(java.util.Date sessionDate)
sessionDate
- The session date parameter for the Sage ERP application.public static boolean isSageERPSessionDateSet()
public static java.lang.String getSwtServicesDataset()
public static void setSwtServicesDataset(java.lang.String dataset)
dataset
- The DATASET parameter for the SWT Services application.public static boolean isSwtServicesDatasetSet()
public static java.lang.String buildSageERPURL(java.lang.String urlPath, java.util.Map<java.lang.String,java.lang.String> parameters)
urlPath
- The path portion of the URL, which does not include any
parameters and which is not encoded.parameters
- An optional map of parameters, keyed by their non-prefixed names
(in other words, those names do not include "SAGEERP_"), and
whose values are not encoded.
public static java.lang.String buildURL(java.lang.String urlPath, java.lang.String appName, java.util.Map<java.lang.String,java.lang.String> parameters)
urlPath
- The path portion of the URL, which does not include any
parameters and which is not encoded.appName
- The application name that will be the prefix for the parameter
names (for example, "SAGEERP").parameters
- An optional map of parameters, keyed by their non-prefixed names
(in other words, those names do not include "[appName]_"), and
whose values are not encoded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |