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

com.liferay.account.service.http.AccountGroupServiceHttp Maven / Gradle / Ivy

There is a newer version: 2.0.134
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.account.service.http;

import com.liferay.account.service.AccountGroupServiceUtil;
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
 * AccountGroupServiceUtil 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 Brian Wing Shun Chan * @generated */ public class AccountGroupServiceHttp { public static com.liferay.account.model.AccountGroup addAccountGroup( HttpPrincipal httpPrincipal, long userId, String description, String name, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( AccountGroupServiceUtil.class, "addAccountGroup", _addAccountGroupParameterTypes0); MethodHandler methodHandler = new MethodHandler( methodKey, userId, description, name, 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.account.model.AccountGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.account.model.AccountGroup deleteAccountGroup( HttpPrincipal httpPrincipal, long accountGroupId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( AccountGroupServiceUtil.class, "deleteAccountGroup", _deleteAccountGroupParameterTypes1); MethodHandler methodHandler = new MethodHandler( methodKey, accountGroupId); 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.account.model.AccountGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static void deleteAccountGroups( HttpPrincipal httpPrincipal, long[] accountGroupIds) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( AccountGroupServiceUtil.class, "deleteAccountGroups", _deleteAccountGroupsParameterTypes2); MethodHandler methodHandler = new MethodHandler( methodKey, accountGroupIds); 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.account.model.AccountGroup fetchAccountGroupByExternalReferenceCode( HttpPrincipal httpPrincipal, String externalReferenceCode, long companyId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( AccountGroupServiceUtil.class, "fetchAccountGroupByExternalReferenceCode", _fetchAccountGroupByExternalReferenceCodeParameterTypes3); 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.account.model.AccountGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.account.model.AccountGroup getAccountGroup( HttpPrincipal httpPrincipal, long accountGroupId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( AccountGroupServiceUtil.class, "getAccountGroup", _getAccountGroupParameterTypes4); MethodHandler methodHandler = new MethodHandler( methodKey, accountGroupId); 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.account.model.AccountGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static java.util.List getAccountGroupsByAccountEntryId( HttpPrincipal httpPrincipal, long accountEntryId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( AccountGroupServiceUtil.class, "getAccountGroupsByAccountEntryId", _getAccountGroupsByAccountEntryIdParameterTypes5); MethodHandler methodHandler = new MethodHandler( methodKey, accountEntryId, 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 int getAccountGroupsCountByAccountEntryId( HttpPrincipal httpPrincipal, long accountEntryId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( AccountGroupServiceUtil.class, "getAccountGroupsCountByAccountEntryId", _getAccountGroupsCountByAccountEntryIdParameterTypes6); MethodHandler methodHandler = new MethodHandler( methodKey, accountEntryId); 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 searchAccountGroups( HttpPrincipal httpPrincipal, long companyId, String keywords, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( AccountGroupServiceUtil.class, "searchAccountGroups", _searchAccountGroupsParameterTypes7); MethodHandler methodHandler = new MethodHandler( methodKey, companyId, keywords, 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 (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.account.model.AccountGroup updateAccountGroup( HttpPrincipal httpPrincipal, long accountGroupId, String description, String name, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( AccountGroupServiceUtil.class, "updateAccountGroup", _updateAccountGroupParameterTypes8); MethodHandler methodHandler = new MethodHandler( methodKey, accountGroupId, description, name, 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.account.model.AccountGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.account.model.AccountGroup updateExternalReferenceCode( HttpPrincipal httpPrincipal, long accountGroupId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( AccountGroupServiceUtil.class, "updateExternalReferenceCode", _updateExternalReferenceCodeParameterTypes9); MethodHandler methodHandler = new MethodHandler( methodKey, accountGroupId, 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.account.model.AccountGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } private static Log _log = LogFactoryUtil.getLog( AccountGroupServiceHttp.class); private static final Class[] _addAccountGroupParameterTypes0 = new Class[] { long.class, String.class, String.class, com.liferay.portal.kernel.service.ServiceContext.class }; private static final Class[] _deleteAccountGroupParameterTypes1 = new Class[] {long.class}; private static final Class[] _deleteAccountGroupsParameterTypes2 = new Class[] {long[].class}; private static final Class[] _fetchAccountGroupByExternalReferenceCodeParameterTypes3 = new Class[] { String.class, long.class }; private static final Class[] _getAccountGroupParameterTypes4 = new Class[] {long.class}; private static final Class[] _getAccountGroupsByAccountEntryIdParameterTypes5 = new Class[] { long.class, int.class, int.class }; private static final Class[] _getAccountGroupsCountByAccountEntryIdParameterTypes6 = new Class[] { long.class }; private static final Class[] _searchAccountGroupsParameterTypes7 = new Class[] { long.class, String.class, int.class, int.class, com.liferay.portal.kernel.util.OrderByComparator.class }; private static final Class[] _updateAccountGroupParameterTypes8 = new Class[] { long.class, String.class, String.class, com.liferay.portal.kernel.service.ServiceContext.class }; private static final Class[] _updateExternalReferenceCodeParameterTypes9 = new Class[] { long.class, String.class }; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy