001
014
015 package com.liferay.portal.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.service.PhoneServiceUtil;
020
021 import java.rmi.RemoteException;
022
023
063 public class PhoneServiceSoap {
064
068 public static com.liferay.portal.model.PhoneSoap addPhone(
069 java.lang.String className, long classPK, java.lang.String number,
070 java.lang.String extension, int typeId, boolean primary)
071 throws RemoteException {
072 try {
073 com.liferay.portal.model.Phone returnValue = PhoneServiceUtil.addPhone(className,
074 classPK, number, extension, typeId, primary);
075
076 return com.liferay.portal.model.PhoneSoap.toSoapModel(returnValue);
077 }
078 catch (Exception e) {
079 _log.error(e, e);
080
081 throw new RemoteException(e.getMessage());
082 }
083 }
084
085 public static com.liferay.portal.model.PhoneSoap addPhone(
086 java.lang.String className, long classPK, java.lang.String number,
087 java.lang.String extension, int typeId, boolean primary,
088 com.liferay.portal.service.ServiceContext serviceContext)
089 throws RemoteException {
090 try {
091 com.liferay.portal.model.Phone returnValue = PhoneServiceUtil.addPhone(className,
092 classPK, number, extension, typeId, primary, serviceContext);
093
094 return com.liferay.portal.model.PhoneSoap.toSoapModel(returnValue);
095 }
096 catch (Exception e) {
097 _log.error(e, e);
098
099 throw new RemoteException(e.getMessage());
100 }
101 }
102
103 public static void deletePhone(long phoneId) throws RemoteException {
104 try {
105 PhoneServiceUtil.deletePhone(phoneId);
106 }
107 catch (Exception e) {
108 _log.error(e, e);
109
110 throw new RemoteException(e.getMessage());
111 }
112 }
113
114 public static com.liferay.portal.model.PhoneSoap getPhone(long phoneId)
115 throws RemoteException {
116 try {
117 com.liferay.portal.model.Phone returnValue = PhoneServiceUtil.getPhone(phoneId);
118
119 return com.liferay.portal.model.PhoneSoap.toSoapModel(returnValue);
120 }
121 catch (Exception e) {
122 _log.error(e, e);
123
124 throw new RemoteException(e.getMessage());
125 }
126 }
127
128 public static com.liferay.portal.model.PhoneSoap[] getPhones(
129 java.lang.String className, long classPK) throws RemoteException {
130 try {
131 java.util.List<com.liferay.portal.model.Phone> returnValue = PhoneServiceUtil.getPhones(className,
132 classPK);
133
134 return com.liferay.portal.model.PhoneSoap.toSoapModels(returnValue);
135 }
136 catch (Exception e) {
137 _log.error(e, e);
138
139 throw new RemoteException(e.getMessage());
140 }
141 }
142
143 public static com.liferay.portal.model.PhoneSoap updatePhone(long phoneId,
144 java.lang.String number, java.lang.String extension, int typeId,
145 boolean primary) throws RemoteException {
146 try {
147 com.liferay.portal.model.Phone returnValue = PhoneServiceUtil.updatePhone(phoneId,
148 number, extension, typeId, primary);
149
150 return com.liferay.portal.model.PhoneSoap.toSoapModel(returnValue);
151 }
152 catch (Exception e) {
153 _log.error(e, e);
154
155 throw new RemoteException(e.getMessage());
156 }
157 }
158
159 private static Log _log = LogFactoryUtil.getLog(PhoneServiceSoap.class);
160 }