com.liferay.commerce.pricing.service.http.CommercePriceModifierServiceHttp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.commerce.pricing.service
Show all versions of com.liferay.commerce.pricing.service
Liferay Commerce Pricing Service
The newest version!
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.commerce.pricing.service.http;
import com.liferay.commerce.pricing.service.CommercePriceModifierServiceUtil;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.security.auth.HttpPrincipal;
import com.liferay.portal.kernel.service.http.TunnelUtil;
import com.liferay.portal.kernel.util.MethodHandler;
import com.liferay.portal.kernel.util.MethodKey;
/**
* Provides the HTTP utility for the
* CommercePriceModifierServiceUtil
service
* utility. The
* static methods of this class calls the same methods of the service utility.
* However, the signatures are different because it requires an additional
* HttpPrincipal
parameter.
*
*
* The benefits of using the HTTP utility is that it is fast and allows for
* tunneling without the cost of serializing to text. The drawback is that it
* only works with Java.
*
*
*
* Set the property tunnel.servlet.hosts.allowed in portal.properties to
* configure security.
*
*
*
* The HTTP utility is only generated for remote services.
*
*
* @author Riccardo Alberti
* @generated
*/
public class CommercePriceModifierServiceHttp {
public static com.liferay.commerce.pricing.model.CommercePriceModifier
addCommercePriceModifier(
HttpPrincipal httpPrincipal, long groupId, String title,
String target, long commercePriceListId, String modifierType,
java.math.BigDecimal modifierAmount, double priority,
boolean active, 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 {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"addCommercePriceModifier",
_addCommercePriceModifierParameterTypes0);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, title, target, commercePriceListId,
modifierType, modifierAmount, priority, active,
displayDateMonth, displayDateDay, displayDateYear,
displayDateHour, displayDateMinute, expirationDateMonth,
expirationDateDay, expirationDateYear, expirationDateHour,
expirationDateMinute, neverExpire, serviceContext);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return (com.liferay.commerce.pricing.model.CommercePriceModifier)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePriceModifier
addOrUpdateCommercePriceModifier(
HttpPrincipal httpPrincipal, String externalReferenceCode,
long commercePriceModifierId, long groupId, String title,
String target, long commercePriceListId, String modifierType,
java.math.BigDecimal modifierAmount, double priority,
boolean active, 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 {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"addOrUpdateCommercePriceModifier",
_addOrUpdateCommercePriceModifierParameterTypes1);
MethodHandler methodHandler = new MethodHandler(
methodKey, externalReferenceCode, commercePriceModifierId,
groupId, title, target, commercePriceListId, modifierType,
modifierAmount, priority, active, displayDateMonth,
displayDateDay, displayDateYear, displayDateHour,
displayDateMinute, expirationDateMonth, expirationDateDay,
expirationDateYear, expirationDateHour, expirationDateMinute,
neverExpire, serviceContext);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return (com.liferay.commerce.pricing.model.CommercePriceModifier)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePriceModifier
deleteCommercePriceModifier(
HttpPrincipal httpPrincipal, long commercePriceModifierId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"deleteCommercePriceModifier",
_deleteCommercePriceModifierParameterTypes2);
MethodHandler methodHandler = new MethodHandler(
methodKey, commercePriceModifierId);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return (com.liferay.commerce.pricing.model.CommercePriceModifier)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePriceModifier
fetchCommercePriceModifier(
HttpPrincipal httpPrincipal, long commercePriceModifierId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"fetchCommercePriceModifier",
_fetchCommercePriceModifierParameterTypes3);
MethodHandler methodHandler = new MethodHandler(
methodKey, commercePriceModifierId);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return (com.liferay.commerce.pricing.model.CommercePriceModifier)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePriceModifier
fetchCommercePriceModifierByExternalReferenceCode(
HttpPrincipal httpPrincipal, String externalReferenceCode,
long companyId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"fetchCommercePriceModifierByExternalReferenceCode",
_fetchCommercePriceModifierByExternalReferenceCodeParameterTypes4);
MethodHandler methodHandler = new MethodHandler(
methodKey, externalReferenceCode, companyId);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return (com.liferay.commerce.pricing.model.CommercePriceModifier)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePriceModifier
getCommercePriceModifier(
HttpPrincipal httpPrincipal, long commercePriceModifierId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"getCommercePriceModifier",
_getCommercePriceModifierParameterTypes5);
MethodHandler methodHandler = new MethodHandler(
methodKey, commercePriceModifierId);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return (com.liferay.commerce.pricing.model.CommercePriceModifier)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static java.util.List
getCommercePriceModifiers(
HttpPrincipal httpPrincipal, long commercePriceListId,
int start, int end,
com.liferay.portal.kernel.util.OrderByComparator
orderByComparator)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"getCommercePriceModifiers",
_getCommercePriceModifiersParameterTypes6);
MethodHandler methodHandler = new MethodHandler(
methodKey, commercePriceListId, start, end, orderByComparator);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return (java.util.List
)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static java.util.List
getCommercePriceModifiers(
HttpPrincipal httpPrincipal, long companyId, String target)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"getCommercePriceModifiers",
_getCommercePriceModifiersParameterTypes7);
MethodHandler methodHandler = new MethodHandler(
methodKey, companyId, target);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return (java.util.List
)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static int getCommercePriceModifiersCount(
HttpPrincipal httpPrincipal)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"getCommercePriceModifiersCount",
_getCommercePriceModifiersCountParameterTypes8);
MethodHandler methodHandler = new MethodHandler(methodKey);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return ((Integer)returnObj).intValue();
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static int getCommercePriceModifiersCount(
HttpPrincipal httpPrincipal, long commercePriceListId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"getCommercePriceModifiersCount",
_getCommercePriceModifiersCountParameterTypes9);
MethodHandler methodHandler = new MethodHandler(
methodKey, commercePriceListId);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return ((Integer)returnObj).intValue();
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.portal.kernel.search.BaseModelSearchResult
searchCommercePriceModifiers(
HttpPrincipal httpPrincipal, long companyId,
String keywords, int status, int start, int end,
com.liferay.portal.kernel.search.Sort sort)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"searchCommercePriceModifiers",
_searchCommercePriceModifiersParameterTypes10);
MethodHandler methodHandler = new MethodHandler(
methodKey, companyId, keywords, status, start, end, sort);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return (com.liferay.portal.kernel.search.BaseModelSearchResult
)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePriceModifier
updateCommercePriceModifier(
HttpPrincipal httpPrincipal, long commercePriceModifierId,
long groupId, String title, String target,
long commercePriceListId, String modifierType,
java.math.BigDecimal modifierAmount, double priority,
boolean active, 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 {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"updateCommercePriceModifier",
_updateCommercePriceModifierParameterTypes11);
MethodHandler methodHandler = new MethodHandler(
methodKey, commercePriceModifierId, groupId, title, target,
commercePriceListId, modifierType, modifierAmount, priority,
active, displayDateMonth, displayDateDay, displayDateYear,
displayDateHour, displayDateMinute, expirationDateMonth,
expirationDateDay, expirationDateYear, expirationDateHour,
expirationDateMinute, neverExpire, serviceContext);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.exception.PortalException) {
throw (com.liferay.portal.kernel.exception.PortalException)
exception;
}
throw new com.liferay.portal.kernel.exception.SystemException(
exception);
}
return (com.liferay.commerce.pricing.model.CommercePriceModifier)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
private static Log _log = LogFactoryUtil.getLog(
CommercePriceModifierServiceHttp.class);
private static final Class>[] _addCommercePriceModifierParameterTypes0 =
new Class[] {
long.class, String.class, String.class, long.class, String.class,
java.math.BigDecimal.class, double.class, boolean.class, int.class,
int.class, int.class, int.class, int.class, int.class, int.class,
int.class, int.class, int.class, boolean.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
private static final Class>[]
_addOrUpdateCommercePriceModifierParameterTypes1 = new Class[] {
String.class, long.class, long.class, String.class, String.class,
long.class, String.class, java.math.BigDecimal.class, double.class,
boolean.class, int.class, int.class, int.class, int.class,
int.class, int.class, int.class, int.class, int.class, int.class,
boolean.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
private static final Class>[]
_deleteCommercePriceModifierParameterTypes2 = new Class[] {long.class};
private static final Class>[] _fetchCommercePriceModifierParameterTypes3 =
new Class[] {long.class};
private static final Class>[]
_fetchCommercePriceModifierByExternalReferenceCodeParameterTypes4 =
new Class[] {String.class, long.class};
private static final Class>[] _getCommercePriceModifierParameterTypes5 =
new Class[] {long.class};
private static final Class>[] _getCommercePriceModifiersParameterTypes6 =
new Class[] {
long.class, int.class, int.class,
com.liferay.portal.kernel.util.OrderByComparator.class
};
private static final Class>[] _getCommercePriceModifiersParameterTypes7 =
new Class[] {long.class, String.class};
private static final Class>[]
_getCommercePriceModifiersCountParameterTypes8 = new Class[] {};
private static final Class>[]
_getCommercePriceModifiersCountParameterTypes9 = new Class[] {
long.class
};
private static final Class>[]
_searchCommercePriceModifiersParameterTypes10 = new Class[] {
long.class, String.class, int.class, int.class, int.class,
com.liferay.portal.kernel.search.Sort.class
};
private static final Class>[]
_updateCommercePriceModifierParameterTypes11 = new Class[] {
long.class, long.class, String.class, String.class, long.class,
String.class, java.math.BigDecimal.class, double.class,
boolean.class, int.class, int.class, int.class, int.class,
int.class, int.class, int.class, int.class, int.class, int.class,
boolean.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
}