|
soap tutorial | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectadriani.jws.template.service.ServiceData
public class ServiceData
The container for all STATIC settings used by the business service logic (string values etc.).
Instantiation of this class should not be necessary since these methods are called only once, within a static
code block of the ServiceMacro
class, in order to retrieve all the static settings used by the
business logic. All these settings are stored into static attributes of this class, hence these parameters
are available without the need to instantiate this class.
Field Summary | |
---|---|
protected static java.lang.StringBuffer[] |
data_keys
List of the keywords used by this service (loaded from the property file). |
static int |
DELAY
Time (in milliseconds) used to sleep the HTTP-request thread when testing concurrent call. |
static boolean |
FAKE
If true the ServiceMacro will append two fake records to each call. |
protected static java.util.Hashtable<java.lang.String,java.lang.String> |
hash
List of the keywords used by this service (loaded from the property file). |
static boolean[] |
HEADER_CHECK
If true the ServiceLogic requires the some authentication check. |
static java.lang.String |
HEADER_VALUE
The value of the authentication parameter used to check the client request |
protected static java.lang.String |
leadingName
Beginning of each logging message for this class. |
Constructor Summary | |
---|---|
ServiceData()
|
Method Summary | |
---|---|
static boolean |
checkAuthentication(int method)
Accessor method. |
static boolean |
createKeywords(java.lang.String source)
Create a keywords.properties data file containing the list of all the necessary keywords. |
static boolean[] |
getBooleanTokens(java.lang.String string,
java.lang.String sep)
Tokenize the input string into an array of boolean, using the separator passed as input. |
static java.lang.StringBuffer[] |
getHardCodedValues()
Return an hard-coded list of all the necessary keywords. |
static java.util.Hashtable |
getHashtable()
Accessor method. |
static int[] |
getIntegerTokens(java.lang.String string,
java.lang.String sep)
Tokenize the input string into an array of integer, using the separator passed as input. |
static java.lang.StringBuffer[] |
getKeywords()
Deprecated. |
static boolean |
loadKeywords(java.lang.String source)
Load all the keywords from the keywords.properties file and store them into the
data_keys class attribute. |
static boolean |
loadLogicFlags()
Load the logical settings for the business logic from the template_config.properties file and
store them into this class attributes. |
static void |
printHashtable(java.util.Hashtable<java.lang.String,java.lang.String> hash)
Prints on the STDOUT the list of all the keywords loaded by this class. |
static boolean |
printKeywords()
Prints on the STDOUT the list of all the keywords loaded by this class. |
static boolean |
produceJavaFile()
Create a keywords.java data file containing the Java source definition of all the keywords. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.Hashtable<java.lang.String,java.lang.String> hash
protected static java.lang.StringBuffer[] data_keys
public static boolean FAKE
true
the ServiceMacro
will append two fake records to each call.
public static int DELAY
public static boolean[] HEADER_CHECK
true
the ServiceLogic
requires the some authentication check.
public static java.lang.String HEADER_VALUE
protected static java.lang.String leadingName
Constructor Detail |
---|
public ServiceData()
Method Detail |
---|
public static boolean loadLogicFlags()
template_config.properties
file and
store them into this class attributes. This method search such file in two different ways:template_config.properties
.adriani.jws.template.resources.template_config.properties
.
true
if all the logic flags have been loaded successfullypublic static boolean loadKeywords(java.lang.String source)
keywords.properties
file and store them into the
data_keys
class attribute. The actual name of the configuration file is defined by the
Settings.KEYWORDS
parameter.
source
- the name of the properties file (usually is "keywords.properties")
true
if the keywords have been successfully loaded from the properties filepublic static java.util.Hashtable getHashtable()
public static boolean checkAuthentication(int method)
public static java.lang.StringBuffer[] getKeywords()
public static boolean createKeywords(java.lang.String source)
keywords.properties
data file containing the list of all the necessary keywords.
The input source file can be specified running the SimpleClient
from the command line,
using the option -c file name
. If no path it's specified, the source file
will be searched in the current directory. Eventually it's possible to specify an absolute path,
for example: C:/Develop/name_list.txt
.
source
- the source file name
keywords.properties
has been produced successfullypublic static boolean produceJavaFile()
keywords.java
data file containing the Java source definition of all the keywords.
This method should be used only during development, when the properties file should be always available,
to produce the hard-coded list that will be retrieved by the getHardCodedValues()
method.
keywords.java
has been produced successfullygetHardCodedValues()
public static boolean printKeywords()
public static boolean[] getBooleanTokens(java.lang.String string, java.lang.String sep)
string
- the string containing all the tokens (e.g. "1, 2, 3")sep
- the tokens separator (e.g ",")
public static int[] getIntegerTokens(java.lang.String string, java.lang.String sep)
string
- the string containing all the tokens (e.g. "1, 2, 3")sep
- the tokens separator (e.g ",")
public static java.lang.StringBuffer[] getHardCodedValues()
StringBuffer
array containing all the required keywordsproduceJavaFile()
public static void printHashtable(java.util.Hashtable<java.lang.String,java.lang.String> hash)
hash
- an hash table, usually one of those produced by the loadKeywords()
method
|
Build 19/03/2014 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |