com.astroshare.astroonline.core
Class InstalledHoroscopesList

java.lang.Object
  extended by com.astroshare.astroonline.core.InstalledHoroscopesList

public class InstalledHoroscopesList
extends java.lang.Object

Implementation of cache of installed Horoscopes.

For every installed horoscope a set of data items is saved in cache. Class InstalledHoroscope is used to identify the different items of an installed horoscope. These items are retrieved from the database through class Configuration and cached through class InstalledHoroscopesList.

See Also:
Configuration, InstalledHoroscope

Constructor Summary
InstalledHoroscopesList()
           
 
Method Summary
static boolean addHoroscope(java.lang.String id, java.lang.String type, java.lang.String language, java.lang.String dbid, java.lang.String title, java.lang.String input, java.lang.String output, java.lang.String intro)
           Add an installed horoscope to cache.
static void clearList()
           Clear cache of installed horoscope list.
static boolean findHoroscope(java.lang.String id, java.lang.String language)
           Check whether an installed horoscope is available in cache.
static InstalledHoroscope getHoroscope(java.lang.String id, java.lang.String language)
           Get installed horoscope from cache.
static java.util.ArrayList<java.lang.Object> getList()
           Get all cached installed horoscopes in an arraylist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstalledHoroscopesList

public InstalledHoroscopesList()
Method Detail

clearList

public static void clearList()

Clear cache of installed horoscope list.


addHoroscope

public static boolean addHoroscope(java.lang.String id,
                                   java.lang.String type,
                                   java.lang.String language,
                                   java.lang.String dbid,
                                   java.lang.String title,
                                   java.lang.String input,
                                   java.lang.String output,
                                   java.lang.String intro)

Add an installed horoscope to cache.

Parameters:
id - Horoscope ID
type - Horoscope type
language - Horoscope language
dbid - Horoscope database ID
title - Horoscope title
input - Horoscope input template
output - Horoscope output template
intro - Horoscope intro text
Returns:
TRUE=horoscope added to cache;FALSE=horoscope not added to cache

findHoroscope

public static boolean findHoroscope(java.lang.String id,
                                    java.lang.String language)

Check whether an installed horoscope is available in cache.

Parameters:
id - Horoscope ID
Returns:
TRUE=horoscope isn cached; FALSE=horoscope not in cache

getHoroscope

public static InstalledHoroscope getHoroscope(java.lang.String id,
                                              java.lang.String language)

Get installed horoscope from cache.

Parameters:
id - Horoscope ID
Returns:
Horoscope or null on failure

getList

public static java.util.ArrayList<java.lang.Object> getList()

Get all cached installed horoscopes in an arraylist.

Returns:
All cache horoscopes in an arraylist


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