All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.liferay.commerce.product.service.http.CPDefinitionLinkServiceHttp Maven / Gradle / Ivy

There is a newer version: 6.0.152
Show 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.product.service.http;

import com.liferay.commerce.product.service.CPDefinitionLinkServiceUtil;
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
 * CPDefinitionLinkServiceUtil 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 CPDefinitionLinkServiceHttp { public static com.liferay.commerce.product.model.CPDefinitionLink addCPDefinitionLink( HttpPrincipal httpPrincipal, long cpDefinitionId, long cProductId, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, double priority, String type, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "addCPDefinitionLink", _addCPDefinitionLinkParameterTypes0); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, cProductId, displayDateMonth, displayDateDay, displayDateYear, displayDateHour, displayDateMinute, expirationDateMonth, expirationDateDay, expirationDateYear, expirationDateHour, expirationDateMinute, neverExpire, priority, type, 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.product.model.CPDefinitionLink) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static void deleteCPDefinitionLink( HttpPrincipal httpPrincipal, long cpDefinitionLinkId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "deleteCPDefinitionLink", _deleteCPDefinitionLinkParameterTypes1); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionLinkId); 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.product.model.CPDefinitionLink fetchCPDefinitionLink( HttpPrincipal httpPrincipal, long cpDefinitionLinkId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "fetchCPDefinitionLink", _fetchCPDefinitionLinkParameterTypes2); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionLinkId); 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.product.model.CPDefinitionLink) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.commerce.product.model.CPDefinitionLink fetchCPDefinitionLink( HttpPrincipal httpPrincipal, long cpDefinitionId, long cProductId, String type) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "fetchCPDefinitionLink", _fetchCPDefinitionLinkParameterTypes3); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, cProductId, type); 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.product.model.CPDefinitionLink) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.commerce.product.model.CPDefinitionLink getCPDefinitionLink( HttpPrincipal httpPrincipal, long cpDefinitionLinkId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLink", _getCPDefinitionLinkParameterTypes4); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionLinkId); 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.product.model.CPDefinitionLink) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static java.util.List getCPDefinitionLinks( HttpPrincipal httpPrincipal, long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinks", _getCPDefinitionLinksParameterTypes5); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId); 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 getCPDefinitionLinks( HttpPrincipal httpPrincipal, long cpDefinitionId, int status) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinks", _getCPDefinitionLinksParameterTypes6); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, status); 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 getCPDefinitionLinks( HttpPrincipal httpPrincipal, long cpDefinitionId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinks", _getCPDefinitionLinksParameterTypes7); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, start, end); 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 getCPDefinitionLinks( HttpPrincipal httpPrincipal, long cpDefinitionId, int status, int start, int end) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinks", _getCPDefinitionLinksParameterTypes8); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, status, start, end); 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 getCPDefinitionLinks( HttpPrincipal httpPrincipal, long cpDefinitionId, String type) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinks", _getCPDefinitionLinksParameterTypes9); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, type); 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 getCPDefinitionLinks( HttpPrincipal httpPrincipal, long cpDefinitionId, String type, int status) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinks", _getCPDefinitionLinksParameterTypes10); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, type, status); 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 getCPDefinitionLinks( HttpPrincipal httpPrincipal, long cpDefinitionId, String type, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinks", _getCPDefinitionLinksParameterTypes11); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, type, status, 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 getCPDefinitionLinks( HttpPrincipal httpPrincipal, long cpDefinitionId, String type, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinks", _getCPDefinitionLinksParameterTypes12); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, type, 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 getCPDefinitionLinksCount( HttpPrincipal httpPrincipal, long cpDefinitionId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinksCount", _getCPDefinitionLinksCountParameterTypes13); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId); 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 getCPDefinitionLinksCount( HttpPrincipal httpPrincipal, long cpDefinitionId, int status) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinksCount", _getCPDefinitionLinksCountParameterTypes14); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, status); 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 getCPDefinitionLinksCount( HttpPrincipal httpPrincipal, long cpDefinitionId, String type) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinksCount", _getCPDefinitionLinksCountParameterTypes15); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, type); 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 getCPDefinitionLinksCount( HttpPrincipal httpPrincipal, long cpDefinitionId, String type, int status) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "getCPDefinitionLinksCount", _getCPDefinitionLinksCountParameterTypes16); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, type, status); 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.commerce.product.model.CPDefinitionLink updateCPDefinitionLink( HttpPrincipal httpPrincipal, long cpDefinitionLinkId, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, double priority, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "updateCPDefinitionLink", _updateCPDefinitionLinkParameterTypes17); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionLinkId, displayDateMonth, displayDateDay, displayDateYear, displayDateHour, displayDateMinute, expirationDateMonth, expirationDateDay, expirationDateYear, expirationDateHour, expirationDateMinute, neverExpire, priority, 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.product.model.CPDefinitionLink) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static void updateCPDefinitionLinks( HttpPrincipal httpPrincipal, long cpDefinitionId, long[] cpDefinitionIds2, String type, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CPDefinitionLinkServiceUtil.class, "updateCPDefinitionLinks", _updateCPDefinitionLinksParameterTypes18); MethodHandler methodHandler = new MethodHandler( methodKey, cpDefinitionId, cpDefinitionIds2, type, serviceContext); 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; } } private static Log _log = LogFactoryUtil.getLog( CPDefinitionLinkServiceHttp.class); private static final Class[] _addCPDefinitionLinkParameterTypes0 = new Class[] { long.class, long.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class, boolean.class, double.class, String.class, com.liferay.portal.kernel.service.ServiceContext.class }; private static final Class[] _deleteCPDefinitionLinkParameterTypes1 = new Class[] {long.class}; private static final Class[] _fetchCPDefinitionLinkParameterTypes2 = new Class[] {long.class}; private static final Class[] _fetchCPDefinitionLinkParameterTypes3 = new Class[] {long.class, long.class, String.class}; private static final Class[] _getCPDefinitionLinkParameterTypes4 = new Class[] {long.class}; private static final Class[] _getCPDefinitionLinksParameterTypes5 = new Class[] {long.class}; private static final Class[] _getCPDefinitionLinksParameterTypes6 = new Class[] {long.class, int.class}; private static final Class[] _getCPDefinitionLinksParameterTypes7 = new Class[] {long.class, int.class, int.class}; private static final Class[] _getCPDefinitionLinksParameterTypes8 = new Class[] {long.class, int.class, int.class, int.class}; private static final Class[] _getCPDefinitionLinksParameterTypes9 = new Class[] {long.class, String.class}; private static final Class[] _getCPDefinitionLinksParameterTypes10 = new Class[] {long.class, String.class, int.class}; private static final Class[] _getCPDefinitionLinksParameterTypes11 = new Class[] { long.class, String.class, int.class, int.class, int.class, com.liferay.portal.kernel.util.OrderByComparator.class }; private static final Class[] _getCPDefinitionLinksParameterTypes12 = new Class[] { long.class, String.class, int.class, int.class, com.liferay.portal.kernel.util.OrderByComparator.class }; private static final Class[] _getCPDefinitionLinksCountParameterTypes13 = new Class[] {long.class}; private static final Class[] _getCPDefinitionLinksCountParameterTypes14 = new Class[] {long.class, int.class}; private static final Class[] _getCPDefinitionLinksCountParameterTypes15 = new Class[] {long.class, String.class}; private static final Class[] _getCPDefinitionLinksCountParameterTypes16 = new Class[] {long.class, String.class, int.class}; private static final Class[] _updateCPDefinitionLinkParameterTypes17 = new Class[] { long.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class, int.class, boolean.class, double.class, com.liferay.portal.kernel.service.ServiceContext.class }; private static final Class[] _updateCPDefinitionLinksParameterTypes18 = new Class[] { long.class, long[].class, String.class, com.liferay.portal.kernel.service.ServiceContext.class }; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy