|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bsf.listOfValues.client.LovManager
Enables access to the LOV using the given LovService. Is usaully used as a cache between the server and the client.
LovValue
,
LOVService
,
LovListener
Field Summary | |
private static java.util.Hashtable |
_listOfValues
Holds the retrieved list of values (aLovOID, aList of LovValue). |
private static java.util.Hashtable |
_listOfValuesPerPK
Holds the retrieved list of values (aLovOID, (aLovValuePK, aList of LovValue)). |
private static java.util.Hashtable |
_lovListeners
Holds the listeners (LovOID, List of LovListeners). |
private static LOVService |
_lovService
|
static java.lang.Long |
ALL_LOVS
To specify that a listener is interested in all the lovs. |
private static int |
DEFAULT_HASH_TABLE_SIZE
|
Constructor Summary | |
LovManager()
|
Method Summary | |
static void |
addLovManagerListener(LovListener p_lovListener,
java.lang.Long p_lovOID)
Registers a LovListener for the given lovOID. |
static void |
clearLocalCache(java.lang.Long p_lovOID)
Removes the LOV, whose OID is the given oid, from the cache. |
static java.util.List |
getListOfValues(java.lang.Long p_lovOID)
Return the requested list of values, checking in its cache first. |
static java.util.List |
getListOfValues(LovListener p_lovListener,
java.lang.Long p_lovOID)
Return the requested list of values, checking in its cache first. |
protected static LOVService |
getLovService()
|
static LovValue |
getLovValue(java.lang.Long p_lovOID,
java.lang.Object p_lovValuePK)
Return the requested LovValue that belongs to the specified LOV. |
static LovValue |
getLovValue(LovListener p_lovListener,
java.lang.Long p_lovOID,
java.lang.Object p_lovValuePK)
Return the requested LovValue that belongs to the specified LOV. |
static void |
notifyLovListeners(java.lang.Long p_lovOID)
Notify all the listeners interested for the given lovOID. |
static void |
removeLovManagerListener(LovListener p_lovListener)
Removes the given LovListener from the registered listeners. |
static void |
resynchronizeLov(java.lang.Long p_lovOID)
Clears the server and client cache and notifies the registered listeners that the LOV has changed. |
static void |
setLovService(LOVService p_lovService)
Set the LovService to be used to access the LovServiceBean. |
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.Long ALL_LOVS
private static LOVService _lovService
private static final int DEFAULT_HASH_TABLE_SIZE
private static java.util.Hashtable _listOfValues
private static java.util.Hashtable _listOfValuesPerPK
private static java.util.Hashtable _lovListeners
Constructor Detail |
public LovManager()
Method Detail |
protected static LOVService getLovService()
setLovService(LOVService)
public static void setLovService(LOVService p_lovService)
p_lovService
- The LovService to use.
java.lang.IllegalArgumentException
- if the given LovService is null.public static java.util.List getListOfValues(java.lang.Long p_lovOID) throws NoSuchLovException, java.rmi.RemoteException
p_lovOID
- The OID of the desired list of values.
NoSuchLovException
- If the LOV
doesn't exist.
java.rmi.RemoteException
- If a communication problem occurs.
java.lang.IllegalArgumentException
- if the given LovOID is null.
java.lang.IllegalStateException
- if no LovService is registeredpublic static java.util.List getListOfValues(LovListener p_lovListener, java.lang.Long p_lovOID) throws NoSuchLovException, java.rmi.RemoteException
p_lovListener
- The lovListener to be notified if this requested
lov changes. Can be null (no effect on the listener list).p_lovOID
- The OID of the desired list of values.
NoSuchLovException
- If the LOV
doesn't exist.
java.rmi.RemoteException
- If a communication problem occurs.
java.lang.IllegalArgumentException
- if the given LovOID is null.
java.lang.IllegalStateException
- if no LovService is registeredpublic static LovValue getLovValue(java.lang.Long p_lovOID, java.lang.Object p_lovValuePK) throws NoSuchLovValueException, NoSuchLovException, java.rmi.RemoteException
p_lovOID
- The OID of the desired list of values.p_lovValuePK
- The PK of the LovValue (belonging to the LOV
whose oid is p_lovOID) desired.
NoSuchLovValueException
- if the
requested lov value doesn't exist.
NoSuchLovException
- if the LOV
doesn't exist.
java.rmi.RemoteException
- if a communication problem occurs.
java.lang.IllegalStateException
- if no LovService is registered.
java.lang.ClassCastException
- if the LOV contains anything else
than LovValue.public static LovValue getLovValue(LovListener p_lovListener, java.lang.Long p_lovOID, java.lang.Object p_lovValuePK) throws NoSuchLovValueException, NoSuchLovException, java.rmi.RemoteException
p_lovListener
- The listener to be notify is the requested LOV changes.
Can be null (no effect on the listeners list).p_lovOID
- The OID of the desired list of values.p_lovValuePK
- The OID of the LovValue (belonging to the LOV
whose oid is p_lovOID) desired.
NoSuchLovValueException
- if the
requested lov value doesn't exist.
NoSuchLovException
- if the LOV
doesn't exist.
java.rmi.RemoteException
- if a communication problem occurs.
java.lang.IllegalStateException
- if no LovService is registered.
java.lang.ClassCastException
- if the LOV contains anything else
than LovValue.public static void resynchronizeLov(java.lang.Long p_lovOID) throws NoSuchLovException, java.rmi.RemoteException
p_lovOID
- The OID of the Lov to synchronize with the server.
NoSuchLovException
- If no lov has the given OID.
java.rmi.RemoteException
- If a communication problem occurs.
java.lang.IllegalArgumentException
- if the given oid is null.
java.lang.IllegalStateException
- if no LovService has been set.LOVService
,
setLovService(LOVService)
public static void clearLocalCache(java.lang.Long p_lovOID)
p_lovOID
- The OID of the LOV to remove from the cache. Should not
be null.
java.lang.IllegalArgumentException
- if the given oid is null.public static void addLovManagerListener(LovListener p_lovListener, java.lang.Long p_lovOID)
p_lovListener
- The LovListener that we want to be notified.p_lovOID
- The OID of the LOV that the LovListener listens to, if
equals to ALL_LOVS can be used to specify that a listener is interested
by all the Lovs.public static void removeLovManagerListener(LovListener p_lovListener)
p_lovListener
- The LovListener that we want to remove.
java.lang.IllegalArgumentException
- if the LovListener is null.public static void notifyLovListeners(java.lang.Long p_lovOID)
p_lovOID
- The OID of the LOV of which we want to notify the
modificaiton.
java.lang.IllegalArgumentException
- if the given lovOID is null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |