001
014
015 package com.liferay.portal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.util.MethodHandler;
022 import com.liferay.portal.kernel.util.MethodKey;
023 import com.liferay.portal.security.auth.HttpPrincipal;
024 import com.liferay.portal.service.ExportImportConfigurationServiceUtil;
025
026
054 @ProviderType
055 public class ExportImportConfigurationServiceHttp {
056 public static void deleteExportImportConfiguration(
057 HttpPrincipal httpPrincipal, long exportImportConfigurationId)
058 throws com.liferay.portal.kernel.exception.PortalException {
059 try {
060 MethodKey methodKey = new MethodKey(ExportImportConfigurationServiceUtil.class,
061 "deleteExportImportConfiguration",
062 _deleteExportImportConfigurationParameterTypes0);
063
064 MethodHandler methodHandler = new MethodHandler(methodKey,
065 exportImportConfigurationId);
066
067 try {
068 TunnelUtil.invoke(httpPrincipal, methodHandler);
069 }
070 catch (Exception e) {
071 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
072 throw (com.liferay.portal.kernel.exception.PortalException)e;
073 }
074
075 throw new com.liferay.portal.kernel.exception.SystemException(e);
076 }
077 }
078 catch (com.liferay.portal.kernel.exception.SystemException se) {
079 _log.error(se, se);
080
081 throw se;
082 }
083 }
084
085 public static com.liferay.portal.model.ExportImportConfiguration moveExportImportConfigurationToTrash(
086 HttpPrincipal httpPrincipal, long exportImportConfigurationId)
087 throws com.liferay.portal.kernel.exception.PortalException {
088 try {
089 MethodKey methodKey = new MethodKey(ExportImportConfigurationServiceUtil.class,
090 "moveExportImportConfigurationToTrash",
091 _moveExportImportConfigurationToTrashParameterTypes1);
092
093 MethodHandler methodHandler = new MethodHandler(methodKey,
094 exportImportConfigurationId);
095
096 Object returnObj = null;
097
098 try {
099 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
100 }
101 catch (Exception e) {
102 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
103 throw (com.liferay.portal.kernel.exception.PortalException)e;
104 }
105
106 throw new com.liferay.portal.kernel.exception.SystemException(e);
107 }
108
109 return (com.liferay.portal.model.ExportImportConfiguration)returnObj;
110 }
111 catch (com.liferay.portal.kernel.exception.SystemException se) {
112 _log.error(se, se);
113
114 throw se;
115 }
116 }
117
118 public static com.liferay.portal.model.ExportImportConfiguration restoreExportImportConfigurationFromTrash(
119 HttpPrincipal httpPrincipal, long exportImportConfigurationId)
120 throws com.liferay.portal.kernel.exception.PortalException {
121 try {
122 MethodKey methodKey = new MethodKey(ExportImportConfigurationServiceUtil.class,
123 "restoreExportImportConfigurationFromTrash",
124 _restoreExportImportConfigurationFromTrashParameterTypes2);
125
126 MethodHandler methodHandler = new MethodHandler(methodKey,
127 exportImportConfigurationId);
128
129 Object returnObj = null;
130
131 try {
132 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
133 }
134 catch (Exception e) {
135 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
136 throw (com.liferay.portal.kernel.exception.PortalException)e;
137 }
138
139 throw new com.liferay.portal.kernel.exception.SystemException(e);
140 }
141
142 return (com.liferay.portal.model.ExportImportConfiguration)returnObj;
143 }
144 catch (com.liferay.portal.kernel.exception.SystemException se) {
145 _log.error(se, se);
146
147 throw se;
148 }
149 }
150
151 private static Log _log = LogFactoryUtil.getLog(ExportImportConfigurationServiceHttp.class);
152 private static final Class<?>[] _deleteExportImportConfigurationParameterTypes0 =
153 new Class[] { long.class };
154 private static final Class<?>[] _moveExportImportConfigurationToTrashParameterTypes1 =
155 new Class[] { long.class };
156 private static final Class<?>[] _restoreExportImportConfigurationFromTrashParameterTypes2 =
157 new Class[] { long.class };
158 }