createCampaign
CampaignInfo createCampaign(String userCredential,
String partitionName,
Locale requestedLocale,
String securityPolicyName,
WSReference wsReference,
String name, Attribute[] attributes)
throws InvalidFolderException, AttributeNotFoundException,
InvalidAttributeException;
指定の属性を適用して、クライアント、パーティション、および securityPolicyName のための新しいキャンペーンを作成します。この API によって作成されるすべてのキャンペーンは、ルート・フォルダーの下に置かれます。
特定のフォルダーの下にキャンペーンを作成するには、WSReference パラメーターを使用してキャンペーン・フォルダーを指定します。
例
private static void createCampaign
(String userName, String partitionName, Locale loc, String securityPolicy,
String campaignName, long campaignfolderID)
{
WSAttribute[] wsAttributes = { WSAttributeUtils.getWSTextAttribute
(IAttributeMetadata.AC_CAMPAIGN_DESCRIPTION_ATTRIBUTE_NAME, null,new String[]
{ "description " + System.currentTimeMillis() }) };
try
{
WSReference wsReference = WSAttributeUtils.getWSReference
(WSComponentTypeEnum.FOLDER, campaignfolderID);
WSCampaignInfo wsCampaignInfo = CLIENT.createCampaign
(userName, partitionName, loc, securityPolicy, wsReference, campaignName, wsAttributes);
System.out.println("Created Campaign with Name: " + wsCampaignInfo.getName()
+ " CampaignCode: " + wsCampaignInfo.getCampaignCode());
}
catch (CampaignServicesException e)
{
e.printStackTrace();
}
}