|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.astroshare.astroonline.horoscopes.Horoscope
public abstract class Horoscope
Implementation of Horoscope base class.
This class should be used by every class which implements an online horoscope. The content servlet calls specific methods from this base class. Therefor all sub classes must have the methods called from the content servlet and these methods should implement the necessary functionality to work properly.
To write a new online horoscope, create a subclass and implement the ncessary methods. Add your new online horoscope to the list of installed horoscopes and call your horoscope from by adding the appropriete arguments on the URL.
| Field Summary | |
|---|---|
protected java.util.HashMap<java.lang.String,java.lang.Object> |
args
arguments from URL converted to hashmap |
protected java.lang.String |
databaseID
horoscope database ID |
protected java.lang.String |
horoscopeID
horoscope ID |
protected java.lang.String |
language
horoscope language |
protected static org.apache.log4j.Logger |
log
init logging |
protected boolean |
startupMode
startup mode (Y/N) |
protected java.lang.String |
templateInput
name of the input template |
protected java.lang.String |
templateOutput
name of the output template |
| Constructor Summary | |
|---|---|
Horoscope()
|
|
| Method Summary | |
|---|---|
protected abstract boolean |
checkHoroscopeData()
Abstract method checkHoroscopeData must be implemented in every sub class. |
protected java.util.HashMap<java.lang.String,java.lang.Object> |
getFormText()
Get all form text converted to a hashmap. |
java.lang.String |
getHoroscope(java.util.HashMap<java.lang.String,java.lang.Object> params)
Function must be called directly from servlet. |
protected abstract void |
getHoroscopeArguments()
Abstract method getHoroscopeArguments must be implemented in every sub class. |
protected abstract java.util.HashMap<java.lang.String,java.lang.Object> |
getInputMap()
Abstract method getInputMap must be implemented in every sub class. |
protected java.lang.String |
getInputPage()
Implemented the implementation of the input page. |
protected java.util.HashMap<java.lang.String,java.lang.Object> |
getMap()
Get all horoscope data converted to a hashmap. |
protected abstract java.util.HashMap<java.lang.String,java.lang.Object> |
getOutputMap()
Abstract method getOutputMap must be implemented in every sub class. |
protected java.lang.String |
getOutputPage()
Implemented the implementation of the output page. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.log4j.Logger log
protected java.util.HashMap<java.lang.String,java.lang.Object> args
protected boolean startupMode
protected java.lang.String horoscopeID
protected java.lang.String databaseID
protected java.lang.String templateInput
protected java.lang.String templateOutput
protected java.lang.String language
| Constructor Detail |
|---|
public Horoscope()
| Method Detail |
|---|
public java.lang.String getHoroscope(java.util.HashMap<java.lang.String,java.lang.Object> params)
throws java.lang.Exception
Function must be called directly from servlet.
params - URL arguments
java.lang.Exception - Exception is thrown on errorsprotected abstract java.util.HashMap<java.lang.String,java.lang.Object> getInputMap()
Abstract method getInputMap must be implemented in every sub class. Must implement the argument recognition and saving of all variables which have to be processed in the input template.
protected java.lang.String getInputPage()
Implemented the implementation of the input page. The input page is returned as string.
protected abstract java.util.HashMap<java.lang.String,java.lang.Object> getOutputMap()
Abstract method getOutputMap must be implemented in every sub class. Must implement the argument recognition and saving of all variables which have to be processed in the output template.
protected java.lang.String getOutputPage()
Implemented the implementation of the output page. The output page is returned as string.
protected abstract void getHoroscopeArguments()
Abstract method getHoroscopeArguments must be implemented in every sub class. Must implement the argument recognition and saving.
protected abstract boolean checkHoroscopeData()
Abstract method checkHoroscopeData must be implemented in every sub class. Must implement the verification of the arguments.
protected java.util.HashMap<java.lang.String,java.lang.Object> getMap()
Get all horoscope data converted to a hashmap.
protected java.util.HashMap<java.lang.String,java.lang.Object> getFormText()
Get all form text converted to a hashmap.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Astro-Online © 2001 − 2008 Astro Share
Documentation generated on: Thursday August 12th 2008 (PS)