com.liferay.portal.service.http.TeamServiceHttp 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.TeamServiceUtil;
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
* TeamServiceUtil 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 TeamServiceHttp {
public static com.liferay.portal.kernel.model.Team addTeam(
HttpPrincipal httpPrincipal, long groupId, String name,
String description,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "addTeam", _addTeamParameterTypes0);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, 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.Team)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static void deleteTeam(HttpPrincipal httpPrincipal, long teamId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "deleteTeam",
_deleteTeamParameterTypes1);
MethodHandler methodHandler = new MethodHandler(methodKey, teamId);
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 java.util.List
getGroupTeams(HttpPrincipal httpPrincipal, long groupId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "getGroupTeams",
_getGroupTeamsParameterTypes2);
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 (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.Team getTeam(
HttpPrincipal httpPrincipal, long teamId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "getTeam", _getTeamParameterTypes3);
MethodHandler methodHandler = new MethodHandler(methodKey, teamId);
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.Team)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.portal.kernel.model.Team getTeam(
HttpPrincipal httpPrincipal, long groupId, String name)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "getTeam", _getTeamParameterTypes4);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, 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.Team)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static java.util.List
getUserTeams(HttpPrincipal httpPrincipal, long userId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "getUserTeams",
_getUserTeamsParameterTypes5);
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
getUserTeams(HttpPrincipal httpPrincipal, long userId, long groupId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "getUserTeams",
_getUserTeamsParameterTypes6);
MethodHandler methodHandler = new MethodHandler(
methodKey, userId, 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 (java.util.List)
returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static boolean hasUserTeam(
HttpPrincipal httpPrincipal, long userId, long teamId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "hasUserTeam",
_hasUserTeamParameterTypes7);
MethodHandler methodHandler = new MethodHandler(
methodKey, userId, teamId);
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 ((Boolean)returnObj).booleanValue();
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static java.util.List search(
HttpPrincipal httpPrincipal, long groupId, String name,
String description, java.util.LinkedHashMap params,
int start, int end,
com.liferay.portal.kernel.util.OrderByComparator
orderByComparator) {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "search", _searchParameterTypes8);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, name, description, 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 int searchCount(
HttpPrincipal httpPrincipal, long groupId, String name,
String description, java.util.LinkedHashMap params) {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "searchCount",
_searchCountParameterTypes9);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, name, description, 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 com.liferay.portal.kernel.model.Team updateTeam(
HttpPrincipal httpPrincipal, long teamId, String name,
String description)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
TeamServiceUtil.class, "updateTeam",
_updateTeamParameterTypes10);
MethodHandler methodHandler = new MethodHandler(
methodKey, teamId, name, description);
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.Team)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
private static Log _log = LogFactoryUtil.getLog(TeamServiceHttp.class);
private static final Class>[] _addTeamParameterTypes0 = new Class[] {
long.class, String.class, String.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
private static final Class>[] _deleteTeamParameterTypes1 = new Class[] {
long.class
};
private static final Class>[] _getGroupTeamsParameterTypes2 =
new Class[] {long.class};
private static final Class>[] _getTeamParameterTypes3 = new Class[] {
long.class
};
private static final Class>[] _getTeamParameterTypes4 = new Class[] {
long.class, String.class
};
private static final Class>[] _getUserTeamsParameterTypes5 = new Class[] {
long.class
};
private static final Class>[] _getUserTeamsParameterTypes6 = new Class[] {
long.class, long.class
};
private static final Class>[] _hasUserTeamParameterTypes7 = new Class[] {
long.class, long.class
};
private static final Class>[] _searchParameterTypes8 = new Class[] {
long.class, String.class, String.class, java.util.LinkedHashMap.class,
int.class, int.class,
com.liferay.portal.kernel.util.OrderByComparator.class
};
private static final Class>[] _searchCountParameterTypes9 = new Class[] {
long.class, String.class, String.class, java.util.LinkedHashMap.class
};
private static final Class>[] _updateTeamParameterTypes10 = new Class[] {
long.class, String.class, String.class
};
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy