public class GiftRegistryRuleRegistry extends java.lang.Object implements Registry
To enable the gift registry's rule registry caching, the following entry needs to be included in the WebSphere Commerce configuration XML file:
The WebSphere Commerce RegistryManager upon invocation will return a singleton of the GiftRegistryRuleRegistry.name="GiftRegistryRuleRegistry" regClassName="com.ibm.commerce.giftregistry.registry.GiftRegistryRuleRegistry" />
Modifier and Type | Class and Description |
---|---|
class |
GiftRegistryRuleRegistry.GiftRegistryRuleEntry
The inner class GiftRegistryRuleEntry contains the content of the cached initiative.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
GiftRegistryRuleRegistry()
Constructor for GiftRegistryRuleRegistry.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(GiftRegistryRuleAccessBean regEntry,
java.util.Hashtable aCacheHash,
GiftRegistryRuleRegistry.GiftRegistryRuleEntry grRuleEntry)
Adds GiftRegistryRuleEntry to the given cache.
|
java.lang.String |
createKey(GiftRegistryRuleAccessBean regEntry)
Creates a search key for the cache.
|
java.lang.String |
createKey(java.lang.Integer storeId,
java.lang.String eventTypeName,
java.lang.Integer name)
Creates a search key for the cache.
|
GiftRegistryRuleRegistry.GiftRegistryRuleEntry |
find(java.lang.Integer storeId,
java.lang.String eventTypeName,
java.lang.Integer name)
Finds a GiftRegistryRule object from the rule object.
|
java.lang.String |
getGrRuleVal(java.lang.Integer storeId,
java.lang.String eventTypeName,
java.lang.Integer name)
Returns the grRuleValue string associated with a business rule
|
void |
initialize()
Initializes the GiftRegistryRuleRegistry.
|
void |
refresh()
Refreshes the local cache of gift registry rule objects by retrieving them from
the database.
|
void |
removeAllElements()
Removes all GiftRegistryRuleEntries from the gift registry rules cache.
|
void |
removeElement(java.lang.Integer storeId,
java.lang.String eventTypeName,
java.lang.Integer name)
Removes a GiftRegistryRuleEntry from the local cache.
|
static GiftRegistryRuleRegistry |
singleton()
Returns a singleton Rule Registry object for IBM Gift Center
|
public static final java.lang.String COPYRIGHT
public GiftRegistryRuleRegistry()
public void initialize() throws java.lang.Exception
initialize
in interface Registry
java.lang.Exception
public void addElement(GiftRegistryRuleAccessBean regEntry, java.util.Hashtable aCacheHash, GiftRegistryRuleRegistry.GiftRegistryRuleEntry grRuleEntry) throws ECSystemException
regEntry
- the GiftRegistryRuleAccessBeanaCache
- the cache object to be usedgrRuleEntry
- GiftRegistryRuleEntryECSystemException
public void refresh() throws java.lang.Exception
public GiftRegistryRuleRegistry.GiftRegistryRuleEntry find(java.lang.Integer storeId, java.lang.String eventTypeName, java.lang.Integer name)
storeId
- store IDeventTypeName
- event type namename
- name of business rulepublic java.lang.String createKey(GiftRegistryRuleAccessBean regEntry) throws ECSystemException
regEntry
- the GiftRegistryRuleAccessBean to be cachedECSystemException
public java.lang.String createKey(java.lang.Integer storeId, java.lang.String eventTypeName, java.lang.Integer name)
storeId
- store IDeventTypeName
- event type namename
- name of business rulepublic void removeAllElements()
public void removeElement(java.lang.Integer storeId, java.lang.String eventTypeName, java.lang.Integer name)
storeId
- the store ID associated with the GiftRegistryRuleEntryeventTypeName
- the event type name associated with the GiftRegistryRuleEntryname
- the name associated with the GiftRegistryRuleEntrypublic static GiftRegistryRuleRegistry singleton()
public java.lang.String getGrRuleVal(java.lang.Integer storeId, java.lang.String eventTypeName, java.lang.Integer name)
storeId
- eventTypeName
- name
-