public class MarketingHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The IBM copyright field.
|
Constructor and Description |
---|
MarketingHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
activateActivity(java.lang.String activityId)
This method activates a Marketing Activity.
|
static void |
addEMarketingSpotToActivity(java.lang.String activityId,
java.lang.String spotId)
This methods adds an e-Marketing Spot to the View E-Marketing Spot element in an activity.
|
static boolean |
checkForExistingMarketingContentDescription(java.lang.String contentId,
java.lang.Integer langId)
Checks if a Marketing Content Description already exists for the content's language.
|
static java.lang.String |
createEMarketingSpotNameForWidget(java.lang.String widgetIdentifier,
java.lang.String widgetId)
Returns the generated E-Marketing Spot name of a widget according to widget identifier and widget unique id.
|
static java.lang.String |
createMarketingContent(java.lang.String name,
java.lang.String text,
java.lang.String url,
java.lang.Integer storeId,
java.lang.Integer langId,
boolean displayable)
This method creates a new marketing content.
|
static void |
createMarketingContentDescription(java.lang.String contentId,
java.lang.String text,
java.lang.Integer langId)
This method creates a new Marketing Content Description for the specified content and language.
|
static java.lang.String |
createMarketingContentImageMapArea(java.lang.String contentId,
java.lang.Integer langId,
com.ibm.commerce.marketing.facade.datatypes.AreaShapeEnumerationType shape,
java.lang.String coordinates,
java.lang.String url,
java.lang.String title,
double sequence,
java.util.Map<java.lang.String,java.lang.String> otherProperties)
This method creates a new image map area for the specified marketing content.
|
static java.lang.String |
createMarketingContentNameForWidget(java.lang.String widgetId)
Returns the generated marketing content name for a widget according to widget identifier and widget unique id.
|
static java.lang.String |
createMarketingContentWithImageMap(java.lang.String name,
java.lang.Integer storeId,
java.lang.Integer langId,
boolean displayable)
This method creates a new marketing content with image map.
|
static java.lang.String |
createMarketingSpot(java.lang.String name,
java.lang.Integer storeId,
boolean displayable)
This method creates a new e-Marketing spot.
|
static java.lang.String |
createMarketingSpotDefaultContent(java.lang.String spotId,
java.lang.String contentType,
java.lang.String contentId,
java.lang.String sequence,
java.lang.Integer storeId)
This method creates a new marketing default content.
|
static java.lang.String |
createMarketingSpotDefaultTitle(java.lang.String spotId,
java.lang.String contentId,
java.lang.Integer storeId)
This method creates a new marketing default title.
|
static void |
deactivateActivity(java.lang.String activityId)
This method deactivates a Marketing Activity.
|
static void |
deleteActivity(java.util.List<java.lang.String> activityIdList)
This method deletes a list of existing marketing activities.
|
static void |
deleteAllMarketingContentForEspot(java.lang.String spotId)
This method deletes all MarketingContent associated with an Espot.
|
static void |
deleteMarketingContent(java.lang.String contentId)
This method deletes an existing marketing content.
|
static void |
deleteMarketingContentImageMapArea(java.lang.String contentId,
java.lang.String imageMapAreaId)
This method delete an existing image map area for the specified marketing content.
|
static void |
deleteMarketingSpot(java.util.List<java.lang.String> emspotIdList)
This method deletes a list of existing e-Marketing spots.
|
static void |
deleteMarketingSpot(java.lang.String emspotId)
This method deletes an existing e-Marketing spot.
|
static void |
deleteMarketingSpotDefaultContent(java.lang.String dmemspotdef_id,
java.lang.String spotId,
java.lang.String contentId,
java.lang.Integer storeId)
This method deletes marketing default content.
|
static java.util.List<ActivityType> |
getActivityForEMarketingSpot(java.lang.String spotId)
This methods gets the activities for a given e-marketing spot.
|
static java.lang.String |
getActivityForEMarketingSpotInAllRelatedStores(java.lang.String spotId,
java.lang.Integer storeId)
This methods gets the first found activity for an e-marketing spot.
|
static MarketingContentType |
getMarketingContent(java.lang.String contentId,
java.lang.Integer[] langIds)
This method returns the marketing content noun according to the specified content id.
|
static java.lang.String |
getMarketingContentText(java.lang.String contentId,
java.lang.String languageId)
This method returns the text of the marketing content according to the specified content id and language id.
|
static java.lang.String |
getMarketingSpotDefaultContent(java.lang.String spotId,
java.lang.Integer storeId)
This method returns the first default content id of a e-Marketing spot in the specified store.
|
static java.util.List<java.lang.String> |
getMarketingSpotDefaultContents(java.lang.String spotId,
java.lang.Integer storeId)
This method returns list of default content id of a e-Marketing spot in the specified store.
|
static java.lang.String |
getMarketingSpotDefaultTitle(java.lang.String spotId,
java.lang.Integer storeId)
This method returns the default title of the marketing spot in specified store.
|
static void |
removeActivityForEMarketingSpot(java.util.List<ActivityType> activities,
java.lang.String eSpotId)
This method will remove a list of activities from an e-Marketing spot.
|
static void |
removeEMarketingSpotFromActivity(java.lang.String activityId,
java.lang.String spotId)
This methods removes an e-Marketing Spot from the View E-Marketing Spot element in an activity.
|
static void |
updateMarketingContent(java.lang.String contentId,
java.lang.String text,
java.lang.String url,
java.lang.Integer langId)
This method updates an existing marketing content.
|
static java.lang.String |
updateMarketingContentImageMapArea(java.lang.String contentId,
java.lang.String imageMapAreaId,
java.lang.Integer langId,
com.ibm.commerce.marketing.facade.datatypes.AreaShapeEnumerationType shape,
java.lang.String coordinates,
java.lang.String url,
java.lang.String title,
double sequence,
java.util.Map<java.lang.String,java.lang.String> otherProperties)
This method updates an existing image map area for the specified marketing content.
|
static java.lang.String |
updateMarketingSpotDefaultContent(java.lang.String dmemspotdef_id,
java.lang.String spotId,
java.lang.String contentType,
java.lang.String contentId,
java.lang.String sequence,
java.lang.Integer storeId)
This method updates existing marketing default content.
|
public static final java.lang.String COPYRIGHT
public static java.lang.String createEMarketingSpotNameForWidget(java.lang.String widgetIdentifier, java.lang.String widgetId)
widgetIdentifier
- The identifier of the widgetwidgetId
- The unique id of the widgetpublic static java.lang.String createMarketingContentNameForWidget(java.lang.String widgetId)
widgetId
- The unique id of the widgetpublic static java.lang.String createMarketingSpot(java.lang.String name, java.lang.Integer storeId, boolean displayable) throws MarketingSpotException
name
- The name of the e-Marketing Spot to create.storeId
- The ID of the store in which to create the e-Marketing Spot.displayable
- True if this eMarketing Spot should be displayed in the Marketing tool. False otherwise.MarketingSpotException
public static void deleteMarketingSpot(java.lang.String emspotId) throws MarketingSpotException
emspotId
- The unique id of the e-Marketing Spot to delete.MarketingSpotException
public static void deleteMarketingSpot(java.util.List<java.lang.String> emspotIdList) throws MarketingSpotException
emspotIdList
- The list of unique id of the e-Marketing Spots to delete.MarketingSpotException
public static void activateActivity(java.lang.String activityId) throws ActivityException
activityId
- The activity Id.ActivityException
public static void deactivateActivity(java.lang.String activityId) throws ActivityException
activityId
- The activity Id.ActivityException
public static java.lang.String createMarketingContent(java.lang.String name, java.lang.String text, java.lang.String url, java.lang.Integer storeId, java.lang.Integer langId, boolean displayable) throws MarketingContentException
name
- The name of the marketing content to create.text
- The marketing content text.url
- The marketing content URL.storeId
- The ID of the store in which to create the marketing content.langId
- The ID of the language in which to create the marketing content description.displayable
- True if this Content should be displayed in the Marketing tool. False otherwise.MarketingContentException
public static void deleteMarketingContent(java.lang.String contentId) throws MarketingContentException
contentId
- The unique id of the marketing content to delete.MarketingContentException
public static java.lang.String createMarketingContentWithImageMap(java.lang.String name, java.lang.Integer storeId, java.lang.Integer langId, boolean displayable) throws MarketingContentException
name
- The name of the marketing content to create.storeId
- The ID of the store in which to create the marketing content.langId
- The ID of the language in which to create the marketing content description.displayable
- True if this Content should be displayed in the Marketing tool. False otherwise.MarketingContentException
public static java.lang.String createMarketingContentImageMapArea(java.lang.String contentId, java.lang.Integer langId, com.ibm.commerce.marketing.facade.datatypes.AreaShapeEnumerationType shape, java.lang.String coordinates, java.lang.String url, java.lang.String title, double sequence, java.util.Map<java.lang.String,java.lang.String> otherProperties) throws MarketingContentException
contentId
- The ID of the marketing content to update.langId
- The ID of the language in which to create the image map area.shape
- The shape of the image map area.coordinates
- The coordinates of the image map area.url
- The link of the image map area.title
- The title of the image map area.sequence
- The sequence of the image map area.otherProperties
- A map contain the name and value of other properties, like "target", "alt", "field1" to "field5".MarketingContentException
- Exception is thrown when there is problem calling Marketing service to create image map area.public static java.lang.String updateMarketingContentImageMapArea(java.lang.String contentId, java.lang.String imageMapAreaId, java.lang.Integer langId, com.ibm.commerce.marketing.facade.datatypes.AreaShapeEnumerationType shape, java.lang.String coordinates, java.lang.String url, java.lang.String title, double sequence, java.util.Map<java.lang.String,java.lang.String> otherProperties) throws MarketingContentException
contentId
- The ID of the marketing content to update.imageMapAreaId
- The unique id of the image map area to updatelangId
- The ID of the language in which to create the image map area.shape
- The shape of the image map area.coordinates
- The coordinates of the image map area.url
- The link of the image map area.title
- The title of the image map area.sequence
- The sequence of the image map area.otherProperties
- A map contain the name and value of other properties, like "target", "alt", "field1" to "field5".MarketingContentException
- Exception is thrown when there is problem calling Marketing service to create image map area.public static void deleteMarketingContentImageMapArea(java.lang.String contentId, java.lang.String imageMapAreaId) throws MarketingContentException
contentId
- The ID of the marketing content to update.imageMapAreaId
- The unique id of the image map area to delete.MarketingContentException
- Exception is thrown when there is problem calling Marketing service to delete image map area.public static void updateMarketingContent(java.lang.String contentId, java.lang.String text, java.lang.String url, java.lang.Integer langId) throws MarketingContentException
contentId
- The ID of the marketing content to update.text
- The marketing content text.url
- The marketing content URL.langId
- The ID of the language in which to update the marketing content description.MarketingContentException
public static java.lang.String createMarketingSpotDefaultContent(java.lang.String spotId, java.lang.String contentType, java.lang.String contentId, java.lang.String sequence, java.lang.Integer storeId) throws MarketingSpotException
spotId
- The ID of the e-Marketing Spot for which to assign the default content.contentType
- The type of the default content.contentId
- The ID of the content.sequence
- The sequence number of the content.storeId
- The ID of the store in which to associate the content.MarketingSpotException
- An error will be thrown if there was a problem creating the default marketing content.public static java.lang.String updateMarketingSpotDefaultContent(java.lang.String dmemspotdef_id, java.lang.String spotId, java.lang.String contentType, java.lang.String contentId, java.lang.String sequence, java.lang.Integer storeId) throws MarketingSpotException
dmemspotdef_id
- The unique ID of the default content to update. (DMEMSPOTDEF_ID)spotId
- The ID of the e-Marketing Spot for which to assign the default content.contentType
- The type of the default content.contentId
- The ID of the content.sequence
- The sequence number of the content.storeId
- The ID of the store in which to associate the content.MarketingSpotException
- An error will be thrown if there was a problem updating the default marketing content.public static void deleteMarketingSpotDefaultContent(java.lang.String dmemspotdef_id, java.lang.String spotId, java.lang.String contentId, java.lang.Integer storeId) throws MarketingSpotException
dmemspotdef_id
- The unique ID of the default content to update. (DMEMSPOTDEF_ID)spotId
- The ID of the e-Marketing Spot for which to assign the default content.contentId
- The ID of the content.storeId
- The ID of the store in which to associate the content.MarketingSpotException
- An error will be thrown if there was a problem deleting the default marketing content.public static java.lang.String createMarketingSpotDefaultTitle(java.lang.String spotId, java.lang.String contentId, java.lang.Integer storeId) throws MarketingSpotException
spotId
- The ID of the marketing spot for which to assign the default title.contentId
- The ID of the content to use as the title.storeId
- The ID of the store in which to associate the content as the title.MarketingSpotException
public static java.lang.String getMarketingSpotDefaultTitle(java.lang.String spotId, java.lang.Integer storeId)
spotId
- The unique id of the marketing spot.storeId
- The store id.public static java.util.List<java.lang.String> getMarketingSpotDefaultContents(java.lang.String spotId, java.lang.Integer storeId)
spotId
- The e-Marketing spot id.storeId
- The store id.public static java.lang.String getMarketingSpotDefaultContent(java.lang.String spotId, java.lang.Integer storeId)
spotId
- The e-Marketing spot id.storeId
- The store id.public static java.lang.String getMarketingContentText(java.lang.String contentId, java.lang.String languageId)
contentId
- The content id.languageId
- The language id.public static MarketingContentType getMarketingContent(java.lang.String contentId, java.lang.Integer[] langIds)
contentId
- The unique id of the content.langIds
- The requested language idspublic static void deleteActivity(java.util.List<java.lang.String> activityIdList) throws ActivityException
activityIdList
- The list of unique id of the marketing activities to delete.ActivityException
public static void deleteAllMarketingContentForEspot(java.lang.String spotId) throws MarketingContentException
spotId
- The unique id of the e-Marketing Spot to delete associated content from.MarketingContentException
public static void createMarketingContentDescription(java.lang.String contentId, java.lang.String text, java.lang.Integer langId) throws MarketingContentException
contentId
- The marketing content id.text
- The marketing content text.langId
- The ID of the language in which to create the marketing content description.MarketingContentException
public static boolean checkForExistingMarketingContentDescription(java.lang.String contentId, java.lang.Integer langId) throws DataMediatorException, java.lang.NumberFormatException
contentId
- The id of the Marketing Content to checklangId
- The ID of the language in which to check for the marketing content descriptionDataMediatorException
java.lang.NumberFormatException
public static void addEMarketingSpotToActivity(java.lang.String activityId, java.lang.String spotId) throws ActivityException
activityId
- The activity ID.spotId
- The e-Marketing Spot ID.ActivityException
public static void removeEMarketingSpotFromActivity(java.lang.String activityId, java.lang.String spotId) throws ActivityException
activityId
- The activity ID.spotId
- The e-Marketing Spot ID.ActivityException
public static java.util.List<ActivityType> getActivityForEMarketingSpot(java.lang.String spotId) throws ActivityException
This methods gets the activities for a given e-marketing spot.
If there is more than one, only the first activity ID will be returned.
spotId
- The e-Marketing Spot ID.ActivityException
public static void removeActivityForEMarketingSpot(java.util.List<ActivityType> activities, java.lang.String eSpotId) throws ActivityException
This method will remove a list of activities from an e-Marketing spot.
activities
- The list of activities.eSpotId
- The e-Marketing spot ID.ActivityException
- An exception will be thrown if there was a problem removing the e-Marketing spot from the activity.public static java.lang.String getActivityForEMarketingSpotInAllRelatedStores(java.lang.String spotId, java.lang.Integer storeId)
This methods gets the first found activity for an e-marketing spot. This method searches all children and parent stores of the passed in storeId.
If there is more than one, only the first activity ID will be returned.
spotId
- The e-Marketing Spot ID.storeId
- The unique store ID of the store to search.