public final class GiftRegistryCmdHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME
Name of this class
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
GiftRegistryCmdHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
decrypt(java.lang.String value)
decrypts a given string.
|
static java.lang.String |
encrypt(java.lang.String value)
Encrypts a given string.
|
static GiftRegistryItemAccessBean |
findItem(GiftRegistryPurchaseRecordVO record)
Finds the gift item that is associated with a purchase record.
|
static GiftRegistryItemAccessBean |
findItem(java.lang.Long giftRegistryId,
GiftRegistryItemVO item)
Finds the item that exactly matches the given item value object.
|
static GiftRegistryItemAccessBean |
findItem(java.lang.Long giftRegistryId,
java.lang.String partNumber,
java.lang.String partAuxKey,
java.util.Collection personalizations)
This method finds an item access bean with the given giftRegistryId, part number, and part auxiliary key.
|
static java.lang.Long |
getGiftRegistryId(java.lang.String externalId)
Finds the gift registry id whose externalId is as given.
|
static com.ibm.commerce.component.giftregistry.commands.GenerateGiftRegistrySearchKeyValuesCmd |
getGiftRegistrySearchKeyValueGenerator(CommandContext context)
Gets an instance of
GenerateGiftRegistrySearchKeyValuesCmd 's
implementation, and assign the given command context to the command. |
static boolean |
isToAdd(GiftRegistryAddressVO vo,
BusinessObjectDocument bod)
Determines if an address value object to be created.
|
static boolean |
isToAdd(GiftRegistryPurchaseRecordVO record)
This is a helper method that is called when only the gift registry purchase record value object is available.
|
static boolean |
isToAdd(GiftRegistryVO giftRegistry) |
static boolean |
isToAdd(GiftRegistryVO giftRegistry,
GiftRegistryItemVO item)
This is a helper method that is called when only the gift registry value object and gift item is available.
|
static boolean |
isToAdd(java.lang.Long giftRegistryId,
GiftRegistryItemVO item)
Determines if a gift item is to be created into the database.
|
static void |
updateItemRequestQuantity(CommandContext context,
GiftRegistryItemVO item,
GiftRegistryItemAccessBean itemAB)
Updates the quantity of an item in database.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
public static final void updateItemRequestQuantity(CommandContext context, GiftRegistryItemVO item, GiftRegistryItemAccessBean itemAB) throws ECException
context
- the command context in which this method is calleditem
- item value object that has the new requested quantityitemAB
- the item access bean representing the item to be updated.ECException
- if a specified rule in the gift registry rule table is violated. The message
parameter of the exception message indicates which rule is violated.public static final GiftRegistryItemAccessBean findItem(java.lang.Long giftRegistryId, GiftRegistryItemVO item)
giftRegistryId
- the primary key of a gift registry that contains the given itemitem
- the item value object to be matchedpublic static final GiftRegistryItemAccessBean findItem(java.lang.Long giftRegistryId, java.lang.String partNumber, java.lang.String partAuxKey, java.util.Collection personalizations)
giftRegistryId
- the id of the gift registry that has the item to be foundpartNumber
- the partNumber of the item to be foundpartAuxKey
- the auxiliary key of the item to be foundpersonalizations
- the collection of personalizations of the item that is to be found.public static final GiftRegistryItemAccessBean findItem(GiftRegistryPurchaseRecordVO record)
record
- the record for which a gift item is to be searched.public static java.lang.Long getGiftRegistryId(java.lang.String externalId)
externalId
- the externalId of the gift registry whose giftRegistryId is to be foundpublic static boolean isToAdd(GiftRegistryAddressVO vo, BusinessObjectDocument bod)
vo
- the value object to be examinedbod
- the business object document that contains the value objectpublic static boolean isToAdd(GiftRegistryVO giftRegistry)
public static boolean isToAdd(java.lang.Long giftRegistryId, GiftRegistryItemVO item)
giftRegistryId
- the ID of the registry the gift item belongs toitem
- The gift item to be examinedpublic static boolean isToAdd(GiftRegistryVO giftRegistry, GiftRegistryItemVO item)
giftRegistryVO
- the value object of the gift registry that the gift item belongsitem
- The gift item to be examinedpublic static boolean isToAdd(GiftRegistryPurchaseRecordVO record)
record
- the value object of the gift registry purchase recordpublic static java.lang.String encrypt(java.lang.String value)
value
- the string to be encryptedpublic static java.lang.String decrypt(java.lang.String value)
value
- the string to be encryptedpublic static com.ibm.commerce.component.giftregistry.commands.GenerateGiftRegistrySearchKeyValuesCmd getGiftRegistrySearchKeyValueGenerator(CommandContext context) throws ECException
GenerateGiftRegistrySearchKeyValuesCmd
's
implementation, and assign the given command context to the command. The
instance is neither changed or executed. It is upto the user of the
returned command to set required parameters, and then execute the
command.context
- - The command context for the instance.GenerateGiftRegistrySearchKeyValuesCmd
for the given context and store identifier.ECException