001
014
015 package com.liferay.portlet.dynamicdatalists.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.LocaleUtil;
022
023 import com.liferay.portlet.dynamicdatalists.service.DDLRecordServiceUtil;
024
025 import java.rmi.RemoteException;
026
027
067 @ProviderType
068 public class DDLRecordServiceSoap {
069 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSoap addRecord(
070 long groupId, long recordSetId, int displayIndex,
071 com.liferay.portlet.dynamicdatamapping.storage.DDMFormValues ddmFormValues,
072 com.liferay.portal.service.ServiceContext serviceContext)
073 throws RemoteException {
074 try {
075 com.liferay.portlet.dynamicdatalists.model.DDLRecord returnValue = DDLRecordServiceUtil.addRecord(groupId,
076 recordSetId, displayIndex, ddmFormValues, serviceContext);
077
078 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSoap.toSoapModel(returnValue);
079 }
080 catch (Exception e) {
081 _log.error(e, e);
082
083 throw new RemoteException(e.getMessage());
084 }
085 }
086
087 public static void deleteRecord(long recordId) throws RemoteException {
088 try {
089 DDLRecordServiceUtil.deleteRecord(recordId);
090 }
091 catch (Exception e) {
092 _log.error(e, e);
093
094 throw new RemoteException(e.getMessage());
095 }
096 }
097
098 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSoap deleteRecordLocale(
099 long recordId, String locale,
100 com.liferay.portal.service.ServiceContext serviceContext)
101 throws RemoteException {
102 try {
103 com.liferay.portlet.dynamicdatalists.model.DDLRecord returnValue = DDLRecordServiceUtil.deleteRecordLocale(recordId,
104 LocaleUtil.fromLanguageId(locale), serviceContext);
105
106 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSoap.toSoapModel(returnValue);
107 }
108 catch (Exception e) {
109 _log.error(e, e);
110
111 throw new RemoteException(e.getMessage());
112 }
113 }
114
115 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSoap getRecord(
116 long recordId) throws RemoteException {
117 try {
118 com.liferay.portlet.dynamicdatalists.model.DDLRecord returnValue = DDLRecordServiceUtil.getRecord(recordId);
119
120 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSoap.toSoapModel(returnValue);
121 }
122 catch (Exception e) {
123 _log.error(e, e);
124
125 throw new RemoteException(e.getMessage());
126 }
127 }
128
129 public static void revertRecord(long recordId, java.lang.String version,
130 com.liferay.portal.service.ServiceContext serviceContext)
131 throws RemoteException {
132 try {
133 DDLRecordServiceUtil.revertRecord(recordId, version, serviceContext);
134 }
135 catch (Exception e) {
136 _log.error(e, e);
137
138 throw new RemoteException(e.getMessage());
139 }
140 }
141
142
146 @Deprecated
147 public static void revertRecordVersion(long recordId,
148 java.lang.String version,
149 com.liferay.portal.service.ServiceContext serviceContext)
150 throws RemoteException {
151 try {
152 DDLRecordServiceUtil.revertRecordVersion(recordId, version,
153 serviceContext);
154 }
155 catch (Exception e) {
156 _log.error(e, e);
157
158 throw new RemoteException(e.getMessage());
159 }
160 }
161
162 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSoap updateRecord(
163 long recordId, boolean majorVersion, int displayIndex,
164 com.liferay.portlet.dynamicdatamapping.storage.DDMFormValues ddmFormValues,
165 com.liferay.portal.service.ServiceContext serviceContext)
166 throws RemoteException {
167 try {
168 com.liferay.portlet.dynamicdatalists.model.DDLRecord returnValue = DDLRecordServiceUtil.updateRecord(recordId,
169 majorVersion, displayIndex, ddmFormValues, serviceContext);
170
171 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSoap.toSoapModel(returnValue);
172 }
173 catch (Exception e) {
174 _log.error(e, e);
175
176 throw new RemoteException(e.getMessage());
177 }
178 }
179
180 private static Log _log = LogFactoryUtil.getLog(DDLRecordServiceSoap.class);
181 }