public class GiftCenterComponentHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Long | addAddressUsingSQL(ContactInfoType contactInfoType)
Inserts a record into the GRADDR table using the values from logical ContactInfoType type.
|
static java.lang.String | buildErrorKeyForRuleValidationError(java.lang.String primaryErrorKey, com.ibm.commerce.giftcenter.facade.datatypes.GiftListType giftList, java.lang.Integer ruleName)
This method constructs the error key to be returned to the client when the rule validation check fails for a gift list.
|
static void | clearUsersDefaultWishList(java.lang.String userId)
Sets a user"s default wish list to active.
|
static CommandContext | createCommandContext()
Creates a clone of the command context associated with the current activity token.
|
static java.util.List | executeSelectStatement(java.lang.String query, java.util.Map parameters)
Executes a select query
|
static java.lang.String | generateSearchKeyFirstName(java.lang.String firstName, java.lang.Object... parameters)
Generates the SOUNDEX value for an ASCII input as the search key value in case of DB2 and Oracle databases.
|
static java.lang.String | generateSearchKeyLastName(java.lang.String lastName, java.lang.Object... parameters)
Generates the SOUNDEX value for an ASCII input as the search key value in case of DB2 and Oracle databases.
|
protected static java.lang.Long | generateUniqueAddressKey()
Generates the primary key for the new entry in the GRADDR table
|
static CatalogEntryType | getCatalogEntry(CatalogEntryIdentifierType catalogEntryIdentifier)
Fetches the catalog entry details based on the catalog entry identifier passed.
|
static java.lang.Object[] | getControlParamValues(ActionExpression actionExpression, java.lang.String paramName)
Returns the control parameter values for parameter name present in the action expression
|
static java.sql.Date | getDate(java.lang.Object inputDate)
This method formats the date present in logic gift list noun part into java.sql.Date.
|
static int | getEventIdforAnEventName(java.lang.String eventName, java.lang.String storeId)
Returns the event_id corresponding to a event name and store identifiers from the gift list event table.
|
static java.lang.String | getEventTypeName(java.lang.Integer eventId)
Returns the gift list event type name for a particular event id
|
static java.lang.String | getExternalIdentifer(com.ibm.commerce.foundation.common.datatypes.GiftListIdentifierType giftListIdentifier)
Retrieves the external identifier for the gift list.
|
static PhysicalDataContainer | getGiftList(java.lang.Long giftListID)
Fetches the PhysicalDataContainer based on UniqueID.
|
static com.ibm.commerce.giftcenter.facade.server.helpers.GiftListAddressValidator | getGiftListAddressValidator()
Gets the instance of the GiftListAddressValidator which is used for perform address field validation of the various address noun parts in the gift list noun.
|
static com.ibm.commerce.giftcenter.facade.server.entity.datatypes.Grgftreg | getGiftListByExternalId(java.lang.String externalId)
Retrieves the physical gift list object based on the external identifier.
|
static GiftListContextUpdateCmd | getGiftListContextUpdateCmd()
Gets the instance of GiftListContextUpdateCmd which is used for performing context updates.
|
static GiftListEncryptionHelper | getGiftListEncryptionHelper()
Gets the instance of the GiftListEncryptionHelper which is used for performing encryption in GRUSERAUTH tables.
|
static java.lang.String | getGiftListOwner(java.lang.String uniqueID)
Returns the owner of the gift list.
|
static PhysicalDataContainer | getGiftListRegistrants(java.lang.Long giftListID)
Fetches the PhysicalDataContainer based on UniqueID.
|
static java.lang.String | getGuestAccessPassword(java.lang.String giftListUniqueId)
Returns the guest access password for a registry which requires password for a gift giver.
|
static JDBCQueryService | getJDBCQueryService()
Gets the JDBC query service instance.
|
static java.lang.Integer | getLanguageId()
Returns the languageId from the service context
|
static java.util.Map<java.lang.String,java.lang.Long> | getRegistrantsAddresses(java.lang.Long giftListUniqueID)
Returns the registrant"s addressId and co-registrant"s addressId for a given gift list.
|
static java.lang.Long | getRunAsId()
Gets the runAsId from the service context
|
static java.lang.Integer | getStoreId()
Gets the storeId from the service context
|
static com.ibm.commerce.giftcenter.facade.datatypes.GiftListType | populateAccessKeys(com.ibm.commerce.giftcenter.facade.datatypes.GiftListType giftListType)
Generates and set access keys to the input GiftListType object.
|
static com.ibm.commerce.giftcenter.facade.datatypes.GiftListType | populateExternalId(com.ibm.commerce.giftcenter.facade.datatypes.GiftListType giftListType)
Generates the external identifier for an input GiftListType object.
|
static void | resolveGiftListRegistrant(com.ibm.commerce.giftcenter.facade.datatypes.GiftListType giftList, com.ibm.commerce.giftcenter.facade.datatypes.GiftListRegistrantType giftListRegistrant)
Resolves the gift list registrant noun part based on the registrantID or GiftList uniqueID or GifList ExternalId
|
static void | resolveNoun(com.ibm.commerce.giftcenter.facade.datatypes.GiftListType giftList)
Resolves the gift list noun based on the unique ID or the external ID.
|
static void | setNewDefaultWishList(java.lang.String userId)
Sets a user"s active wish list to be the default wish list.
|
static void | updateGiftList(java.lang.Long giftListID)
Updates the lastUpdate property of a gift list.
|
static boolean | useOneWayHashEncryptionForGuestAccessPassword()
Returns a boolean flag to indicate whether one way hash encryption should be used for manage access passwords.
|
static boolean | useOneWayHashEncryptionForManageAccessPassword()
Returns a boolean flag to indicate whether one way hash encryption should be used for manage access passwords.
|
static void | validateCatalogEntry(CatalogEntryIdentifierType catalogEntryIdentifier)
Validates the catalog entry identifier by resolving it.
|
public static java.lang.Integer getStoreId() throws AbstractApplicationException
public static java.lang.Long getRunAsId() throws AbstractApplicationException
public static java.lang.Integer getLanguageId() throws AbstractApplicationException
public static com.ibm.commerce.giftcenter.facade.datatypes.GiftListType populateAccessKeys(com.ibm.commerce.giftcenter.facade.datatypes.GiftListType giftListType) throws AbstractApplicationException
public static com.ibm.commerce.giftcenter.facade.datatypes.GiftListType populateExternalId(com.ibm.commerce.giftcenter.facade.datatypes.GiftListType giftListType) throws AbstractApplicationException
public static int getEventIdforAnEventName(java.lang.String eventName, java.lang.String storeId) throws AbstractApplicationException
public static java.util.List executeSelectStatement(java.lang.String query, java.util.Map parameters) throws java.lang.Exception
public static java.lang.String generateSearchKeyFirstName(java.lang.String firstName, java.lang.Object... parameters) throws AbstractApplicationException
public static java.lang.String generateSearchKeyLastName(java.lang.String lastName, java.lang.Object... parameters) throws AbstractApplicationException
public static JDBCQueryService getJDBCQueryService()
public static void validateCatalogEntry(CatalogEntryIdentifierType catalogEntryIdentifier) throws AbstractApplicationException
public static CatalogEntryType getCatalogEntry(CatalogEntryIdentifierType catalogEntryIdentifier) throws AbstractApplicationException
public static void resolveNoun(com.ibm.commerce.giftcenter.facade.datatypes.GiftListType giftList) throws AbstractApplicationException
public static void resolveGiftListRegistrant(com.ibm.commerce.giftcenter.facade.datatypes.GiftListType giftList, com.ibm.commerce.giftcenter.facade.datatypes.GiftListRegistrantType giftListRegistrant) throws AbstractApplicationException
public static void updateGiftList(java.lang.Long giftListID) throws AbstractApplicationException
public static PhysicalDataContainer getGiftList(java.lang.Long giftListID) throws AbstractApplicationException
public static java.lang.String getExternalIdentifer(com.ibm.commerce.foundation.common.datatypes.GiftListIdentifierType giftListIdentifier) throws AbstractApplicationException
public static PhysicalDataContainer getGiftListRegistrants(java.lang.Long giftListID) throws AbstractApplicationException
public static java.util.Map<java.lang.String,java.lang.Long> getRegistrantsAddresses(java.lang.Long giftListUniqueID) throws AbstractApplicationException
public static void setNewDefaultWishList(java.lang.String userId) throws DataMediatorException
public static void clearUsersDefaultWishList(java.lang.String userId) throws DataMediatorException
public static GiftListEncryptionHelper getGiftListEncryptionHelper()
public static GiftListContextUpdateCmd getGiftListContextUpdateCmd()
public static boolean useOneWayHashEncryptionForManageAccessPassword()
public static boolean useOneWayHashEncryptionForGuestAccessPassword()
public static java.lang.String getGiftListOwner(java.lang.String uniqueID) throws AbstractApplicationException
public static CommandContext createCommandContext()
public static java.lang.Long addAddressUsingSQL(ContactInfoType contactInfoType) throws AbstractApplicationException
ContactInfoType contactInfo = CommerceFoundationFactory.eINSTANCE.createContactInfoType(); UserDataType userDataType = CommerceFoundationFactory.eINSTANCE.createUserDataType(); userDataType.getUserDataField().put("field1", "1001"); // Maps to GRADDR.FIELD1 INTEGER userDataType.getUserDataField().put("field2", "1002"); // Maps to GRADDR.FIELD2 INTEGER userDataType.getUserDataField().put("field3", "user data field 1"); // Maps to GRADDR.FIELD3 VARCHAR(64) userDataType.getUserDataField().put("field4", "user data field 2"); // Maps to GRADDR.FIELD4 VARCHAR(64) userDataType.getUserDataField().put("field5", "user data field 3"); // Maps to GRADDR.FIELD5 VARCHAR(64) contactInfo.setUserData(userDataType);
protected static java.lang.Long generateUniqueAddressKey() throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
public static java.lang.Object[] getControlParamValues(ActionExpression actionExpression, java.lang.String paramName)
public static java.lang.String getEventTypeName(java.lang.Integer eventId) throws AbstractApplicationException
public static java.sql.Date getDate(java.lang.Object inputDate)
public static java.lang.String getGuestAccessPassword(java.lang.String giftListUniqueId) throws AbstractApplicationException
public static com.ibm.commerce.giftcenter.facade.server.entity.datatypes.Grgftreg getGiftListByExternalId(java.lang.String externalId) throws AbstractApplicationException
public static java.lang.String buildErrorKeyForRuleValidationError(java.lang.String primaryErrorKey, com.ibm.commerce.giftcenter.facade.datatypes.GiftListType giftList, java.lang.Integer ruleName)
<primaryErrorKey>.<Event>.<ruleName>
public static com.ibm.commerce.giftcenter.facade.server.helpers.GiftListAddressValidator getGiftListAddressValidator()