Class CPDefinitionLocalServiceUtil

java.lang.Object
com.liferay.commerce.product.service.CPDefinitionLocalServiceUtil

public class CPDefinitionLocalServiceUtil extends Object
Provides the local service utility for CPDefinition. This utility wraps com.liferay.commerce.product.service.impl.CPDefinitionLocalServiceImpl and is an access point for service operations in application layer code running on the local server. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
See Also:
Generated:
  • Constructor Details

    • CPDefinitionLocalServiceUtil

      public CPDefinitionLocalServiceUtil()
  • Method Details

    • addCPDefinition

      public static CPDefinition addCPDefinition(CPDefinition cpDefinition)
      Adds the cp definition to the database. Also notifies the appropriate model listeners.

      Important: Inspect CPDefinitionLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      cpDefinition - the cp definition
      Returns:
      the cp definition that was added
    • addCPDefinition

      public static CPDefinition addCPDefinition(String externalReferenceCode, long groupId, long userId, Map<Locale,String> nameMap, Map<Locale,String> shortDescriptionMap, Map<Locale,String> descriptionMap, Map<Locale,String> urlTitleMap, Map<Locale,String> metaTitleMap, Map<Locale,String> metaDescriptionMap, Map<Locale,String> metaKeywordsMap, String productTypeName, boolean ignoreSKUCombinations, boolean shippable, boolean freeShipping, boolean shipSeparately, double shippingExtraPrice, double width, double height, double depth, double weight, long cpTaxCategoryId, boolean taxExempt, boolean telcoOrElectronics, String ddmStructureKey, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, String defaultSku, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addCPDefinition

      public static CPDefinition addCPDefinition(String externalReferenceCode, long groupId, long userId, Map<Locale,String> nameMap, Map<Locale,String> shortDescriptionMap, Map<Locale,String> descriptionMap, Map<Locale,String> urlTitleMap, Map<Locale,String> metaTitleMap, Map<Locale,String> metaDescriptionMap, Map<Locale,String> metaKeywordsMap, String productTypeName, boolean ignoreSKUCombinations, boolean shippable, boolean freeShipping, boolean shipSeparately, double shippingExtraPrice, double width, double height, double depth, double weight, long cpTaxCategoryId, boolean taxExempt, boolean telcoOrElectronics, String ddmStructureKey, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, String defaultSku, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addOrUpdateCPDefinition

      public static CPDefinition addOrUpdateCPDefinition(String externalReferenceCode, long groupId, long userId, Map<Locale,String> nameMap, Map<Locale,String> shortDescriptionMap, Map<Locale,String> descriptionMap, Map<Locale,String> urlTitleMap, Map<Locale,String> metaTitleMap, Map<Locale,String> metaDescriptionMap, Map<Locale,String> metaKeywordsMap, String productTypeName, boolean ignoreSKUCombinations, boolean shippable, boolean freeShipping, boolean shipSeparately, double shippingExtraPrice, double width, double height, double depth, double weight, long cpTaxCategoryId, boolean taxExempt, boolean telcoOrElectronics, String ddmStructureKey, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, String defaultSku, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addOrUpdateCPDefinition

      public static CPDefinition addOrUpdateCPDefinition(String externalReferenceCode, long groupId, long userId, Map<Locale,String> nameMap, Map<Locale,String> shortDescriptionMap, Map<Locale,String> descriptionMap, Map<Locale,String> urlTitleMap, Map<Locale,String> metaTitleMap, Map<Locale,String> metaDescriptionMap, Map<Locale,String> metaKeywordsMap, String productTypeName, boolean ignoreSKUCombinations, boolean shippable, boolean freeShipping, boolean shipSeparately, double shippingExtraPrice, double width, double height, double depth, double weight, long cpTaxCategoryId, boolean taxExempt, boolean telcoOrElectronics, String ddmStructureKey, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, String defaultSku, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkCPDefinitions

      public static void checkCPDefinitions() throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • cloneCPDefinition

      public static CPDefinition cloneCPDefinition(long userId, long cpDefinitionId, long groupId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • copyCPDefinition

      public static CPDefinition copyCPDefinition(long sourceCPDefinitionId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • copyCPDefinition

      public static CPDefinition copyCPDefinition(long sourceCPDefinitionId, long groupId, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • createCPDefinition

      public static CPDefinition createCPDefinition(long CPDefinitionId)
      Creates a new cp definition with the primary key. Does not add the cp definition to the database.
      Parameters:
      CPDefinitionId - the primary key for the new cp definition
      Returns:
      the new cp definition
    • createPersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteAssetCategoryCPDefinition

      public static void deleteAssetCategoryCPDefinition(long cpDefinitionId, long categoryId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCPDefinition

      public static CPDefinition deleteCPDefinition(CPDefinition cpDefinition) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the cp definition from the database. Also notifies the appropriate model listeners.

      Important: Inspect CPDefinitionLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      cpDefinition - the cp definition
      Returns:
      the cp definition that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCPDefinition

      public static CPDefinition deleteCPDefinition(long CPDefinitionId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the cp definition with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect CPDefinitionLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      CPDefinitionId - the primary key of the cp definition
      Returns:
      the cp definition that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a cp definition with the primary key could not be found
    • deleteCPDefinitions

      public static void deleteCPDefinitions(long companyId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteCPDefinitions

      public static void deleteCPDefinitions(long cProductId, int status)
    • deletePersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • dslQuery

      public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
    • dslQueryCount

      public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
    • dynamicQuery

      public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
    • dynamicQuery

      public static <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      public static <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      Performs a dynamic query on the database and returns a range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.commerce.product.model.impl.CPDefinitionModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      Returns:
      the range of matching rows
    • dynamicQuery

      public static <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
      Performs a dynamic query on the database and returns an ordered range of the matching rows.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.commerce.product.model.impl.CPDefinitionModelImpl.

      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching rows
    • dynamicQueryCount

      public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
      Returns the number of rows matching the dynamic query.
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • fetchCPDefinition

      public static CPDefinition fetchCPDefinition(long CPDefinitionId)
    • fetchCPDefinitionByCProductExternalReferenceCode

      public static CPDefinition fetchCPDefinitionByCProductExternalReferenceCode(String externalReferenceCode, long companyId)
    • fetchCPDefinitionByCProductId

      public static CPDefinition fetchCPDefinitionByCProductId(long cProductId)
    • fetchCPDefinitionByUuidAndGroupId

      public static CPDefinition fetchCPDefinitionByUuidAndGroupId(String uuid, long groupId)
      Returns the cp definition matching the UUID and group.
      Parameters:
      uuid - the cp definition's UUID
      groupId - the primary key of the group
      Returns:
      the matching cp definition, or null if a matching cp definition could not be found
    • fetchCPDefinitionLocalization

      public static CPDefinitionLocalization fetchCPDefinitionLocalization(long CPDefinitionId, String languageId)
    • getActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
    • getCPDefinition

      public static CPDefinition getCPDefinition(long CPDefinitionId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the cp definition with the primary key.
      Parameters:
      CPDefinitionId - the primary key of the cp definition
      Returns:
      the cp definition
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a cp definition with the primary key could not be found
    • getCPDefinitionByUuidAndGroupId

      public static CPDefinition getCPDefinitionByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the cp definition matching the UUID and group.
      Parameters:
      uuid - the cp definition's UUID
      groupId - the primary key of the group
      Returns:
      the matching cp definition
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching cp definition could not be found
    • getCPDefinitionDescriptionMap

      public static Map<Locale,String> getCPDefinitionDescriptionMap(long cpDefinitionId)
    • getCPDefinitionLocalization

      public static CPDefinitionLocalization getCPDefinitionLocalization(long CPDefinitionId, String languageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getCPDefinitionLocalizationLanguageIds

      public static List<String> getCPDefinitionLocalizationLanguageIds(long cpDefinitionId)
    • getCPDefinitionLocalizations

      public static List<CPDefinitionLocalization> getCPDefinitionLocalizations(long CPDefinitionId)
    • getCPDefinitionMetaDescriptionMap

      public static Map<Locale,String> getCPDefinitionMetaDescriptionMap(long cpDefinitionId)
    • getCPDefinitionMetaKeywordsMap

      public static Map<Locale,String> getCPDefinitionMetaKeywordsMap(long cpDefinitionId)
    • getCPDefinitionMetaTitleMap

      public static Map<Locale,String> getCPDefinitionMetaTitleMap(long cpDefinitionId)
    • getCPDefinitionNameMap

      public static Map<Locale,String> getCPDefinitionNameMap(long cpDefinitionId)
    • getCPDefinitions

      public static List<CPDefinition> getCPDefinitions(int start, int end)
      Returns a range of all the cp definitions.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.commerce.product.model.impl.CPDefinitionModelImpl.

      Parameters:
      start - the lower bound of the range of cp definitions
      end - the upper bound of the range of cp definitions (not inclusive)
      Returns:
      the range of cp definitions
    • getCPDefinitions

      public static List<CPDefinition> getCPDefinitions(long groupId, boolean subscriptionEnabled)
    • getCPDefinitions

      public static List<CPDefinition> getCPDefinitions(long groupId, int status, int start, int end)
    • getCPDefinitions

      public static List<CPDefinition> getCPDefinitions(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPDefinition> orderByComparator)
    • getCPDefinitions

      public static List<CPDefinition> getCPDefinitions(long groupId, String productTypeName, String languageId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPDefinition> orderByComparator)
    • getCPDefinitionsByUuidAndCompanyId

      public static List<CPDefinition> getCPDefinitionsByUuidAndCompanyId(String uuid, long companyId)
      Returns all the cp definitions matching the UUID and company.
      Parameters:
      uuid - the UUID of the cp definitions
      companyId - the primary key of the company
      Returns:
      the matching cp definitions, or an empty list if no matches were found
    • getCPDefinitionsByUuidAndCompanyId

      public static List<CPDefinition> getCPDefinitionsByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPDefinition> orderByComparator)
      Returns a range of cp definitions matching the UUID and company.
      Parameters:
      uuid - the UUID of the cp definitions
      companyId - the primary key of the company
      start - the lower bound of the range of cp definitions
      end - the upper bound of the range of cp definitions (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the range of matching cp definitions, or an empty list if no matches were found
    • getCPDefinitionsCount

      public static int getCPDefinitionsCount()
      Returns the number of cp definitions.
      Returns:
      the number of cp definitions
    • getCPDefinitionsCount

      public static int getCPDefinitionsCount(long groupId, boolean subscriptionEnabled)
    • getCPDefinitionsCount

      public static int getCPDefinitionsCount(long groupId, int status)
    • getCPDefinitionsCount

      public static int getCPDefinitionsCount(long groupId, String productTypeName, String languageId, int status)
    • getCPDefinitionShortDescriptionMap

      public static Map<Locale,String> getCPDefinitionShortDescriptionMap(long cpDefinitionId)
    • getCProductCPDefinition

      public static CPDefinition getCProductCPDefinition(long cProductId, int version) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getCProductCPDefinitions

      public static List<CPDefinition> getCProductCPDefinitions(long cProductId, int status, int start, int end)
    • getCProductCPDefinitions

      public static List<CPDefinition> getCProductCPDefinitions(long cProductId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CPDefinition> orderByComparator)
    • getDefaultImageCPAttachmentFileEntry

      public static CPAttachmentFileEntry getDefaultImageCPAttachmentFileEntry(long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getExportActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext)
    • getFacets

      public static List<com.liferay.portal.kernel.search.facet.Facet> getFacets(String filterFields, String filterValues, com.liferay.portal.kernel.search.SearchContext searchContext)
    • getIndexableActionableDynamicQuery

      public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
    • getLayoutPageTemplateEntryUuid

      public static String getLayoutPageTemplateEntryUuid(long groupId, long cpDefinitionId)
    • getLayoutUuid

      public static String getLayoutUuid(long groupId, long cpDefinitionId)
    • getOSGiServiceIdentifier

      public static String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Returns:
      the OSGi service identifier
    • getPersistedModel

      public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getUrlTitleMap

      public static Map<Locale,String> getUrlTitleMap(long cpDefinitionId)
    • getUrlTitleMapAsXML

      public static String getUrlTitleMapAsXML(long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasChildCPDefinitions

      public static boolean hasChildCPDefinitions(long cpDefinitionId)
    • isPublishedCPDefinition

      public static boolean isPublishedCPDefinition(CPDefinition cpDefinition)
    • isPublishedCPDefinition

      public static boolean isPublishedCPDefinition(long cpDefinitionId)
    • isVersionable

      public static boolean isVersionable(CPDefinition cpDefinition)
    • isVersionable

      public static boolean isVersionable(long cpDefinitionId)
    • isVersionable

      public static boolean isVersionable(long cpDefinitionId, javax.servlet.http.HttpServletRequest httpServletRequest)
    • maintainVersionThreshold

      public static void maintainVersionThreshold(long cProductId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCPDefinitions

      public static com.liferay.portal.kernel.search.BaseModelSearchResult<CPDefinition> searchCPDefinitions(long companyId, long[] groupIds, String keywords, int status, boolean ignoreCommerceAccountGroup, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCPDefinitions

      public static com.liferay.portal.kernel.search.BaseModelSearchResult<CPDefinition> searchCPDefinitions(long companyId, long[] groupIds, String keywords, String filterFields, String filterValues, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCPDefinitionsByChannelGroupId

      public static com.liferay.portal.kernel.search.BaseModelSearchResult<CPDefinition> searchCPDefinitionsByChannelGroupId(long companyId, long[] groupIds, long commerceChannelGroupId, String keywords, int status, boolean ignoreCommerceAccountGroup, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateAsset

      public static void updateAsset(long userId, CPDefinition cpDefinition, long[] assetCategoryIds, String[] assetTagNames, long[] assetLinkEntryIds, Double priority) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCPDefinition

      public static CPDefinition updateCPDefinition(CPDefinition cpDefinition)
      Updates the cp definition in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect CPDefinitionLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Parameters:
      cpDefinition - the cp definition
      Returns:
      the cp definition that was updated
    • updateCPDefinition

      public static CPDefinition updateCPDefinition(long cpDefinitionId, Map<Locale,String> nameMap, Map<Locale,String> shortDescriptionMap, Map<Locale,String> descriptionMap, Map<Locale,String> urlTitleMap, Map<Locale,String> metaTitleMap, Map<Locale,String> metaDescriptionMap, Map<Locale,String> metaKeywordsMap, boolean ignoreSKUCombinations, boolean shippable, boolean freeShipping, boolean shipSeparately, double shippingExtraPrice, double width, double height, double depth, double weight, long cpTaxCategoryId, boolean taxExempt, boolean telcoOrElectronics, String ddmStructureKey, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCPDefinition

      public static CPDefinition updateCPDefinition(long cpDefinitionId, Map<Locale,String> nameMap, Map<Locale,String> shortDescriptionMap, Map<Locale,String> descriptionMap, Map<Locale,String> urlTitleMap, Map<Locale,String> metaTitleMap, Map<Locale,String> metaDescriptionMap, Map<Locale,String> metaKeywordsMap, boolean ignoreSKUCombinations, String ddmStructureKey, boolean published, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCPDefinitionAccountGroupFilter

      public static CPDefinition updateCPDefinitionAccountGroupFilter(long cpDefinitionId, boolean enable) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCPDefinitionCategorization

      public static CPDefinition updateCPDefinitionCategorization(long cpDefinitionId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCPDefinitionChannelFilter

      public static CPDefinition updateCPDefinitionChannelFilter(long cpDefinitionId, boolean enable) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCPDefinitionIgnoreSKUCombinations

      public static CPDefinition updateCPDefinitionIgnoreSKUCombinations(long cpDefinitionId, boolean ignoreSKUCombinations, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCPDefinitionLocalization

      public static CPDefinitionLocalization updateCPDefinitionLocalization(CPDefinition cpDefinition, String languageId, String name, String shortDescription, String description, String metaTitle, String metaDescription, String metaKeywords) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCPDefinitionLocalizations

      public static List<CPDefinitionLocalization> updateCPDefinitionLocalizations(CPDefinition cpDefinition, Map<String,String> nameMap, Map<String,String> shortDescriptionMap, Map<String,String> descriptionMap, Map<String,String> metaTitleMap, Map<String,String> metaDescriptionMap, Map<String,String> metaKeywordsMap) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateCPDefinitionsByCPTaxCategoryId

      public static void updateCPDefinitionsByCPTaxCategoryId(long cpTaxCategoryId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateExternalReferenceCode

      public static CPDefinition updateExternalReferenceCode(String externalReferenceCode, long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateShippingInfo

      public static CPDefinition updateShippingInfo(long cpDefinitionId, boolean shippable, boolean freeShipping, boolean shipSeparately, double shippingExtraPrice, double width, double height, double depth, double weight, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateStatus

      public static CPDefinition updateStatus(long userId, long cpDefinitionId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext, Map<String,Serializable> workflowContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateSubscriptionInfo

      public static CPDefinition updateSubscriptionInfo(long cpDefinitionId, boolean subscriptionEnabled, int subscriptionLength, String subscriptionType, com.liferay.portal.kernel.util.UnicodeProperties subscriptionTypeSettingsUnicodeProperties, long maxSubscriptionCycles, boolean deliverySubscriptionEnabled, int deliverySubscriptionLength, String deliverySubscriptionType, com.liferay.portal.kernel.util.UnicodeProperties deliverySubscriptionTypeSettingsUnicodeProperties, long deliveryMaxSubscriptionCycles) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateTaxCategoryInfo

      public static CPDefinition updateTaxCategoryInfo(long cpDefinitionId, long cpTaxCategoryId, boolean taxExempt, boolean telcoOrElectronics) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getService

      public static CPDefinitionLocalService getService()