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

com.liferay.portal.service.http.UserGroupServiceHttp 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.portal.service.http;

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.UserGroupServiceUtil;
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
 * UserGroupServiceUtil 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 UserGroupServiceHttp { public static void addGroupUserGroups( HttpPrincipal httpPrincipal, long groupId, long[] userGroupIds) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "addGroupUserGroups", _addGroupUserGroupsParameterTypes0); MethodHandler methodHandler = new MethodHandler( methodKey, groupId, userGroupIds); 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.portal.kernel.model.UserGroup addOrUpdateUserGroup( HttpPrincipal httpPrincipal, String externalReferenceCode, String name, String description, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "addOrUpdateUserGroup", _addOrUpdateUserGroupParameterTypes1); MethodHandler methodHandler = new MethodHandler( methodKey, externalReferenceCode, name, description, 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.portal.kernel.model.UserGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static void addTeamUserGroups( HttpPrincipal httpPrincipal, long teamId, long[] userGroupIds) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "addTeamUserGroups", _addTeamUserGroupsParameterTypes2); MethodHandler methodHandler = new MethodHandler( methodKey, teamId, userGroupIds); 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.portal.kernel.model.UserGroup addUserGroup( HttpPrincipal httpPrincipal, String name, String description, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "addUserGroup", _addUserGroupParameterTypes3); MethodHandler methodHandler = new MethodHandler( methodKey, name, description, 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.portal.kernel.model.UserGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static void deleteUserGroup( HttpPrincipal httpPrincipal, long userGroupId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "deleteUserGroup", _deleteUserGroupParameterTypes4); MethodHandler methodHandler = new MethodHandler( methodKey, userGroupId); 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.portal.kernel.model.UserGroup fetchUserGroup( HttpPrincipal httpPrincipal, long userGroupId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "fetchUserGroup", _fetchUserGroupParameterTypes5); MethodHandler methodHandler = new MethodHandler( methodKey, userGroupId); 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.model.UserGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.portal.kernel.model.UserGroup fetchUserGroupByExternalReferenceCode( HttpPrincipal httpPrincipal, long companyId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "fetchUserGroupByExternalReferenceCode", _fetchUserGroupByExternalReferenceCodeParameterTypes6); 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.portal.kernel.model.UserGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static java.util.List getGtUserGroups( HttpPrincipal httpPrincipal, long gtUserGroupId, long companyId, long parentUserGroupId, int size) { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "getGtUserGroups", _getGtUserGroupsParameterTypes7); MethodHandler methodHandler = new MethodHandler( methodKey, gtUserGroupId, companyId, parentUserGroupId, size); 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 com.liferay.portal.kernel.model.UserGroup getUserGroup( HttpPrincipal httpPrincipal, long userGroupId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "getUserGroup", _getUserGroupParameterTypes8); MethodHandler methodHandler = new MethodHandler( methodKey, userGroupId); 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.model.UserGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.portal.kernel.model.UserGroup getUserGroup( HttpPrincipal httpPrincipal, String name) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "getUserGroup", _getUserGroupParameterTypes9); MethodHandler methodHandler = new MethodHandler(methodKey, name); 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.model.UserGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static java.util.List getUserGroups(HttpPrincipal httpPrincipal, long companyId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "getUserGroups", _getUserGroupsParameterTypes10); 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 getUserGroups( HttpPrincipal httpPrincipal, long companyId, String name, int start, int end) { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "getUserGroups", _getUserGroupsParameterTypes11); MethodHandler methodHandler = new MethodHandler( methodKey, companyId, 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 getUserGroupsCount( HttpPrincipal httpPrincipal, long companyId, String name) { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "getUserGroupsCount", _getUserGroupsCountParameterTypes12); MethodHandler methodHandler = new MethodHandler( methodKey, companyId, 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; } } public static java.util.List getUserUserGroups(HttpPrincipal httpPrincipal, long userId) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "getUserUserGroups", _getUserUserGroupsParameterTypes13); MethodHandler methodHandler = new MethodHandler(methodKey, userId); 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 search( HttpPrincipal httpPrincipal, long companyId, String keywords, java.util.LinkedHashMap params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "search", _searchParameterTypes14); MethodHandler methodHandler = new MethodHandler( methodKey, companyId, keywords, params, start, end, orderByComparator); 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 java.util.List search( HttpPrincipal httpPrincipal, long companyId, String name, String description, java.util.LinkedHashMap params, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "search", _searchParameterTypes15); MethodHandler methodHandler = new MethodHandler( methodKey, companyId, name, description, params, andOperator, start, end, orderByComparator); 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 searchCount( HttpPrincipal httpPrincipal, long companyId, String keywords, java.util.LinkedHashMap params) { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "searchCount", _searchCountParameterTypes16); MethodHandler methodHandler = new MethodHandler( methodKey, companyId, keywords, params); 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; } } public static int searchCount( HttpPrincipal httpPrincipal, long companyId, String name, String description, java.util.LinkedHashMap params, boolean andOperator) { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "searchCount", _searchCountParameterTypes17); MethodHandler methodHandler = new MethodHandler( methodKey, companyId, name, description, params, andOperator); 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; } } public static void unsetGroupUserGroups( HttpPrincipal httpPrincipal, long groupId, long[] userGroupIds) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "unsetGroupUserGroups", _unsetGroupUserGroupsParameterTypes18); MethodHandler methodHandler = new MethodHandler( methodKey, groupId, userGroupIds); 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 unsetTeamUserGroups( HttpPrincipal httpPrincipal, long teamId, long[] userGroupIds) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "unsetTeamUserGroups", _unsetTeamUserGroupsParameterTypes19); MethodHandler methodHandler = new MethodHandler( methodKey, teamId, userGroupIds); 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.portal.kernel.model.UserGroup updateExternalReferenceCode( HttpPrincipal httpPrincipal, com.liferay.portal.kernel.model.UserGroup userGroup, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "updateExternalReferenceCode", _updateExternalReferenceCodeParameterTypes20); MethodHandler methodHandler = new MethodHandler( methodKey, userGroup, 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.portal.kernel.model.UserGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } public static com.liferay.portal.kernel.model.UserGroup updateUserGroup( HttpPrincipal httpPrincipal, long userGroupId, String name, String description, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException { try { MethodKey methodKey = new MethodKey( UserGroupServiceUtil.class, "updateUserGroup", _updateUserGroupParameterTypes21); MethodHandler methodHandler = new MethodHandler( methodKey, userGroupId, name, description, 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.portal.kernel.model.UserGroup)returnObj; } catch (com.liferay.portal.kernel.exception.SystemException systemException) { _log.error(systemException, systemException); throw systemException; } } private static Log _log = LogFactoryUtil.getLog(UserGroupServiceHttp.class); private static final Class[] _addGroupUserGroupsParameterTypes0 = new Class[] {long.class, long[].class}; private static final Class[] _addOrUpdateUserGroupParameterTypes1 = new Class[] { String.class, String.class, String.class, com.liferay.portal.kernel.service.ServiceContext.class }; private static final Class[] _addTeamUserGroupsParameterTypes2 = new Class[] {long.class, long[].class}; private static final Class[] _addUserGroupParameterTypes3 = new Class[] { String.class, String.class, com.liferay.portal.kernel.service.ServiceContext.class }; private static final Class[] _deleteUserGroupParameterTypes4 = new Class[] {long.class}; private static final Class[] _fetchUserGroupParameterTypes5 = new Class[] {long.class}; private static final Class[] _fetchUserGroupByExternalReferenceCodeParameterTypes6 = new Class[] { long.class, String.class }; private static final Class[] _getGtUserGroupsParameterTypes7 = new Class[] {long.class, long.class, long.class, int.class}; private static final Class[] _getUserGroupParameterTypes8 = new Class[] { long.class }; private static final Class[] _getUserGroupParameterTypes9 = new Class[] { String.class }; private static final Class[] _getUserGroupsParameterTypes10 = new Class[] {long.class}; private static final Class[] _getUserGroupsParameterTypes11 = new Class[] {long.class, String.class, int.class, int.class}; private static final Class[] _getUserGroupsCountParameterTypes12 = new Class[] {long.class, String.class}; private static final Class[] _getUserUserGroupsParameterTypes13 = new Class[] {long.class}; private static final Class[] _searchParameterTypes14 = new Class[] { long.class, String.class, java.util.LinkedHashMap.class, int.class, int.class, com.liferay.portal.kernel.util.OrderByComparator.class }; private static final Class[] _searchParameterTypes15 = new Class[] { long.class, String.class, String.class, java.util.LinkedHashMap.class, boolean.class, int.class, int.class, com.liferay.portal.kernel.util.OrderByComparator.class }; private static final Class[] _searchCountParameterTypes16 = new Class[] { long.class, String.class, java.util.LinkedHashMap.class }; private static final Class[] _searchCountParameterTypes17 = new Class[] { long.class, String.class, String.class, java.util.LinkedHashMap.class, boolean.class }; private static final Class[] _unsetGroupUserGroupsParameterTypes18 = new Class[] {long.class, long[].class}; private static final Class[] _unsetTeamUserGroupsParameterTypes19 = new Class[] {long.class, long[].class}; private static final Class[] _updateExternalReferenceCodeParameterTypes20 = new Class[] { com.liferay.portal.kernel.model.UserGroup.class, String.class }; private static final Class[] _updateUserGroupParameterTypes21 = new Class[] { long.class, String.class, String.class, com.liferay.portal.kernel.service.ServiceContext.class }; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy