
com.liferay.wiki.service.http.WikiNodeServiceHttp Maven / Gradle / Ivy
/**
* 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.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
* @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 com.liferay.wiki.model.WikiNode addNode(
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(
WikiNodeServiceUtil.class, "addNode", _addNodeParameterTypes1);
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.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",
_deleteNodeParameterTypes2);
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", _getNodeParameterTypes3);
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", _getNodeParameterTypes4);
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",
_getNodesParameterTypes5);
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",
_getNodesParameterTypes6);
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",
_getNodesParameterTypes7);
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",
_getNodesParameterTypes8);
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",
_getNodesParameterTypes9);
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",
_getNodesCountParameterTypes10);
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",
_getNodesCountParameterTypes11);
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 com.liferay.wiki.model.WikiNode
getWikiNodeByExternalReferenceCode(
HttpPrincipal httpPrincipal, long groupId,
String externalReferenceCode)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "getWikiNodeByExternalReferenceCode",
_getWikiNodeByExternalReferenceCodeParameterTypes12);
MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, 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.wiki.model.WikiNode)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException
systemException) {
_log.error(systemException, systemException);
throw systemException;
}
}
public static void importPages(
HttpPrincipal httpPrincipal, long nodeId,
java.io.InputStream[] inputStreams,
java.util.Map options)
throws com.liferay.portal.kernel.exception.PortalException {
try {
MethodKey methodKey = new MethodKey(
WikiNodeServiceUtil.class, "importPages",
_importPagesParameterTypes13);
MethodHandler methodHandler = new MethodHandler(
methodKey, nodeId, 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",
_moveNodeToTrashParameterTypes14);
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",
_restoreNodeFromTrashParameterTypes15);
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",
_subscribeNodeParameterTypes16);
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",
_unsubscribeNodeParameterTypes17);
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",
_updateNodeParameterTypes18);
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>[] _addNodeParameterTypes1 = new Class[] {
String.class, String.class, String.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
private static final Class>[] _deleteNodeParameterTypes2 = new Class[] {
long.class
};
private static final Class>[] _getNodeParameterTypes3 = new Class[] {
long.class
};
private static final Class>[] _getNodeParameterTypes4 = new Class[] {
long.class, String.class
};
private static final Class>[] _getNodesParameterTypes5 = new Class[] {
long.class
};
private static final Class>[] _getNodesParameterTypes6 = new Class[] {
long.class, int.class
};
private static final Class>[] _getNodesParameterTypes7 = new Class[] {
long.class, int.class, int.class
};
private static final Class>[] _getNodesParameterTypes8 = new Class[] {
long.class, int.class, int.class, int.class
};
private static final Class>[] _getNodesParameterTypes9 = new Class[] {
long.class, int.class, int.class, int.class,
com.liferay.portal.kernel.util.OrderByComparator.class
};
private static final Class>[] _getNodesCountParameterTypes10 =
new Class[] {long.class};
private static final Class>[] _getNodesCountParameterTypes11 =
new Class[] {long.class, int.class};
private static final Class>[]
_getWikiNodeByExternalReferenceCodeParameterTypes12 = new Class[] {
long.class, String.class
};
private static final Class>[] _importPagesParameterTypes13 = new Class[] {
long.class, java.io.InputStream[].class, java.util.Map.class
};
private static final Class>[] _moveNodeToTrashParameterTypes14 =
new Class[] {long.class};
private static final Class>[] _restoreNodeFromTrashParameterTypes15 =
new Class[] {long.class};
private static final Class>[] _subscribeNodeParameterTypes16 =
new Class[] {long.class};
private static final Class>[] _unsubscribeNodeParameterTypes17 =
new Class[] {long.class};
private static final Class>[] _updateNodeParameterTypes18 = new Class[] {
long.class, String.class, String.class,
com.liferay.portal.kernel.service.ServiceContext.class
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy