
com.liferay.commerce.pricing.service.http.CommercePriceModifierServiceHttp Maven / Gradle / Ivy
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
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
* @see CommercePriceModifierServiceSoap
* @generated
*/
public class CommercePriceModifierServiceHttp {
public static com.liferay.commerce.pricing.model.CommercePriceModifier
addCommercePriceModifier(
HttpPrincipal httpPrincipal, long userId, 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, userId, 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",
_deleteCommercePriceModifierParameterTypes1);
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
fetchByExternalReferenceCode(
HttpPrincipal httpPrincipal, long companyId,
String externalReferenceCode)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"fetchByExternalReferenceCode",
_fetchByExternalReferenceCodeParameterTypes2);
MethodHandler methodHandler = new MethodHandler(
methodKey, companyId, externalReferenceCode);
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
getCommercePriceModifier(
HttpPrincipal httpPrincipal, long commercePriceModifierId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"getCommercePriceModifier",
_getCommercePriceModifierParameterTypes4);
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 companyId, String target)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"getCommercePriceModifiers",
_getCommercePriceModifiersParameterTypes5);
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",
_getCommercePriceModifiersCountParameterTypes6);
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 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",
_searchCommercePriceModifiersParameterTypes7);
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",
_updateCommercePriceModifierParameterTypes8);
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;
}
}
public static com.liferay.commerce.pricing.model.CommercePriceModifier
upsertCommercePriceModifier(
HttpPrincipal httpPrincipal, long userId,
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, String externalReferenceCode,
boolean neverExpire,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePriceModifierServiceUtil.class,
"upsertCommercePriceModifier",
_upsertCommercePriceModifierParameterTypes9);
MethodHandler methodHandler = new MethodHandler(
methodKey, userId, commercePriceModifierId, groupId, title,
target, commercePriceListId, modifierType, modifierAmount,
priority, active, displayDateMonth, displayDateDay,
displayDateYear, displayDateHour, displayDateMinute,
expirationDateMonth, expirationDateDay, expirationDateYear,
expirationDateHour, expirationDateMinute, externalReferenceCode,
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, 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>[]
_deleteCommercePriceModifierParameterTypes1 = new Class[] {long.class};
private static final Class>[]
_fetchByExternalReferenceCodeParameterTypes2 = new Class[] {
long.class, String.class
};
private static final Class>[] _fetchCommercePriceModifierParameterTypes3 =
new Class[] {long.class};
private static final Class>[] _getCommercePriceModifierParameterTypes4 =
new Class[] {long.class};
private static final Class>[] _getCommercePriceModifiersParameterTypes5 =
new Class[] {long.class, String.class};
private static final Class>[]
_getCommercePriceModifiersCountParameterTypes6 = new Class[] {};
private static final Class>[]
_searchCommercePriceModifiersParameterTypes7 = new Class[] {
long.class, String.class, int.class, int.class, int.class,
com.liferay.portal.kernel.search.Sort.class
};
private static final Class>[]
_updateCommercePriceModifierParameterTypes8 = 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
};
private static final Class>[]
_upsertCommercePriceModifierParameterTypes9 = new Class[] {
long.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,
String.class, boolean.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy