com.liferay.commerce.pricing.service.http.CommercePricingClassServiceHttp 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.CommercePricingClassServiceUtil;
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
* CommercePricingClassServiceUtil
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 CommercePricingClassServiceHttp {
public static com.liferay.commerce.pricing.model.CommercePricingClass
addCommercePricingClass(
HttpPrincipal httpPrincipal, String externalReferenceCode,
java.util.Map titleMap,
java.util.Map descriptionMap,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"addCommercePricingClass",
_addCommercePricingClassParameterTypes0);
MethodHandler methodHandler = new MethodHandler(
methodKey, externalReferenceCode, titleMap, descriptionMap,
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.CommercePricingClass)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePricingClass
addOrUpdateCommercePricingClass(
HttpPrincipal httpPrincipal, String externalReferenceCode,
long commercePricingClassId,
java.util.Map titleMap,
java.util.Map descriptionMap,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"addOrUpdateCommercePricingClass",
_addOrUpdateCommercePricingClassParameterTypes1);
MethodHandler methodHandler = new MethodHandler(
methodKey, externalReferenceCode, commercePricingClassId,
titleMap, descriptionMap, 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.CommercePricingClass)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePricingClass
deleteCommercePricingClass(
HttpPrincipal httpPrincipal, long commercePricingClassId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"deleteCommercePricingClass",
_deleteCommercePricingClassParameterTypes2);
MethodHandler methodHandler = new MethodHandler(
methodKey, commercePricingClassId);
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.CommercePricingClass)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePricingClass
fetchCommercePricingClass(
HttpPrincipal httpPrincipal, long commercePricingClassId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"fetchCommercePricingClass",
_fetchCommercePricingClassParameterTypes3);
MethodHandler methodHandler = new MethodHandler(
methodKey, commercePricingClassId);
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.CommercePricingClass)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePricingClass
fetchCommercePricingClassByExternalReferenceCode(
HttpPrincipal httpPrincipal, String externalReferenceCode,
long companyId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"fetchCommercePricingClassByExternalReferenceCode",
_fetchCommercePricingClassByExternalReferenceCodeParameterTypes4);
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.CommercePricingClass)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePricingClass
getCommercePricingClass(
HttpPrincipal httpPrincipal, long commercePricingClassId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"getCommercePricingClass",
_getCommercePricingClassParameterTypes5);
MethodHandler methodHandler = new MethodHandler(
methodKey, commercePricingClassId);
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.CommercePricingClass)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static int getCommercePricingClassCountByCPDefinitionId(
HttpPrincipal httpPrincipal, long cpDefinitionId, String title)
throws com.liferay.portal.kernel.security.auth.PrincipalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"getCommercePricingClassCountByCPDefinitionId",
_getCommercePricingClassCountByCPDefinitionIdParameterTypes6);
MethodHandler methodHandler = new MethodHandler(
methodKey, cpDefinitionId, title);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.security.auth.
PrincipalException) {
throw (com.liferay.portal.kernel.security.auth.
PrincipalException)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 java.util.List
getCommercePricingClasses(
HttpPrincipal httpPrincipal, long companyId, int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator
orderByComparator)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"getCommercePricingClasses",
_getCommercePricingClassesParameterTypes7);
MethodHandler methodHandler = new MethodHandler(
methodKey, companyId, 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 int getCommercePricingClassesCount(
HttpPrincipal httpPrincipal, long companyId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"getCommercePricingClassesCount",
_getCommercePricingClassesCountParameterTypes8);
MethodHandler methodHandler = new MethodHandler(
methodKey, 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 ((Integer)returnObj).intValue();
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static int getCommercePricingClassesCount(
HttpPrincipal httpPrincipal, long cpDefinitionId, String title)
throws com.liferay.portal.kernel.security.auth.PrincipalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"getCommercePricingClassesCount",
_getCommercePricingClassesCountParameterTypes9);
MethodHandler methodHandler = new MethodHandler(
methodKey, cpDefinitionId, title);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.security.auth.
PrincipalException) {
throw (com.liferay.portal.kernel.security.auth.
PrincipalException)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 java.util.List
searchByCPDefinitionId(
HttpPrincipal httpPrincipal, long cpDefinitionId,
String title, int start, int end)
throws com.liferay.portal.kernel.security.auth.PrincipalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class, "searchByCPDefinitionId",
_searchByCPDefinitionIdParameterTypes10);
MethodHandler methodHandler = new MethodHandler(
methodKey, cpDefinitionId, title, start, end);
Object returnObj = null;
try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception exception) {
if (exception instanceof
com.liferay.portal.kernel.security.auth.
PrincipalException) {
throw (com.liferay.portal.kernel.security.auth.
PrincipalException)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 com.liferay.portal.kernel.search.BaseModelSearchResult
searchCommercePricingClasses(
HttpPrincipal httpPrincipal, long companyId,
String keywords, int start, int end,
com.liferay.portal.kernel.search.Sort sort)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"searchCommercePricingClasses",
_searchCommercePricingClassesParameterTypes11);
MethodHandler methodHandler = new MethodHandler(
methodKey, companyId, keywords, 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.CommercePricingClass
updateCommercePricingClass(
HttpPrincipal httpPrincipal, long commercePricingClassId,
java.util.Map titleMap,
java.util.Map descriptionMap,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"updateCommercePricingClass",
_updateCommercePricingClassParameterTypes12);
MethodHandler methodHandler = new MethodHandler(
methodKey, commercePricingClassId, titleMap, descriptionMap,
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.CommercePricingClass)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.commerce.pricing.model.CommercePricingClass
updateCommercePricingClassExternalReferenceCode(
HttpPrincipal httpPrincipal, String externalReferenceCode,
long commercePricingClassId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
CommercePricingClassServiceUtil.class,
"updateCommercePricingClassExternalReferenceCode",
_updateCommercePricingClassExternalReferenceCodeParameterTypes13);
MethodHandler methodHandler = new MethodHandler(
methodKey, externalReferenceCode, commercePricingClassId);
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.CommercePricingClass)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
private static Log _log = LogFactoryUtil.getLog(
CommercePricingClassServiceHttp.class);
private static final Class>[] _addCommercePricingClassParameterTypes0 =
new Class[] {
String.class, java.util.Map.class, java.util.Map.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
private static final Class>[]
_addOrUpdateCommercePricingClassParameterTypes1 = new Class[] {
String.class, long.class, java.util.Map.class, java.util.Map.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
private static final Class>[] _deleteCommercePricingClassParameterTypes2 =
new Class[] {long.class};
private static final Class>[] _fetchCommercePricingClassParameterTypes3 =
new Class[] {long.class};
private static final Class>[]
_fetchCommercePricingClassByExternalReferenceCodeParameterTypes4 =
new Class[] {String.class, long.class};
private static final Class>[] _getCommercePricingClassParameterTypes5 =
new Class[] {long.class};
private static final Class>[]
_getCommercePricingClassCountByCPDefinitionIdParameterTypes6 =
new Class[] {long.class, String.class};
private static final Class>[] _getCommercePricingClassesParameterTypes7 =
new Class[] {
long.class, int.class, int.class,
com.liferay.portal.kernel.util.OrderByComparator.class
};
private static final Class>[]
_getCommercePricingClassesCountParameterTypes8 = new Class[] {
long.class
};
private static final Class>[]
_getCommercePricingClassesCountParameterTypes9 = new Class[] {
long.class, String.class
};
private static final Class>[] _searchByCPDefinitionIdParameterTypes10 =
new Class[] {long.class, String.class, int.class, int.class};
private static final Class>[]
_searchCommercePricingClassesParameterTypes11 = new Class[] {
long.class, String.class, int.class, int.class,
com.liferay.portal.kernel.search.Sort.class
};
private static final Class>[]
_updateCommercePricingClassParameterTypes12 = new Class[] {
long.class, java.util.Map.class, java.util.Map.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
private static final Class>[]
_updateCommercePricingClassExternalReferenceCodeParameterTypes13 =
new Class[] {String.class, long.class};
}