com.astroshare.astroonline.soap
Class ClientDaily

java.lang.Object
  extended by com.astroshare.astroonline.soap.ClientDaily
Direct Known Subclasses:
ClientMonthly, ClientWeekly

public class ClientDaily
extends java.lang.Object

Gets daily horoscope from Astro Share soap server.

The daily horoscopes are automatically cached with it's current date. The date of the client machine is used to determine the date for the daily horoscopes.

Daily horoscopes can only be used with a proper license. The Astro Share soap server checks access based on the server's ip address. If the ip addess is not authorized, an access denied is returned.


Field Summary
protected  java.lang.String horoscopeType
           
protected static org.apache.log4j.Logger log
          init logging
protected  java.lang.String pageTitle
           
protected  java.lang.String soapMethod
           
 
Constructor Summary
ClientDaily()
           
 
Method Summary
 java.lang.String convertDateToString(java.lang.String language, java.lang.String dateString)
           Convert date to title string (shown on horoscope page).
 java.lang.String getDateString(int n)
           Convert date to string (YYYYMMDD).
 java.util.HashMap<java.lang.String,java.lang.Object> getHoroscopes(java.lang.String language, java.lang.String dateString)
           Get horoscope for specific language and date and cache in hashmap.
protected  java.lang.String getId(java.lang.String language, java.lang.String dateString)
           Create unique ID to save in and retrieve from hashmap.
 java.lang.String getPageTitle(java.lang.String language, int sign)
           Gives the title displayed on the horoscope page.
 java.lang.String getText(java.lang.String language, int sign, java.lang.String dateString)
           Get horoscope text shown on horoscope page.
 java.lang.String getTitle(java.lang.String language, java.lang.String dateString)
           Get horoscope title shown on horoscope page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
init logging


soapMethod

protected java.lang.String soapMethod

pageTitle

protected java.lang.String pageTitle

horoscopeType

protected java.lang.String horoscopeType
Constructor Detail

ClientDaily

public ClientDaily()
Method Detail

getId

protected java.lang.String getId(java.lang.String language,
                                 java.lang.String dateString)

Create unique ID to save in and retrieve from hashmap.

Parameters:
language - Language
dateString - Date (in string format)
Returns:
Unique ID

convertDateToString

public java.lang.String convertDateToString(java.lang.String language,
                                            java.lang.String dateString)

Convert date to title string (shown on horoscope page).

Parameters:
language - Language
dateString - Date (in string format)
Returns:
Given date converted to string

getDateString

public java.lang.String getDateString(int n)

Convert date to string (YYYYMMDD).

Parameters:
n - Number of days from now (can also be negative)
Returns:
Date(today + n) in string format

getText

public java.lang.String getText(java.lang.String language,
                                int sign,
                                java.lang.String dateString)

Get horoscope text shown on horoscope page.

Parameters:
language - Language
sign - Signnumber (1<=signNumber<=12)
dateString - Date (in string format)
Returns:
Horoscope text

getTitle

public java.lang.String getTitle(java.lang.String language,
                                 java.lang.String dateString)

Get horoscope title shown on horoscope page.

Parameters:
language - Language
dateString - Date (in string format)
Returns:
Horoscope title

getPageTitle

public java.lang.String getPageTitle(java.lang.String language,
                                     int sign)

Gives the title displayed on the horoscope page.

Returns:
Page title

getHoroscopes

public java.util.HashMap<java.lang.String,java.lang.Object> getHoroscopes(java.lang.String language,
                                                                          java.lang.String dateString)

Get horoscope for specific language and date and cache in hashmap.

Parameters:
language - Language
dateString - Date (in string format)
Returns:
Hashmap holding horoscopes for a specific language and date


Astro-Online © 2001 − 2008 Astro Share
Documentation generated on: Thursday August 12th 2008 (PS)