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

com.liferay.commerce.product.service.http.CommerceChannelServiceHttp 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.product.service.http;

import com.liferay.commerce.product.service.CommerceChannelServiceUtil;
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
 * CommerceChannelServiceUtil 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 * @see CommerceChannelServiceSoap * @generated */ public class CommerceChannelServiceHttp { public static com.liferay.commerce.product.model.CommerceChannel addCommerceChannel( HttpPrincipal httpPrincipal, long siteGroupId, String name, String type, com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties, String commerceCurrencyCode, String externalReferenceCode, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "addCommerceChannel", _addCommerceChannelParameterTypes0); MethodHandler methodHandler = new MethodHandler( methodKey, siteGroupId, name, type, typeSettingsProperties, commerceCurrencyCode, externalReferenceCode, 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.CommerceChannel) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.commerce.product.model.CommerceChannel deleteCommerceChannel( HttpPrincipal httpPrincipal, long commerceChannelId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "deleteCommerceChannel", _deleteCommerceChannelParameterTypes1); MethodHandler methodHandler = new MethodHandler( methodKey, commerceChannelId); 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.CommerceChannel) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.commerce.product.model.CommerceChannel fetchByExternalReferenceCode( HttpPrincipal httpPrincipal, long companyId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.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.product.model.CommerceChannel) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.commerce.product.model.CommerceChannel fetchCommerceChannel( HttpPrincipal httpPrincipal, long commerceChannelId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "fetchCommerceChannel", _fetchCommerceChannelParameterTypes3); MethodHandler methodHandler = new MethodHandler( methodKey, commerceChannelId); 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.CommerceChannel) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.commerce.product.model.CommerceChannel getCommerceChannel( HttpPrincipal httpPrincipal, long commerceChannelId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "getCommerceChannel", _getCommerceChannelParameterTypes4); MethodHandler methodHandler = new MethodHandler( methodKey, commerceChannelId); 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.CommerceChannel) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.commerce.product.model.CommerceChannel getCommerceChannelByOrderGroupId( HttpPrincipal httpPrincipal, long groupId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "getCommerceChannelByOrderGroupId", _getCommerceChannelByOrderGroupIdParameterTypes5); MethodHandler methodHandler = new MethodHandler(methodKey, groupId); 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.CommerceChannel) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static java.util.List getCommerceChannels( HttpPrincipal httpPrincipal, int start, int end) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "getCommerceChannels", _getCommerceChannelsParameterTypes6); MethodHandler methodHandler = new MethodHandler( methodKey, 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 getCommerceChannels(HttpPrincipal httpPrincipal, long companyId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "getCommerceChannels", _getCommerceChannelsParameterTypes7); 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 (java.util.List )returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static java.util.List searchCommerceChannels( HttpPrincipal httpPrincipal, long companyId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "searchCommerceChannels", _searchCommerceChannelsParameterTypes8); 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 (java.util.List )returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static java.util.List searchCommerceChannels( 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( CommerceChannelServiceUtil.class, "searchCommerceChannels", _searchCommerceChannelsParameterTypes9); 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 (java.util.List )returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static int searchCommerceChannelsCount( HttpPrincipal httpPrincipal, long companyId, String keywords) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "searchCommerceChannelsCount", _searchCommerceChannelsCountParameterTypes10); MethodHandler methodHandler = new MethodHandler( methodKey, companyId, keywords); 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.CommerceChannel updateCommerceChannel( HttpPrincipal httpPrincipal, long commerceChannelId, long siteGroupId, String name, String type, com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties, String commerceCurrencyCode) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "updateCommerceChannel", _updateCommerceChannelParameterTypes11); MethodHandler methodHandler = new MethodHandler( methodKey, commerceChannelId, siteGroupId, name, type, typeSettingsProperties, commerceCurrencyCode); 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.CommerceChannel) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.commerce.product.model.CommerceChannel updateCommerceChannel( HttpPrincipal httpPrincipal, long commerceChannelId, long siteGroupId, String name, String type, com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties, String commerceCurrencyCode, String priceDisplayType, boolean discountsTargetNetPrice) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "updateCommerceChannel", _updateCommerceChannelParameterTypes12); MethodHandler methodHandler = new MethodHandler( methodKey, commerceChannelId, siteGroupId, name, type, typeSettingsProperties, commerceCurrencyCode, priceDisplayType, discountsTargetNetPrice); 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.CommerceChannel) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.commerce.product.model.CommerceChannel updateCommerceChannelExternalReferenceCode( HttpPrincipal httpPrincipal, long commerceChannelId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( CommerceChannelServiceUtil.class, "updateCommerceChannelExternalReferenceCode", _updateCommerceChannelExternalReferenceCodeParameterTypes13); MethodHandler methodHandler = new MethodHandler( methodKey, commerceChannelId, 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.product.model.CommerceChannel) returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } private static Log _log = LogFactoryUtil.getLog( CommerceChannelServiceHttp.class); private static final Class[] _addCommerceChannelParameterTypes0 = new Class[] { long.class, String.class, String.class, com.liferay.portal.kernel.util.UnicodeProperties.class, String.class, String.class, com.liferay.portal.kernel.service.ServiceContext.class }; private static final Class[] _deleteCommerceChannelParameterTypes1 = new Class[] {long.class}; private static final Class[] _fetchByExternalReferenceCodeParameterTypes2 = new Class[] { long.class, String.class }; private static final Class[] _fetchCommerceChannelParameterTypes3 = new Class[] {long.class}; private static final Class[] _getCommerceChannelParameterTypes4 = new Class[] {long.class}; private static final Class[] _getCommerceChannelByOrderGroupIdParameterTypes5 = new Class[] { long.class }; private static final Class[] _getCommerceChannelsParameterTypes6 = new Class[] {int.class, int.class}; private static final Class[] _getCommerceChannelsParameterTypes7 = new Class[] {long.class}; private static final Class[] _searchCommerceChannelsParameterTypes8 = new Class[] {long.class}; private static final Class[] _searchCommerceChannelsParameterTypes9 = new Class[] { long.class, String.class, int.class, int.class, com.liferay.portal.kernel.search.Sort.class }; private static final Class[] _searchCommerceChannelsCountParameterTypes10 = new Class[] { long.class, String.class }; private static final Class[] _updateCommerceChannelParameterTypes11 = new Class[] { long.class, long.class, String.class, String.class, com.liferay.portal.kernel.util.UnicodeProperties.class, String.class }; private static final Class[] _updateCommerceChannelParameterTypes12 = new Class[] { long.class, long.class, String.class, String.class, com.liferay.portal.kernel.util.UnicodeProperties.class, String.class, String.class, boolean.class }; private static final Class[] _updateCommerceChannelExternalReferenceCodeParameterTypes13 = new Class[] {long.class, String.class}; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy