You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2013/09/23 06:16:07 UTC

svn commit: r1525503 - in /openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings: axis/services/ data/beans/basic/ db/dto/room/ db/dto/user/

Author: solomax
Date: Mon Sep 23 04:16:06 2013
New Revision: 1525503

URL: http://svn.apache.org/r1525503
Log:
[OPENMEETINGS-799] SOAP methods are fixed

Added:
    openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/data/beans/basic/RoomSearchResult.java
    openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/data/beans/basic/UserSearchResult.java
    openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/room/RoomDTO.java
    openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/user/
    openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/user/UserDTO.java
Modified:
    openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java
    openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/axis/services/UserWebServiceFacade.java

Modified: openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java?rev=1525503&r1=1525502&r2=1525503&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java (original)
+++ openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java Mon Sep 23 04:16:06 2013
@@ -22,7 +22,7 @@ import java.util.Date;
 import java.util.List;
 
 import org.apache.axis2.AxisFault;
-import org.apache.openmeetings.data.beans.basic.SearchResult;
+import org.apache.openmeetings.data.beans.basic.RoomSearchResult;
 import org.apache.openmeetings.db.entity.record.FlvRecording;
 import org.apache.openmeetings.db.entity.room.Room;
 import org.apache.openmeetings.db.entity.room.RoomType;
@@ -124,16 +124,14 @@ public class RoomWebServiceFacade extend
 				rooms_id);
 	}
 
-	public SearchResult<Room> getRooms(String SID, int start, int max,
-			String orderby, boolean asc) throws AxisFault {
-		return getBean(RoomWebService.class).getRooms(SID, start, max, orderby,
-				asc);
+	public RoomSearchResult getRooms(String SID, int start, int max, String orderby, boolean asc) throws AxisFault {
+		return new RoomSearchResult(getBean(RoomWebService.class).getRooms(SID, start, max, orderby, asc));
 	}
 
-	public SearchResult<Room> getRoomsWithCurrentUsers(String SID, int start,
-			int max, String orderby, boolean asc) throws AxisFault {
-		return getBean(RoomWebService.class).getRoomsWithCurrentUsers(SID, start,
-				max, orderby, asc);
+	public RoomSearchResult getRoomsWithCurrentUsers(String SID, int start, int max, String orderby
+			, boolean asc) throws AxisFault {
+		return new RoomSearchResult(getBean(RoomWebService.class).getRoomsWithCurrentUsers(SID, start,
+				max, orderby, asc));
 	}
 
 	/**

Modified: openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/axis/services/UserWebServiceFacade.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/axis/services/UserWebServiceFacade.java?rev=1525503&r1=1525502&r2=1525503&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/axis/services/UserWebServiceFacade.java (original)
+++ openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/axis/services/UserWebServiceFacade.java Mon Sep 23 04:16:06 2013
@@ -20,9 +20,8 @@ package org.apache.openmeetings.axis.ser
 
 import org.apache.axis2.AxisFault;
 import org.apache.openmeetings.data.beans.basic.ErrorResult;
-import org.apache.openmeetings.data.beans.basic.SearchResult;
+import org.apache.openmeetings.data.beans.basic.UserSearchResult;
 import org.apache.openmeetings.db.entity.server.Sessiondata;
-import org.apache.openmeetings.db.entity.user.User;
 
 public class UserWebServiceFacade extends BaseWebService {
 
@@ -270,11 +269,10 @@ public class UserWebServiceFacade extend
 				organisation_id, insertedby);
 	}
 
-	public SearchResult<User> getUsersByOrganisation(String SID,
-			long organisation_id, int start, int max, String orderby,
+	public UserSearchResult getUsersByOrganisation(String SID, long organisation_id, int start, int max, String orderby,
 			boolean asc) throws AxisFault {
-		return getBean(UserWebService.class).getUsersByOrganisation(SID,
-				organisation_id, start, max, orderby, asc);
+		return new UserSearchResult(getBean(UserWebService.class)
+				.getUsersByOrganisation(SID, organisation_id, start, max, orderby, asc));
 	}
 
 	public Boolean kickUserByPublicSID(String SID, String publicSID)

Added: openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/data/beans/basic/RoomSearchResult.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/data/beans/basic/RoomSearchResult.java?rev=1525503&view=auto
==============================================================================
--- openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/data/beans/basic/RoomSearchResult.java (added)
+++ openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/data/beans/basic/RoomSearchResult.java Mon Sep 23 04:16:06 2013
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.data.beans.basic;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.openmeetings.db.dto.room.RoomDTO;
+import org.apache.openmeetings.db.entity.room.Room;
+
+public class RoomSearchResult {
+	private String objectName;
+	private Long records;
+	private List<RoomDTO> result;
+	private Long errorId;
+
+	public RoomSearchResult(SearchResult<Room> copy) {
+		this.objectName = copy.getObjectName();
+		this.records = copy.getRecords();
+		this.result = new ArrayList<RoomDTO>(copy.getResult().size());
+		for (Room r : copy.getResult()) {
+			result.add(new RoomDTO(r));
+		}
+		this.errorId = copy.getErrorId();
+	}
+
+	public String getObjectName() {
+		return objectName;
+	}
+
+	public void setObjectName(String objectName) {
+		this.objectName = objectName;
+	}
+
+	public Long getRecords() {
+		return records;
+	}
+
+	public void setRecords(Long records) {
+		this.records = records;
+	}
+
+	public List<RoomDTO> getResult() {
+		return result;
+	}
+
+	public void setResult(List<RoomDTO> result) {
+		this.result = result;
+	}
+
+	public Long getErrorId() {
+		return errorId;
+	}
+
+	public void setErrorId(Long errorId) {
+		this.errorId = errorId;
+	}
+}

Added: openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/data/beans/basic/UserSearchResult.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/data/beans/basic/UserSearchResult.java?rev=1525503&view=auto
==============================================================================
--- openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/data/beans/basic/UserSearchResult.java (added)
+++ openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/data/beans/basic/UserSearchResult.java Mon Sep 23 04:16:06 2013
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.data.beans.basic;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.openmeetings.db.dto.user.UserDTO;
+import org.apache.openmeetings.db.entity.user.User;
+
+public class UserSearchResult {
+	private String objectName;
+	private Long records;
+	private List<UserDTO> result;
+	private Long errorId;
+	
+	public UserSearchResult(SearchResult<User> copy) {
+		this.objectName = copy.getObjectName();
+		this.records = copy.getRecords();
+		this.result = new ArrayList<UserDTO>(copy.getResult().size());
+		for (User u : copy.getResult()) {
+			result.add(new UserDTO(u));
+		}
+		this.errorId = copy.getErrorId();
+	}
+	
+	public String getObjectName() {
+		return objectName;
+	}
+
+	public void setObjectName(String objectName) {
+		this.objectName = objectName;
+	}
+
+	public Long getRecords() {
+		return records;
+	}
+
+	public void setRecords(Long records) {
+		this.records = records;
+	}
+
+	public List<UserDTO> getResult() {
+		return result;
+	}
+
+	public void setResult(List<UserDTO> result) {
+		this.result = result;
+	}
+
+	public Long getErrorId() {
+		return errorId;
+	}
+
+	public void setErrorId(Long errorId) {
+		this.errorId = errorId;
+	}
+
+}

Added: openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/room/RoomDTO.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/room/RoomDTO.java?rev=1525503&view=auto
==============================================================================
--- openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/room/RoomDTO.java (added)
+++ openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/room/RoomDTO.java Mon Sep 23 04:16:06 2013
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.db.dto.room;
+
+import org.apache.openmeetings.db.entity.room.Room;
+import org.apache.openmeetings.db.entity.room.RoomType;
+
+public class RoomDTO {
+	private Long id;
+	private String name;
+	private String comment;
+	private RoomType roomtype;
+	private Long numberOfPartizipants = new Long(4);
+	private boolean appointment;
+	private String confno;
+	
+	public RoomDTO(Room r) {
+		id = r.getRooms_id();
+		name = r.getName();
+		comment = r.getComment();
+		roomtype = r.getRoomtype();
+		numberOfPartizipants = r.getNumberOfPartizipants();
+		appointment = r.getAppointment();
+		confno = r.getConfno();
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getComment() {
+		return comment;
+	}
+
+	public void setComment(String comment) {
+		this.comment = comment;
+	}
+
+	public RoomType getRoomtype() {
+		return roomtype;
+	}
+
+	public void setRoomtype(RoomType roomtype) {
+		this.roomtype = roomtype;
+	}
+
+	public Long getNumberOfPartizipants() {
+		return numberOfPartizipants;
+	}
+
+	public void setNumberOfPartizipants(Long numberOfPartizipants) {
+		this.numberOfPartizipants = numberOfPartizipants;
+	}
+
+	public boolean isAppointment() {
+		return appointment;
+	}
+
+	public void setAppointment(boolean appointment) {
+		this.appointment = appointment;
+	}
+
+	public String getConfno() {
+		return confno;
+	}
+
+	public void setConfno(String confno) {
+		this.confno = confno;
+	}
+}

Added: openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/user/UserDTO.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/user/UserDTO.java?rev=1525503&view=auto
==============================================================================
--- openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/user/UserDTO.java (added)
+++ openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/db/dto/user/UserDTO.java Mon Sep 23 04:16:06 2013
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.db.dto.user;
+
+import org.apache.openmeetings.db.entity.user.Address;
+import org.apache.openmeetings.db.entity.user.User;
+import org.apache.openmeetings.db.entity.user.User.Type;
+
+public class UserDTO {
+	private Long id;
+	private String firstname;
+	private String lastname;
+	private Long level_id;
+	private String login;
+	private Long language_id;
+	private Address adresses;
+	private String timeZoneId;
+	private Type type = Type.user;
+
+	public UserDTO(User u) {
+		id = u.getUser_id();
+		firstname = u.getFirstname();
+		lastname = u.getLastname();
+		level_id = u.getLevel_id();
+		login = u.getLogin();
+		language_id = u.getLanguage_id();
+		adresses = u.getAdresses();
+		timeZoneId = u.getTimeZoneId();
+		type = u.getType();
+	}
+	
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getFirstname() {
+		return firstname;
+	}
+
+	public void setFirstname(String firstname) {
+		this.firstname = firstname;
+	}
+
+	public String getLastname() {
+		return lastname;
+	}
+
+	public void setLastname(String lastname) {
+		this.lastname = lastname;
+	}
+
+	public Long getLevel_id() {
+		return level_id;
+	}
+
+	public void setLevel_id(Long level_id) {
+		this.level_id = level_id;
+	}
+
+	public String getLogin() {
+		return login;
+	}
+
+	public void setLogin(String login) {
+		this.login = login;
+	}
+
+	public Long getLanguage_id() {
+		return language_id;
+	}
+
+	public void setLanguage_id(Long language_id) {
+		this.language_id = language_id;
+	}
+
+	public Address getAdresses() {
+		return adresses;
+	}
+
+	public void setAdresses(Address adresses) {
+		this.adresses = adresses;
+	}
+
+	public String getTimeZoneId() {
+		return timeZoneId;
+	}
+
+	public void setTimeZoneId(String timeZoneId) {
+		this.timeZoneId = timeZoneId;
+	}
+
+	public Type getType() {
+		return type;
+	}
+
+	public void setType(Type type) {
+		this.type = type;
+	}
+}