com.liferay.wiki.service.http.WikiNodeServiceHttp 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.wiki.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.http.TunnelUtil;
import com.liferay.portal.kernel.util.MethodHandler;
import com.liferay.portal.kernel.util.MethodKey;
import com.liferay.wiki.service.WikiNodeServiceUtil;
/**
* Provides the HTTP utility for the
* WikiNodeServiceUtil
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
* @see WikiNodeServiceSoap
* @generated
*/
public class WikiNodeServiceHttp {
public static com.liferay.wiki.model.WikiNode addNode(
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(
WikiNodeServiceUtil.class, "addNode", _addNodeParameterTypes0);
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.wiki.model.WikiNode)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static void deleteNode(HttpPrincipal httpPrincipal, long nodeId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "deleteNode",
_deleteNodeParameterTypes1);
MethodHandler methodHandler = new MethodHandler(methodKey, nodeId);
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.wiki.model.WikiNode getNode(
HttpPrincipal httpPrincipal, long nodeId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "getNode", _getNodeParameterTypes2);
MethodHandler methodHandler = new MethodHandler(methodKey, nodeId);
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.wiki.model.WikiNode)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static com.liferay.wiki.model.WikiNode getNode(
HttpPrincipal httpPrincipal, long groupId, String name)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "getNode", _getNodeParameterTypes3);
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.wiki.model.WikiNode)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static java.util.List getNodes(
HttpPrincipal httpPrincipal, long groupId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "getNodes",
_getNodesParameterTypes4);
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 java.util.List getNodes(
HttpPrincipal httpPrincipal, long groupId, int status)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "getNodes",
_getNodesParameterTypes5);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, 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 getNodes(
HttpPrincipal httpPrincipal, long groupId, int start, int end) {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "getNodes",
_getNodesParameterTypes6);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, 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 java.util.List getNodes(
HttpPrincipal httpPrincipal, long groupId, int status, int start,
int end) {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "getNodes",
_getNodesParameterTypes7);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, status, 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 java.util.List getNodes(
HttpPrincipal httpPrincipal, long groupId, int status, int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator
orderByComparator) {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "getNodes",
_getNodesParameterTypes8);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, status, 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 getNodesCount(HttpPrincipal httpPrincipal, long groupId) {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "getNodesCount",
_getNodesCountParameterTypes9);
MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
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 getNodesCount(
HttpPrincipal httpPrincipal, long groupId, int status) {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "getNodesCount",
_getNodesCountParameterTypes10);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, status);
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 importPages(
HttpPrincipal httpPrincipal, long nodeId, String importer,
java.io.InputStream[] inputStreams,
java.util.Map options)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "importPages",
_importPagesParameterTypes11);
MethodHandler methodHandler = new MethodHandler(
methodKey, nodeId, importer, inputStreams, options);
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.wiki.model.WikiNode moveNodeToTrash(
HttpPrincipal httpPrincipal, long nodeId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "moveNodeToTrash",
_moveNodeToTrashParameterTypes12);
MethodHandler methodHandler = new MethodHandler(methodKey, nodeId);
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.wiki.model.WikiNode)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static void restoreNodeFromTrash(
HttpPrincipal httpPrincipal, long nodeId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "restoreNodeFromTrash",
_restoreNodeFromTrashParameterTypes13);
MethodHandler methodHandler = new MethodHandler(methodKey, nodeId);
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 subscribeNode(HttpPrincipal httpPrincipal, long nodeId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "subscribeNode",
_subscribeNodeParameterTypes14);
MethodHandler methodHandler = new MethodHandler(methodKey, nodeId);
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 unsubscribeNode(HttpPrincipal httpPrincipal, long nodeId)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "unsubscribeNode",
_unsubscribeNodeParameterTypes15);
MethodHandler methodHandler = new MethodHandler(methodKey, nodeId);
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.wiki.model.WikiNode updateNode(
HttpPrincipal httpPrincipal, long nodeId, String name,
String description,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "updateNode",
_updateNodeParameterTypes16);
MethodHandler methodHandler = new MethodHandler(
methodKey, nodeId, 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.wiki.model.WikiNode)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
private static Log _log = LogFactoryUtil.getLog(WikiNodeServiceHttp.class);
private static final Class>[] _addNodeParameterTypes0 = new Class[] {
String.class, String.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
private static final Class>[] _deleteNodeParameterTypes1 = new Class[] {
long.class
};
private static final Class>[] _getNodeParameterTypes2 = new Class[] {
long.class
};
private static final Class>[] _getNodeParameterTypes3 = new Class[] {
long.class, String.class
};
private static final Class>[] _getNodesParameterTypes4 = new Class[] {
long.class
};
private static final Class>[] _getNodesParameterTypes5 = new Class[] {
long.class, int.class
};
private static final Class>[] _getNodesParameterTypes6 = new Class[] {
long.class, int.class, int.class
};
private static final Class>[] _getNodesParameterTypes7 = new Class[] {
long.class, int.class, int.class, int.class
};
private static final Class>[] _getNodesParameterTypes8 = new Class[] {
long.class, int.class, int.class, int.class,
com.liferay.portal.kernel.util.OrderByComparator.class
};
private static final Class>[] _getNodesCountParameterTypes9 =
new Class[] {long.class};
private static final Class>[] _getNodesCountParameterTypes10 =
new Class[] {long.class, int.class};
private static final Class>[] _importPagesParameterTypes11 = new Class[] {
long.class, String.class, java.io.InputStream[].class,
java.util.Map.class
};
private static final Class>[] _moveNodeToTrashParameterTypes12 =
new Class[] {long.class};
private static final Class>[] _restoreNodeFromTrashParameterTypes13 =
new Class[] {long.class};
private static final Class>[] _subscribeNodeParameterTypes14 =
new Class[] {long.class};
private static final Class>[] _unsubscribeNodeParameterTypes15 =
new Class[] {long.class};
private static final Class>[] _updateNodeParameterTypes16 = new Class[] {
long.class, String.class, String.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
}