public class CatalogDataLoadHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The IBM copyright field.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
fixURLKeyword(java.lang.String originalURLKeyword)
This method help to fix the special characters from the original URL keyword.
|
static java.lang.String |
generateSEODefaultKeyword(java.lang.String name)
Generates the default keyword for a catalog group.
|
static java.lang.String |
generateSEODefaultKeyword(java.lang.String name,
java.lang.String partNumber)
Generates the default keyword for a catalog entry.
|
static java.lang.String |
generateSEODefaultKeywordWithLanguageId(java.lang.String urlKeyword,
java.lang.String languageId)
Generates URL keyword with language id as suffix.
|
static java.lang.String |
getParameterizedString(java.lang.String string,
java.lang.String[] parameter)
Answers a string with each "{n}" substituted with actual text from the parameter array.
|
static java.util.ArrayList<java.lang.Integer> |
getRelatedCatalogStoreId(java.lang.Integer storeId)
Gets the list of related catalog store IDs of the specified store
|
static java.util.ArrayList<java.lang.Integer> |
getRelatedShippingCalculationStoreId(java.lang.Integer storeId)
Gets the list of related shipping calculation store IDs of the specified store
|
static java.lang.Long |
getStoreOwnerId(java.lang.Integer storeId)
Gets the owner ID of the specified store
|
static com.ibm.commerce.foundation.internal.server.services.registry.StoreObject[] |
getStorePath(java.lang.Integer storeId,
java.lang.String storeRelationshipType)
Returns the related stores of a given type of a given store.
|
static boolean |
isSearchEnabled(java.lang.Integer storeId)
Checks whether Search is enabled for a store.
|
static boolean |
isSEOURLPatternFeatureEnabled(java.lang.Integer storeId)
Checks whether SEO is enabled for the store.
|
static void |
parseSEOLoadingParameters()
This method parse the component configuration file to get SEO loading parameters.
|
static TableDataObject |
populateTI_CATENTRY_WS(java.lang.String masterCatalogId,
java.lang.String catentryId,
java.lang.String action,
java.lang.String taskGroup)
Populates the table TI_DELTA_CATENTRY for the search index rebuild.
|
static TableDataObject |
populateTI_CATGROUP_WS(java.lang.String masterCatalogId,
java.lang.String catgroupId,
java.lang.String action,
java.lang.String taskGroup)
Populates the table TI_DELTA_CATGROUP for the search index rebuild.
|
static TableDataObject |
populateTI_DELTA_CATENTRY(java.lang.String masterCatalogId,
java.lang.String catentryId,
java.lang.String action)
Populates the table TI_DELTA_CATENTRY for the search index rebuild.
|
static TableDataObject |
populateTI_DELTA_CATGROUP(java.lang.String masterCatalogId,
java.lang.String catgroupId,
java.lang.String action)
Populates the table TI_DELTA_CATGROUP for the search index rebuild.
|
static java.lang.String |
prunedString(java.lang.String string,
int maxUtf8Length)
Gets a string pruned to length bytes.
|
static java.lang.String |
resolveIdentifierByStoreID(java.lang.String storeId)
Resolves the identifier (IDENTIFIER column of STOREENT table) according to store id (STOREENT_ID column of STOREENT table).
|
static java.lang.String |
resolveOwnerIDByStoreID(java.lang.String storeId)
Resolves the owner id (MEMBER_ID column of STOREENT table) according to store id (STOREENT_ID column of STOREENT table).
|
static java.lang.String |
resolveOwnerIDByStoreIdentifier(java.lang.String storeIdentifier)
Resolves the owner id (MEMBER_ID column of STOREENT table) according to store identifier (IDENTIFIER column of STOREENT table).
|
static java.lang.String |
resolveOwnerIDByStoreIdentifierType(StoreIdentifierType storeIdentifierType)
Resolves the owner id (MEMBER_ID column of STOREENT table) according to store identifier noun part (StoreIdentifierType).
|
static java.lang.Object |
resolveParametersFromMap(java.util.Map map,
java.lang.Object key,
java.lang.Object defaultValue)
This method retrieves value from map.
|
static java.lang.Integer |
resolveStoreIDByStoreIdentifier(java.lang.String storeIdentifier)
Resolves the store id (STOREENT_ID column of STOREENT table) according to store identifier (IDENTIFIER column of STOREENT table).
|
static java.lang.Integer |
resolveStoreIDByStoreIdentifierType(StoreIdentifierType storeIdentifierType)
Resolves the store id (STOREENT_ID column of STOREENT table) according to store identifier noun part (StoreIdentifierType).
|
static void |
validateURLKeyword(java.lang.String inputURL)
Validate that the URL keyword does not contain illegal characters.
|
public static final java.lang.String COPYRIGHT
public static java.lang.Integer resolveStoreIDByStoreIdentifier(java.lang.String storeIdentifier)
storeIdentifier
- the store identifierpublic static java.lang.Integer resolveStoreIDByStoreIdentifierType(StoreIdentifierType storeIdentifierType) throws DataLoadApplicationException
storeIdentifierType
- the store identifier typeDataLoadApplicationException
- An application exception will be thrown if there was a problem resolving the store id.public static java.lang.String resolveOwnerIDByStoreIdentifier(java.lang.String storeIdentifier) throws DataLoadApplicationException
storeIdentifier
- the store identifierDataLoadApplicationException
- an application exception will be thrown if the store identifier can not be found.public static java.lang.String resolveOwnerIDByStoreID(java.lang.String storeId)
storeId
- the store idpublic static java.lang.String resolveOwnerIDByStoreIdentifierType(StoreIdentifierType storeIdentifierType) throws DataLoadApplicationException
storeIdentifierType
- the store identifier typeDataLoadApplicationException
- an application exception will be thrown if the store identifier can not be found.public static java.lang.String resolveIdentifierByStoreID(java.lang.String storeId)
storeId
- the store idpublic static com.ibm.commerce.foundation.internal.server.services.registry.StoreObject[] getStorePath(java.lang.Integer storeId, java.lang.String storeRelationshipType)
storeId
- the store ID.storeRelationshipType
- the store relationship type.public static java.lang.String getParameterizedString(java.lang.String string, java.lang.String[] parameter)
string
- the string containing "{n}" to be text substitutedparameter
- the array of parameter text stringpublic static java.lang.String prunedString(java.lang.String string, int maxUtf8Length)
string
- The string to be pruned.maxUtf8Length
- The byte length to prune to. It is usually the size of database column.public static java.lang.Object resolveParametersFromMap(java.util.Map map, java.lang.Object key, java.lang.Object defaultValue)
map
- key
- defaultValue
- public static boolean isSearchEnabled(java.lang.Integer storeId) throws java.lang.Exception
storeId
- the store idtrue
: Search is enabled.false
: Search is disabled or not enabled.java.lang.Exception
public static TableDataObject populateTI_DELTA_CATGROUP(java.lang.String masterCatalogId, java.lang.String catgroupId, java.lang.String action) throws java.lang.Exception
masterCatalogId
- a master catalog ID.catgroupId
- a catalog group ID.action
- an indexing action.java.lang.Exception
public static TableDataObject populateTI_CATGROUP_WS(java.lang.String masterCatalogId, java.lang.String catgroupId, java.lang.String action, java.lang.String taskGroup) throws java.lang.Exception
masterCatalogId
- a master catalog ID.catgroupId
- a catalog group ID.action
- an indexing action.taskGroup
- a task group identifier.java.lang.Exception
public static TableDataObject populateTI_DELTA_CATENTRY(java.lang.String masterCatalogId, java.lang.String catentryId, java.lang.String action) throws java.lang.Exception
masterCatalogId
- a master catalog ID.catentryId
- a catalog entry ID.action
- an indexing action.java.lang.Exception
public static TableDataObject populateTI_CATENTRY_WS(java.lang.String masterCatalogId, java.lang.String catentryId, java.lang.String action, java.lang.String taskGroup) throws java.lang.Exception
masterCatalogId
- a master catalog ID.catentryId
- a catalog entry ID.action
- an indexing action.taskGroup
- a task group identifier.java.lang.Exception
public static void parseSEOLoadingParameters() throws java.lang.Exception
java.lang.Exception
public static boolean isSEOURLPatternFeatureEnabled(java.lang.Integer storeId) throws java.lang.Exception
storeId
- the store idtrue
: SEO is enabled.false
: SEO is disabled or not enabled.java.lang.Exception
public static void validateURLKeyword(java.lang.String inputURL) throws java.lang.Exception
inputURL
- The URL to validate.java.lang.Exception
public static java.lang.String fixURLKeyword(java.lang.String originalURLKeyword) throws java.lang.Exception
originalURLKeyword
- The string input the original URL keyword.java.lang.Exception
- exceptionpublic static java.lang.String generateSEODefaultKeyword(java.lang.String name) throws java.lang.Exception
name
- The catalog group namejava.lang.Exception
public static java.lang.String generateSEODefaultKeyword(java.lang.String name, java.lang.String partNumber) throws java.lang.Exception
name
- The catalog entry namepartNumber
- The catalog entry part numberjava.lang.Exception
public static java.lang.String generateSEODefaultKeywordWithLanguageId(java.lang.String urlKeyword, java.lang.String languageId) throws java.lang.Exception
urlKeyword
- The existing URL keywordlanguageId
- The language idjava.lang.Exception
- Exception is thrown when there is problem invoke the generateSEODefaultKeywordWithLanguageId methodpublic static java.lang.Long getStoreOwnerId(java.lang.Integer storeId) throws DataLoadException
storeId
- The store IDDataLoadException
- DataLoad exception capturedpublic static java.util.ArrayList<java.lang.Integer> getRelatedCatalogStoreId(java.lang.Integer storeId) throws DataLoadException
storeId
- The store IDDataLoadException
- DataLoad exception capturedpublic static java.util.ArrayList<java.lang.Integer> getRelatedShippingCalculationStoreId(java.lang.Integer storeId) throws DataLoadException
storeId
- The store IDDataLoadException
- DataLoad exception captured