com.liferay.commerce.discount.service.http.CommerceDiscountAccountRelServiceHttp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.commerce.discount.service
Show all versions of com.liferay.commerce.discount.service
Liferay Commerce Discount 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.discount.service.http;
import com.liferay.commerce.discount.service.CommerceDiscountAccountRelServiceUtil;
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
* CommerceDiscountAccountRelServiceUtil
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 Marco Leo
* @generated
*/
public class CommerceDiscountAccountRelServiceHttp {
public static com.liferay.commerce.discount.model.CommerceDiscountAccountRel
addCommerceDiscountAccountRel(
HttpPrincipal httpPrincipal, long commerceDiscountId,
long commerceAccountId,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommerceDiscountAccountRelServiceUtil.class,
"addCommerceDiscountAccountRel",
_addCommerceDiscountAccountRelParameterTypes0);
MethodHandler methodHandler = new MethodHandler(
methodKey, commerceDiscountId, commerceAccountId,
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.discount.model.
CommerceDiscountAccountRel)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static void deleteCommerceDiscountAccountRel(
HttpPrincipal httpPrincipal, long commerceDiscountAccountRelId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommerceDiscountAccountRelServiceUtil.class,
"deleteCommerceDiscountAccountRel",
_deleteCommerceDiscountAccountRelParameterTypes1);
MethodHandler methodHandler = new MethodHandler(
methodKey, commerceDiscountAccountRelId);
try {
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);
}
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static void deleteCommerceDiscountAccountRelsByCommerceDiscountId(
HttpPrincipal httpPrincipal, long commerceDiscountId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommerceDiscountAccountRelServiceUtil.class,
"deleteCommerceDiscountAccountRelsByCommerceDiscountId",
_deleteCommerceDiscountAccountRelsByCommerceDiscountIdParameterTypes2);
MethodHandler methodHandler = new MethodHandler(
methodKey, commerceDiscountId);
try {
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);
}
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.discount.model.CommerceDiscountAccountRel
fetchCommerceDiscountAccountRel(
HttpPrincipal httpPrincipal, long commerceAccountId,
long commerceDiscountId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommerceDiscountAccountRelServiceUtil.class,
"fetchCommerceDiscountAccountRel",
_fetchCommerceDiscountAccountRelParameterTypes3);
MethodHandler methodHandler = new MethodHandler(
methodKey, commerceAccountId, commerceDiscountId);
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.discount.model.
CommerceDiscountAccountRel)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.discount.model.CommerceDiscountAccountRel
getCommerceDiscountAccountRel(
HttpPrincipal httpPrincipal, long commerceDiscountAccountRelId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommerceDiscountAccountRelServiceUtil.class,
"getCommerceDiscountAccountRel",
_getCommerceDiscountAccountRelParameterTypes4);
MethodHandler methodHandler = new MethodHandler(
methodKey, commerceDiscountAccountRelId);
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.discount.model.
CommerceDiscountAccountRel)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static java.util.List
getCommerceDiscountAccountRels(
HttpPrincipal httpPrincipal, long commerceDiscountId,
int start, int end,
com.liferay.portal.kernel.util.OrderByComparator
orderByComparator)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommerceDiscountAccountRelServiceUtil.class,
"getCommerceDiscountAccountRels",
_getCommerceDiscountAccountRelsParameterTypes5);
MethodHandler methodHandler = new MethodHandler(
methodKey, commerceDiscountId, 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
getCommerceDiscountAccountRels(
HttpPrincipal httpPrincipal, long commerceDiscountId,
String name, int start, int end) {
try {
MethodKey methodKey = new MethodKey(
CommerceDiscountAccountRelServiceUtil.class,
"getCommerceDiscountAccountRels",
_getCommerceDiscountAccountRelsParameterTypes6);
MethodHandler methodHandler = new MethodHandler(
methodKey, commerceDiscountId, name, start, end);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception 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 getCommerceDiscountAccountRelsCount(
HttpPrincipal httpPrincipal, long commerceDiscountId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommerceDiscountAccountRelServiceUtil.class,
"getCommerceDiscountAccountRelsCount",
_getCommerceDiscountAccountRelsCountParameterTypes7);
MethodHandler methodHandler = new MethodHandler(
methodKey, commerceDiscountId);
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 getCommerceDiscountAccountRelsCount(
HttpPrincipal httpPrincipal, long commerceDiscountId, String name) {
try {
MethodKey methodKey = new MethodKey(
CommerceDiscountAccountRelServiceUtil.class,
"getCommerceDiscountAccountRelsCount",
_getCommerceDiscountAccountRelsCountParameterTypes8);
MethodHandler methodHandler = new MethodHandler(
methodKey, commerceDiscountId, name);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception 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;
}
}
private static Log _log = LogFactoryUtil.getLog(
CommerceDiscountAccountRelServiceHttp.class);
private static final Class>[]
_addCommerceDiscountAccountRelParameterTypes0 = new Class[] {
long.class, long.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
private static final Class>[]
_deleteCommerceDiscountAccountRelParameterTypes1 = new Class[] {
long.class
};
private static final Class>[]
_deleteCommerceDiscountAccountRelsByCommerceDiscountIdParameterTypes2 =
new Class[] {long.class};
private static final Class>[]
_fetchCommerceDiscountAccountRelParameterTypes3 = new Class[] {
long.class, long.class
};
private static final Class>[]
_getCommerceDiscountAccountRelParameterTypes4 = new Class[] {
long.class
};
private static final Class>[]
_getCommerceDiscountAccountRelsParameterTypes5 = new Class[] {
long.class, int.class, int.class,
com.liferay.portal.kernel.util.OrderByComparator.class
};
private static final Class>[]
_getCommerceDiscountAccountRelsParameterTypes6 = new Class[] {
long.class, String.class, int.class, int.class
};
private static final Class>[]
_getCommerceDiscountAccountRelsCountParameterTypes7 = new Class[] {
long.class
};
private static final Class>[]
_getCommerceDiscountAccountRelsCountParameterTypes8 = new Class[] {
long.class, String.class
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy