1
14
15 package com.liferay.portal.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.service.PhoneServiceUtil;
20
21 import java.rmi.RemoteException;
22
23
73 public class PhoneServiceSoap {
74 public static com.liferay.portal.model.PhoneSoap addPhone(
75 java.lang.String className, long classPK, java.lang.String number,
76 java.lang.String extension, int typeId, boolean primary)
77 throws RemoteException {
78 try {
79 com.liferay.portal.model.Phone returnValue = PhoneServiceUtil.addPhone(className,
80 classPK, number, extension, typeId, primary);
81
82 return com.liferay.portal.model.PhoneSoap.toSoapModel(returnValue);
83 }
84 catch (Exception e) {
85 _log.error(e, e);
86
87 throw new RemoteException(e.getMessage());
88 }
89 }
90
91 public static void deletePhone(long phoneId) throws RemoteException {
92 try {
93 PhoneServiceUtil.deletePhone(phoneId);
94 }
95 catch (Exception e) {
96 _log.error(e, e);
97
98 throw new RemoteException(e.getMessage());
99 }
100 }
101
102 public static com.liferay.portal.model.PhoneSoap getPhone(long phoneId)
103 throws RemoteException {
104 try {
105 com.liferay.portal.model.Phone returnValue = PhoneServiceUtil.getPhone(phoneId);
106
107 return com.liferay.portal.model.PhoneSoap.toSoapModel(returnValue);
108 }
109 catch (Exception e) {
110 _log.error(e, e);
111
112 throw new RemoteException(e.getMessage());
113 }
114 }
115
116 public static com.liferay.portal.model.PhoneSoap[] getPhones(
117 java.lang.String className, long classPK) throws RemoteException {
118 try {
119 java.util.List<com.liferay.portal.model.Phone> returnValue = PhoneServiceUtil.getPhones(className,
120 classPK);
121
122 return com.liferay.portal.model.PhoneSoap.toSoapModels(returnValue);
123 }
124 catch (Exception e) {
125 _log.error(e, e);
126
127 throw new RemoteException(e.getMessage());
128 }
129 }
130
131 public static com.liferay.portal.model.PhoneSoap updatePhone(long phoneId,
132 java.lang.String number, java.lang.String extension, int typeId,
133 boolean primary) throws RemoteException {
134 try {
135 com.liferay.portal.model.Phone returnValue = PhoneServiceUtil.updatePhone(phoneId,
136 number, extension, typeId, primary);
137
138 return com.liferay.portal.model.PhoneSoap.toSoapModel(returnValue);
139 }
140 catch (Exception e) {
141 _log.error(e, e);
142
143 throw new RemoteException(e.getMessage());
144 }
145 }
146
147 private static Log _log = LogFactoryUtil.getLog(PhoneServiceSoap.class);
148 }