public class CPTestUtil
extends java.lang.Object
Constructor and Description |
---|
CPTestUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addBaseCommerceCatalogCommercePriceList(long groupId,
java.lang.String currencyCode,
java.lang.String type,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static com.liferay.asset.kernel.model.AssetCategory |
addCategoryToCPDefinitions(long groupId,
long... cpDefinitionIds) |
static CPDefinition |
addCPDefinition(long groupId) |
static CPDefinition |
addCPDefinition(long groupId,
boolean ignoreSKUCombinations,
boolean hasDefaultInstance,
int workflowAction) |
static CPDefinition |
addCPDefinition(long groupId,
java.lang.String productTypeName) |
static CPDefinition |
addCPDefinition(long groupId,
java.lang.String productTypeName,
boolean ignoreSKUCombinations,
boolean hasDefaultInstance) |
static CPInstance |
addCPDefinitionCPInstance(long cpDefinitionId,
java.util.Map<java.lang.Long,java.util.List<java.lang.Long>> cpDefinitionOptionRelIdCPDefinitionOptionValueRelIds) |
static CPInstance |
addCPDefinitionCPInstanceWithPrice(long cpDefinitionId,
java.util.Map<java.lang.Long,java.util.List<java.lang.Long>> cpDefinitionOptionRelIdCPDefinitionOptionValueRelIds,
java.math.BigDecimal price) |
static CPDefinition |
addCPDefinitionFromCatalog(long groupId,
java.lang.String productTypeName,
boolean ignoreSKUCombinations,
boolean hasDefaultInstance) |
static CPDefinitionOptionRel |
addCPDefinitionOptionRel(long groupId,
long cpDefinitionId,
boolean skuContributor,
int cpDefinitionOptionValueRelsCount) |
static CPDefinitionOptionRel |
addCPDefinitionOptionRel(long groupId,
long cpDefinitionId,
long cpOptionId) |
static CPDefinitionOptionValueRel |
addCPDefinitionOptionValueRelWithPrice(long groupId,
long cpDefinitionId,
long cpInstanceId,
long cpOptionId,
java.lang.String priceType,
java.math.BigDecimal price,
int quantity,
boolean required,
boolean skuContributor,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static CPDefinition |
addCPDefinitionWithChildCPDefinitions(long groupId) |
static CPDefinition |
addCPDefinitionWithChildCPDefinitions(long groupId,
int priceableOptionsCount) |
static CPDefinition |
addCPDefinitionWithChildCPDefinitions(long groupId,
int priceableOptionsCount,
java.lang.String priceType) |
static CPDefinition |
addCPDefinitionWithChildCPDefinitions(long groupId,
java.lang.String priceType) |
static CPInstance |
addCPInstance() |
static CPInstance |
addCPInstance(long groupId) |
static CPInstance |
addCPInstanceFromCatalog(long groupId) |
static CPInstance |
addCPInstanceFromCatalog(long groupId,
java.math.BigDecimal price) |
static CPInstance |
addCPInstanceFromCatalog(long groupId,
java.math.BigDecimal price,
java.lang.String sku) |
static CPInstance |
addCPInstanceFromCatalog(long groupId,
long[] assetCategoryIds) |
static CPInstance |
addCPInstanceFromCatalogWithERC(long groupId,
java.lang.String externalReferenceCode,
java.math.BigDecimal price,
java.lang.String sku) |
static CPInstance |
addCPInstanceWithRandomSku(long groupId) |
static CPInstance |
addCPInstanceWithRandomSku(long groupId,
java.math.BigDecimal price) |
static CPInstance |
addCPInstanceWithRandomSkuFromCatalog(long groupId) |
static CPInstance |
addCPInstanceWithSku(long groupId)
Deprecated.
As of Cavanaugh (7.4.x), use addCPInstanceWithRandomSku
|
static CPOption |
addCPOption(long groupId,
boolean skuContributor) |
static java.util.List<CPDefinitionOptionRel> |
addCPOption(long groupId,
long cpDefinitionId,
int cpOptionsCount,
int cpOptionValuesCount) |
static CPOption |
addCPOption(long groupId,
java.lang.String ddmFormFieldType,
boolean skuContributor) |
static CPOptionValue |
addCPOptionValue(CPOption cpOption) |
static void |
buildCPInstances(CPDefinition cpDefinition) |
static java.lang.String[] |
getCPOptionFieldTypes() |
static java.lang.String |
getDefaultDDMFormFieldType(boolean skuContributor) |
static CPDefinitionOptionValueRel |
getRandomCPDefinitionOptionValueRel(long cpDefinitionId) |
static java.util.List<CPDefinitionOptionValueRel> |
getRandomCPDefinitionOptionValueRels(long cpDefinitionId) |
static com.liferay.portal.kernel.search.SearchContext |
getSearchContext(java.lang.String keywords,
int status,
com.liferay.portal.kernel.model.Group group) |
static java.math.BigDecimal |
stripTrailingZeros(java.math.BigDecimal bigDecimal) |
public static void addBaseCommerceCatalogCommercePriceList(long groupId, java.lang.String currencyCode, java.lang.String type, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static com.liferay.asset.kernel.model.AssetCategory addCategoryToCPDefinitions(long groupId, long... cpDefinitionIds) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPDefinition addCPDefinition(long groupId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPDefinition addCPDefinition(long groupId, boolean ignoreSKUCombinations, boolean hasDefaultInstance, int workflowAction) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPDefinition addCPDefinition(long groupId, java.lang.String productTypeName) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPDefinition addCPDefinition(long groupId, java.lang.String productTypeName, boolean ignoreSKUCombinations, boolean hasDefaultInstance) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPDefinitionCPInstance(long cpDefinitionId, java.util.Map<java.lang.Long,java.util.List<java.lang.Long>> cpDefinitionOptionRelIdCPDefinitionOptionValueRelIds) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPDefinitionCPInstanceWithPrice(long cpDefinitionId, java.util.Map<java.lang.Long,java.util.List<java.lang.Long>> cpDefinitionOptionRelIdCPDefinitionOptionValueRelIds, java.math.BigDecimal price) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPDefinition addCPDefinitionFromCatalog(long groupId, java.lang.String productTypeName, boolean ignoreSKUCombinations, boolean hasDefaultInstance) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPDefinitionOptionRel addCPDefinitionOptionRel(long groupId, long cpDefinitionId, boolean skuContributor, int cpDefinitionOptionValueRelsCount) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPDefinitionOptionRel addCPDefinitionOptionRel(long groupId, long cpDefinitionId, long cpOptionId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPDefinitionOptionValueRel addCPDefinitionOptionValueRelWithPrice(long groupId, long cpDefinitionId, long cpInstanceId, long cpOptionId, java.lang.String priceType, java.math.BigDecimal price, int quantity, boolean required, boolean skuContributor, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPDefinition addCPDefinitionWithChildCPDefinitions(long groupId) throws java.lang.Exception
java.lang.Exception
public static CPDefinition addCPDefinitionWithChildCPDefinitions(long groupId, int priceableOptionsCount) throws java.lang.Exception
java.lang.Exception
public static CPDefinition addCPDefinitionWithChildCPDefinitions(long groupId, int priceableOptionsCount, java.lang.String priceType) throws java.lang.Exception
java.lang.Exception
public static CPDefinition addCPDefinitionWithChildCPDefinitions(long groupId, java.lang.String priceType) throws java.lang.Exception
java.lang.Exception
public static CPInstance addCPInstance() throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPInstance(long groupId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPInstanceFromCatalog(long groupId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPInstanceFromCatalog(long groupId, java.math.BigDecimal price) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPInstanceFromCatalog(long groupId, java.math.BigDecimal price, java.lang.String sku) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPInstanceFromCatalog(long groupId, long[] assetCategoryIds) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPInstanceFromCatalogWithERC(long groupId, java.lang.String externalReferenceCode, java.math.BigDecimal price, java.lang.String sku) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPInstanceWithRandomSku(long groupId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPInstanceWithRandomSku(long groupId, java.math.BigDecimal price) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPInstance addCPInstanceWithRandomSkuFromCatalog(long groupId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
@Deprecated public static CPInstance addCPInstanceWithSku(long groupId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPOption addCPOption(long groupId, boolean skuContributor) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static java.util.List<CPDefinitionOptionRel> addCPOption(long groupId, long cpDefinitionId, int cpOptionsCount, int cpOptionValuesCount) throws java.lang.Exception
java.lang.Exception
public static CPOption addCPOption(long groupId, java.lang.String ddmFormFieldType, boolean skuContributor) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static CPOptionValue addCPOptionValue(CPOption cpOption) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static void buildCPInstances(CPDefinition cpDefinition) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static java.lang.String[] getCPOptionFieldTypes() throws com.liferay.portal.kernel.module.configuration.ConfigurationException
com.liferay.portal.kernel.module.configuration.ConfigurationException
public static java.lang.String getDefaultDDMFormFieldType(boolean skuContributor) throws com.liferay.portal.kernel.module.configuration.ConfigurationException
com.liferay.portal.kernel.module.configuration.ConfigurationException
public static CPDefinitionOptionValueRel getRandomCPDefinitionOptionValueRel(long cpDefinitionId)
public static java.util.List<CPDefinitionOptionValueRel> getRandomCPDefinitionOptionValueRels(long cpDefinitionId)
public static com.liferay.portal.kernel.search.SearchContext getSearchContext(java.lang.String keywords, int status, com.liferay.portal.kernel.model.Group group)
public static java.math.BigDecimal stripTrailingZeros(java.math.BigDecimal bigDecimal)