Author: solomax
Date: Thu Feb 16 12:58:34 2017
New Revision: 1783199

URL: http://svn.apache.org/viewvc?rev=1783199&view=rev
Log:
[OPENMEETINGS-1560] code is modified during investigation

Added:
    
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java
      - copied, changed from r1783198, 
openmeetings/application/branches/3.2.x/openmeetings-util/src/main/java/org/apache/openmeetings/util/LocaleHelper.java
    openmeetings/application/branches/3.2.x/openmeetings-db/src/test/
    openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/
    openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/org/
    
openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/org/apache/
    
openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/org/apache/openmeetings/
    
openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/org/apache/openmeetings/db/
    
openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/org/apache/openmeetings/db/util/
    
openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/org/apache/openmeetings/db/util/TestLocaleHelper.java
      - copied, changed from r1783198, 
openmeetings/application/branches/3.2.x/openmeetings-util/src/test/java/org/apache/openmeetings/util/TestLocaleHelper.java
    
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java
      - copied, changed from r1783198, 
openmeetings/application/trunk/openmeetings-util/src/main/java/org/apache/openmeetings/util/LocaleHelper.java
    openmeetings/application/trunk/openmeetings-db/src/test/
    openmeetings/application/trunk/openmeetings-db/src/test/java/
    openmeetings/application/trunk/openmeetings-db/src/test/java/org/
    openmeetings/application/trunk/openmeetings-db/src/test/java/org/apache/
    
openmeetings/application/trunk/openmeetings-db/src/test/java/org/apache/openmeetings/
    
openmeetings/application/trunk/openmeetings-db/src/test/java/org/apache/openmeetings/db/
    
openmeetings/application/trunk/openmeetings-db/src/test/java/org/apache/openmeetings/db/util/
    
openmeetings/application/trunk/openmeetings-db/src/test/java/org/apache/openmeetings/db/util/TestLocaleHelper.java
      - copied, changed from r1783198, 
openmeetings/application/trunk/openmeetings-util/src/test/java/org/apache/openmeetings/util/TestLocaleHelper.java
Removed:
    
openmeetings/application/branches/3.2.x/openmeetings-util/src/main/java/org/apache/openmeetings/util/LocaleHelper.java
    
openmeetings/application/branches/3.2.x/openmeetings-util/src/test/java/org/apache/openmeetings/util/TestLocaleHelper.java
    
openmeetings/application/trunk/openmeetings-util/src/main/java/org/apache/openmeetings/util/LocaleHelper.java
    
openmeetings/application/trunk/openmeetings-util/src/test/java/org/apache/openmeetings/util/TestLocaleHelper.java
Modified:
    
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java
    
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
    
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/IWebSession.java
    
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/InvitationTemplate.java
    
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.java
    
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.java
    
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/AppointmentReminderTemplate.java
    
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CanceledAppointmentTemplate.java
    
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CreatedAppointmentTemplate.java
    
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/RecordingExpiringTemplate.java
    
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/UpdatedAppointmentTemplate.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/AdminSavePanel.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/ConnectionsPanel.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/email/EmailForm.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupForm.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupUsersPanel.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/rooms/RoomForm.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/ConfirmableAjaxBorder.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/MainPanel.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/Chat.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/UserProfilePanel.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/CountryDropDown.java
    
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java
    
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
    
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/IWebSession.java
    
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/InvitationTemplate.java
    
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.java
    
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.java
    
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/AppointmentReminderTemplate.java
    
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CanceledAppointmentTemplate.java
    
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CreatedAppointmentTemplate.java
    
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/RecordingExpiringTemplate.java
    
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/UpdatedAppointmentTemplate.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/AdminSavePanel.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/ConnectionsPanel.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/email/EmailForm.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupForm.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupUsersPanel.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/rooms/RoomForm.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/ConfirmableAjaxBorder.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/MainPanel.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/Chat.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/UserProfilePanel.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/CountryDropDown.java

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java
 Thu Feb 16 12:58:34 2017
@@ -19,7 +19,7 @@
 package org.apache.openmeetings.core.ldap;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.apache.openmeetings.util.LocaleHelper.validateCountry;
+import static org.apache.openmeetings.db.util.LocaleHelper.validateCountry;
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DEFAULT_GROUP_ID;
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
 Thu Feb 16 12:58:34 2017
@@ -19,7 +19,7 @@
 package org.apache.openmeetings.core.remote;
 
 import static 
org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter.nextBroadCastId;
-import static org.apache.openmeetings.util.LocaleHelper.getCountryName;
+import static org.apache.openmeetings.db.util.LocaleHelper.getCountryName;
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DEFAULT_GROUP_ID;
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_FRONTEND_REGISTER_KEY;
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_OAUTH_REGISTER_KEY;
@@ -37,8 +37,10 @@ import java.util.Map;
 import java.util.TimeZone;
 import java.util.UUID;
 
+import org.apache.commons.lang3.time.FastDateFormat;
 import org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter;
 import org.apache.openmeetings.core.remote.util.SessionVariablesUtil;
+import org.apache.openmeetings.db.dao.basic.ChatDao;
 import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
 import org.apache.openmeetings.db.dao.label.LabelDao;
 import org.apache.openmeetings.db.dao.room.RoomDao;
@@ -46,12 +48,14 @@ import org.apache.openmeetings.db.dao.se
 import org.apache.openmeetings.db.dao.server.SessiondataDao;
 import org.apache.openmeetings.db.dao.user.IUserManager;
 import org.apache.openmeetings.db.dao.user.UserDao;
+import org.apache.openmeetings.db.entity.basic.ChatMessage;
 import org.apache.openmeetings.db.entity.room.Client;
 import org.apache.openmeetings.db.entity.room.Room;
 import org.apache.openmeetings.db.entity.server.Sessiondata;
 import org.apache.openmeetings.db.entity.user.Group;
 import org.apache.openmeetings.db.entity.user.GroupUser;
 import org.apache.openmeetings.db.entity.user.User;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.openmeetings.util.OmException;
 import org.apache.wicket.util.string.Strings;
 import org.red5.logging.Red5LoggerFactory;
@@ -78,6 +82,8 @@ public class MobileService {
        @Autowired
        private LabelDao labelDao;
        @Autowired
+       private ChatDao chatDao;
+       @Autowired
        private ScopeApplicationAdapter scopeAdapter;
 
        private static void add(Map<String, Object> m, String key, Object v) {
@@ -210,6 +216,7 @@ public class MobileService {
                                c.setUserId(u.getId());
                                c.setFirstname(u.getFirstname());
                                c.setLastname(u.getLastname());
+                               //TODO rights
                                sessionManager.updateClientByStreamId(streamId, 
c, false, null);
 
                                add(result, "sid", sd.getSessionId());
@@ -220,7 +227,7 @@ public class MobileService {
                                add(result, "lastname", u.getLastname());
                                add(result, "login", u.getLogin());
                                add(result, "email", u.getAddress() == null ? 
"" : u.getAddress().getEmail());
-                               add(result, "language", u.getLanguageId()); 
//TODO rights
+                               add(result, "language", u.getLanguageId());
                                add(result, "version", getVersion());
                        }
                }
@@ -303,26 +310,9 @@ public class MobileService {
                return result;
        }
 
+       //designed to do nothing remain for compatibility
        public Map<String, Object> roomConnect(String SID, Long userId) {
-               Map<String, Object> result = new Hashtable<>();
-               /** FIXME TODO
-               User u = userDao.get(userId);
-               Client c = scopeAdapter.setUsernameReconnect(SID, userId, 
u.getLogin(), u.getFirstname(), u.getLastname(), u.getPictureuri());
-                //TODO check if we need anything here
-               long broadcastId = nextBroadCastId();
-               c.setSipTransport(true);
-               c.setRoomId(Long.parseLong(c.getScope()));
-               c.setRoomEnter(new Date());
-               c.setBroadCastID(broadcastId);
-               c.setMobile(true);
-               c.setIsBroadcasting(true);
-               sessionManager.updateClientByStreamId(c.getStreamid(), c, 
false, null);
-               result.put("broadcastId", broadcastId);
-               result.put("publicSid", c.getPublicSID());
-
-               scopeAdapter.sendMessageToCurrentScope("addNewUser", c, false, 
false);
-               */
-               return result;
+               return new Hashtable<>();
        }
 
        public Map<String, Object> updateAvMode(String avMode, String width, 
String height, Integer interviewPodId) {
@@ -346,7 +336,7 @@ public class MobileService {
                
scopeAdapter.sendMessageToCurrentScope("sendVarsToMessageWithClient", hsm, 
true, false);
                return result;
        }
-/*
+
        public void sendChatMessage(String message) {
                IConnection current = Red5.getConnectionLocal();
                Client client = 
sessionManager.getClientByStreamId(current.getClient().getId(), null);
@@ -362,40 +352,42 @@ public class MobileService {
                msg.add("" + client.getUserId());
                Room room = roomDao.get(client.getRoomId());
                msg.add("" + (room.isChatModerated() && !(client.getIsMod() || 
client.getIsSuperModerator())));
-               sendMessageWithClient(msg);
+               //sendMessageWithClient(msg);
 
-               "sendVarsToMessageWithClient"
+               //"sendVarsToMessageWithClient"
+       }
+
+       private static boolean isModerator(Client c) {
+               return c.getIsMod() || c.getIsSuperModerator();
        }
 
        public List<Map<String, Object>> getRoomChatHistory() {
+               List<Map<String,Object>> myChatList = new ArrayList<>();
                try {
                        IConnection current = Red5.getConnectionLocal();
-                       Client currentClient = 
this.sessionManager.getClientByStreamId(current.getClient().getId(), null);
-                       Long roomId = currentClient.getRoomId();
+                       Client c = 
sessionManager.getClientByStreamId(current.getClient().getId(), null);
+                       Long roomId = c.getRoomId();
 
                        log.debug("GET CHATROOM: " + roomId);
 
-                       List<Map<String,Object>> myChatList = 
myChats.get(roomId);
-                       if (myChatList==null) myChatList = new 
ArrayList<Map<String,Object>>();
-
-                       if (!currentClient.getIsMod() && 
!currentClient.getIsSuperModerator()) {
-                               //current user is not moderator, chat history 
need to be filtered
-                               List<Map<String,Object>> tmpChatList = new 
LinkedList<Map<String,Object>>(myChatList);
-                               for (int i = tmpChatList.size() - 1; i > -1; 
--i) {
-                                       @SuppressWarnings("rawtypes")
-                                       List msgList = 
(List)tmpChatList.get(i).get("message");
-                                       if (Boolean.valueOf("" + 
msgList.get(9))) { //needModeration
-                                               tmpChatList.remove(i);
-                                       }
-                               }
-                               myChatList = tmpChatList;
+                       Room r = roomDao.get(roomId);
+                       User u = userDao.get(c.getUserId());
+                       FastDateFormat format = 
FastDateFormat.getDateTimeInstance(
+                                       FastDateFormat.SHORT
+                                       , FastDateFormat.SHORT
+                                       , 
TimeZone.getTimeZone(u.getTimeZoneId())
+                                       , LocaleHelper.getLocale(u));
+                       for (ChatMessage m : chatDao.getRoom(roomId, 0, 30, 
!r.isChatModerated() || isModerator(c))) {
+                               Map<String, Object> mm = new HashMap<>();
+                               mm.put("from", String.format("%s %s", 
m.getFromUser().getFirstname(), m.getFromUser().getLastname()));
+                               mm.put("time", format.format(m.getSent()));
+                               mm.put("msg", m.getMessage());
+                               myChatList.add(mm);
                        }
 
-                       return myChatList;
                } catch (Exception err) {
                        log.error("[getRoomChatHistory] ",err);
-                       return null;
                }
+               return myChatList;
        }
-*/
 }

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/IWebSession.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/IWebSession.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/IWebSession.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/IWebSession.java
 Thu Feb 16 12:58:34 2017
@@ -20,11 +20,8 @@ package org.apache.openmeetings;
 
 import java.util.Locale;
 
-import org.apache.openmeetings.db.entity.user.User;
-
 public interface IWebSession {
        long getOmLanguage();
        void setLanguage(long languageId);
        Locale getLocale();
-       Locale getLocale(User u);
 }

Copied: 
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java
 (from r1783198, 
openmeetings/application/branches/3.2.x/openmeetings-util/src/main/java/org/apache/openmeetings/util/LocaleHelper.java)
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java?p2=openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java&p1=openmeetings/application/branches/3.2.x/openmeetings-util/src/main/java/org/apache/openmeetings/util/LocaleHelper.java&r1=1783198&r2=1783199&rev=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-util/src/main/java/org/apache/openmeetings/util/LocaleHelper.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java
 Thu Feb 16 12:58:34 2017
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.openmeetings.util;
+package org.apache.openmeetings.db.util;
 
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 
@@ -26,6 +26,8 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Set;
 
+import org.apache.openmeetings.db.dao.label.LabelDao;
+import org.apache.openmeetings.db.entity.user.User;
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
 
@@ -54,4 +56,19 @@ public class LocaleHelper {
                }
                return code;
        }
+
+       public static Locale getLocale(User u) {
+               Long langId = u.getLanguageId();
+               Locale locale = langId == 3 ? Locale.GERMANY : 
LabelDao.languages.get(langId);
+               try {
+                       Locale.Builder builder = new 
Locale.Builder().setLanguage(locale.getLanguage());
+                       if (u.getAddress() != null && 
u.getAddress().getCountry() != null) {
+                               builder.setRegion(u.getAddress().getCountry());
+                       }
+                       locale = builder.build();
+               } catch (Exception e) {
+                       log.error("Unexpected Error whilw constructing locale 
for the user", e.getMessage());
+               }
+               return locale;
+       }
 }

Copied: 
openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/org/apache/openmeetings/db/util/TestLocaleHelper.java
 (from r1783198, 
openmeetings/application/branches/3.2.x/openmeetings-util/src/test/java/org/apache/openmeetings/util/TestLocaleHelper.java)
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/org/apache/openmeetings/db/util/TestLocaleHelper.java?p2=openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/org/apache/openmeetings/db/util/TestLocaleHelper.java&p1=openmeetings/application/branches/3.2.x/openmeetings-util/src/test/java/org/apache/openmeetings/util/TestLocaleHelper.java&r1=1783198&r2=1783199&rev=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-util/src/test/java/org/apache/openmeetings/util/TestLocaleHelper.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-db/src/test/java/org/apache/openmeetings/db/util/TestLocaleHelper.java
 Thu Feb 16 12:58:34 2017
@@ -16,10 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.openmeetings.util;
+package org.apache.openmeetings.db.util;
 
-import static org.apache.openmeetings.util.LocaleHelper.getCountries;
-import static org.apache.openmeetings.util.LocaleHelper.validateCountry;
+import static org.apache.openmeetings.db.util.LocaleHelper.getCountries;
+import static org.apache.openmeetings.db.util.LocaleHelper.validateCountry;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/InvitationTemplate.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/InvitationTemplate.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/InvitationTemplate.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/InvitationTemplate.java
 Thu Feb 16 12:58:34 2017
@@ -23,6 +23,7 @@ import static org.apache.openmeetings.db
 import java.util.Locale;
 
 import org.apache.openmeetings.db.entity.user.User;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.wicket.core.util.string.ComponentRenderer;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
@@ -39,7 +40,7 @@ public class InvitationTemplate extends
                add(new Label("user", invitorName));
                add(new Label("messageLbl", getString("502", locale)));
                add(new Label("message", message).setEscapeModelStrings(false));
-               
+
                add(new WebMarkupContainer("links")
                        .add(new Label("comment_for_link1", getString("503", 
locale)))
                        .add(new ExternalLink("invitation_link1", link).add(new 
Label("clickMe", getString("504", locale))))
@@ -51,6 +52,6 @@ public class InvitationTemplate extends
 
        public static String getEmail(User invitee, String invitorName, String 
message, String link) {
                ensureApplication(invitee.getLanguageId());
-               return ComponentRenderer.renderComponent(new 
InvitationTemplate(getOmSession().getLocale(invitee), invitorName, message, 
link)).toString();
+               return ComponentRenderer.renderComponent(new 
InvitationTemplate(LocaleHelper.getLocale(invitee), invitorName, message, 
link)).toString();
        }
 }

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactConfirmTemplate.java
 Thu Feb 16 12:58:34 2017
@@ -19,6 +19,7 @@
 package org.apache.openmeetings.service.mail.template;
 
 import org.apache.openmeetings.db.entity.user.UserContact;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.wicket.core.util.string.ComponentRenderer;
 import org.apache.wicket.markup.html.basic.Label;
 
@@ -26,7 +27,7 @@ public class RequestContactConfirmTempla
        private static final long serialVersionUID = 1L;
 
        public RequestContactConfirmTemplate(UserContact contact) {
-               super(getOmSession().getLocale(contact.getOwner()));
+               super(LocaleHelper.getLocale(contact.getOwner()));
                add(new Label("hi", getString("1192", locale)));
                add(new Label("firstName", contact.getOwner().getFirstname()));
                add(new Label("lastName", contact.getOwner().getLastname()));

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/RequestContactTemplate.java
 Thu Feb 16 12:58:34 2017
@@ -21,6 +21,7 @@ package org.apache.openmeetings.service.
 import static 
org.apache.openmeetings.db.util.ApplicationHelper.ensureApplication;
 
 import org.apache.openmeetings.db.entity.user.User;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.wicket.core.util.string.ComponentRenderer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.link.ExternalLink;
@@ -29,7 +30,7 @@ public class RequestContactTemplate exte
        private static final long serialVersionUID = 1L;
 
        public RequestContactTemplate(User userToAdd, User user) {
-               super(getOmSession().getLocale(userToAdd));
+               super(LocaleHelper.getLocale(userToAdd));
                add(new Label("hi", getString("1192", locale)));
                add(new Label("addedFirstName", userToAdd.getFirstname()));
                add(new Label("addedLastName", userToAdd.getLastname()));

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/AppointmentReminderTemplate.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/AppointmentReminderTemplate.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/AppointmentReminderTemplate.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/AppointmentReminderTemplate.java
 Thu Feb 16 12:58:34 2017
@@ -25,6 +25,7 @@ import java.util.TimeZone;
 
 import org.apache.openmeetings.db.entity.calendar.Appointment;
 import org.apache.openmeetings.db.entity.user.User;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.util.string.Strings;
@@ -54,7 +55,7 @@ public class AppointmentReminderTemplate
 
        public static AbstractSubjectEmailTemplate get(User u, Appointment a, 
TimeZone tz) {
                ensureApplication(u.getLanguageId());
-               return new 
AppointmentReminderTemplate(getOmSession().getLocale(u), a, tz).create();
+               return new 
AppointmentReminderTemplate(LocaleHelper.getLocale(u), a, tz).create();
        }
 
        @Override

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CanceledAppointmentTemplate.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CanceledAppointmentTemplate.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CanceledAppointmentTemplate.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CanceledAppointmentTemplate.java
 Thu Feb 16 12:58:34 2017
@@ -25,6 +25,7 @@ import java.util.TimeZone;
 
 import org.apache.openmeetings.db.entity.calendar.Appointment;
 import org.apache.openmeetings.db.entity.user.User;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.util.string.Strings;
@@ -58,7 +59,7 @@ public class CanceledAppointmentTemplate
 
        public static AbstractSubjectEmailTemplate get(User u, Appointment a, 
TimeZone tz, String invitorName) {
                ensureApplication(u.getLanguageId());
-               return new 
CanceledAppointmentTemplate(getOmSession().getLocale(u), a, tz, 
invitorName).create();
+               return new 
CanceledAppointmentTemplate(LocaleHelper.getLocale(u), a, tz, 
invitorName).create();
        }
 
        @Override

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CreatedAppointmentTemplate.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CreatedAppointmentTemplate.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CreatedAppointmentTemplate.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/CreatedAppointmentTemplate.java
 Thu Feb 16 12:58:34 2017
@@ -25,6 +25,7 @@ import java.util.TimeZone;
 
 import org.apache.openmeetings.db.entity.calendar.Appointment;
 import org.apache.openmeetings.db.entity.user.User;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.util.string.Strings;
@@ -58,7 +59,7 @@ public class CreatedAppointmentTemplate
 
        public static AbstractSubjectEmailTemplate get(User u, Appointment a, 
TimeZone tz, String invitorName) {
                ensureApplication(u.getLanguageId());
-               return new 
CreatedAppointmentTemplate(getOmSession().getLocale(u), a, tz, 
invitorName).create();
+               return new 
CreatedAppointmentTemplate(LocaleHelper.getLocale(u), a, tz, 
invitorName).create();
        }
 
        @Override

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/RecordingExpiringTemplate.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/RecordingExpiringTemplate.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/RecordingExpiringTemplate.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/RecordingExpiringTemplate.java
 Thu Feb 16 12:58:34 2017
@@ -25,6 +25,7 @@ import org.apache.openmeetings.db.dao.ro
 import org.apache.openmeetings.db.entity.record.Recording;
 import org.apache.openmeetings.db.entity.room.Room;
 import org.apache.openmeetings.db.entity.user.User;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.openmeetings.service.mail.template.OmTextLabel;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.panel.Fragment;
@@ -36,7 +37,7 @@ public class RecordingExpiringTemplate e
        private final User u;
 
        private RecordingExpiringTemplate(User u, final Recording rec, long 
remainingDays) {
-               super(getOmSession().getLocale(u));
+               super(LocaleHelper.getLocale(u));
                this.u = u;
                this.rec = rec;
                this.remainingDays = remainingDays;

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/UpdatedAppointmentTemplate.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/UpdatedAppointmentTemplate.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/UpdatedAppointmentTemplate.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/mail/template/subject/UpdatedAppointmentTemplate.java
 Thu Feb 16 12:58:34 2017
@@ -25,6 +25,7 @@ import java.util.TimeZone;
 
 import org.apache.openmeetings.db.entity.calendar.Appointment;
 import org.apache.openmeetings.db.entity.user.User;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.util.string.Strings;
@@ -58,7 +59,7 @@ public class UpdatedAppointmentTemplate
 
        public static AbstractSubjectEmailTemplate get(User u, Appointment a, 
TimeZone tz, String invitorName) {
                ensureApplication(u.getLanguageId());
-               return new 
UpdatedAppointmentTemplate(getOmSession().getLocale(u), a, tz, 
invitorName).create();
+               return new 
UpdatedAppointmentTemplate(LocaleHelper.getLocale(u), a, tz, 
invitorName).create();
        }
 
        @Override

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/AdminSavePanel.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/AdminSavePanel.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/AdminSavePanel.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/AdminSavePanel.java
 Thu Feb 16 12:58:34 2017
@@ -67,7 +67,7 @@ public abstract class AdminSavePanel<T>
                        private static final long serialVersionUID = 1L;
 
                        @Override
-                       protected void onError(AjaxRequestTarget target, 
Form<?> form) {
+                       protected void onError(AjaxRequestTarget target) {
                                // repaint the feedback panel so errors are 
shown
                                target.add(feedback);
                                hideNewRecord();
@@ -75,7 +75,7 @@ public abstract class AdminSavePanel<T>
                        }
 
                        @Override
-                       protected void onSubmit(AjaxRequestTarget target, 
Form<?> form) {
+                       protected void onSubmit(AjaxRequestTarget target) {
                                // repaint the feedback panel so that it is 
hidden
                                target.add(feedback);
                                hideNewRecord();

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/ConnectionsPanel.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/ConnectionsPanel.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/ConnectionsPanel.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/ConnectionsPanel.java
 Thu Feb 16 12:58:34 2017
@@ -42,7 +42,6 @@ import org.apache.wicket.ajax.AjaxEventB
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.repeater.Item;
 import org.apache.wicket.markup.repeater.RepeatingView;
 
@@ -51,19 +50,19 @@ public class ConnectionsPanel extends Ad
 
        public ConnectionsPanel(String id) {
                super(id);
-       
+
                SearchableDataProvider<Client> sdp = new 
SearchableDataProvider<Client>(null) {
                        private static final long serialVersionUID = 1L;
 
                        //FIXME add search
-                       
+
                        @Override
                        public Iterator<? extends Client> iterator(long first, 
long count) {
                                //FIXME add grouping by public SID
                                List<Client> l = new 
ArrayList<Client>(getBean(ISessionManager.class).getClientsWithServer());
                                return l.subList((int)Math.max(0, first), 
(int)Math.min(first + count, l.size())).iterator();
                        }
-                       
+
                        @Override
                        public long size() {
                                return 
getBean(ISessionManager.class).getClients().size();
@@ -86,7 +85,7 @@ public class ConnectionsPanel extends Ad
                                        private static final long 
serialVersionUID = 1L;
 
                                        @Override
-                                       protected void 
onSubmit(AjaxRequestTarget target, Form<?> form) {
+                                       protected void 
onSubmit(AjaxRequestTarget target) {
                                                Client c = 
item.getModelObject();
                                                
getBean(IUserService.class).kickUserByStreamId(getSid(), c.getStreamid()
                                                                , c.getServer() 
== null ? 0 : c.getServer().getId());
@@ -126,22 +125,22 @@ public class ConnectionsPanel extends Ad
                        }
                };
                add(container.add(dataView).setOutputMarkupId(true), 
details.setVisible(false).setOutputMarkupPlaceholderTag(true));
-               
+
                
SearchableDataProvider<org.apache.openmeetings.db.entity.basic.Client> sdpWeb = 
new 
SearchableDataProvider<org.apache.openmeetings.db.entity.basic.Client>(null) {
                        private static final long serialVersionUID = 1L;
-                       
+
                        @Override
                        public Iterator<? extends 
org.apache.openmeetings.db.entity.basic.Client> iterator(long first, long 
count) {
                                
List<org.apache.openmeetings.db.entity.basic.Client> l = new 
ArrayList<org.apache.openmeetings.db.entity.basic.Client>(Application.getClients());
                                return l.subList((int)Math.max(0, first), 
(int)Math.min(first + count, l.size())).iterator();
                        }
-                       
+
                        @Override
                        public long size() {
                                return Application.getClientsSize();
                        }
                };
-               
+
                final WebMarkupContainer containerWeb = new 
WebMarkupContainer("containerWeb");
                
SearchableDataView<org.apache.openmeetings.db.entity.basic.Client> dataViewWeb 
= new 
SearchableDataView<org.apache.openmeetings.db.entity.basic.Client>("clientListWeb",
 sdpWeb) {
                        private static final long serialVersionUID = 1L;
@@ -157,7 +156,7 @@ public class ConnectionsPanel extends Ad
                                        private static final long 
serialVersionUID = 1L;
 
                                        @Override
-                                       protected void 
onSubmit(AjaxRequestTarget target, Form<?> form) {
+                                       protected void 
onSubmit(AjaxRequestTarget target) {
                                                
org.apache.openmeetings.db.entity.basic.Client c = item.getModelObject();
                                                
getBean(IUserService.class).kickUserBySessionId(getSid(), c.getUserId(), 
c.getSessionId());
                                                target.add(containerWeb, 
details.setVisible(false));
@@ -194,7 +193,7 @@ public class ConnectionsPanel extends Ad
                                item.add(AttributeModifier.append("class", 
ROW_CLASS));
                        }
                };
-               
+
                add(containerWeb.add(dataViewWeb).setOutputMarkupId(true), 
details.setVisible(false).setOutputMarkupPlaceholderTag(true));
                add(new PagedEntityListPanel("navigator", dataView) {
                        private static final long serialVersionUID = 1L;

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/email/EmailForm.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/email/EmailForm.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/email/EmailForm.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/email/EmailForm.java
 Thu Feb 16 12:58:34 2017
@@ -78,11 +78,11 @@ public class EmailForm extends Form<Mail
                        private static final long serialVersionUID = 1L;
 
                        @Override
-                       protected void onError(AjaxRequestTarget target, 
Form<?> form) {
+                       protected void onError(AjaxRequestTarget target) {
                        }
 
                        @Override
-                       protected void onSubmit(AjaxRequestTarget target, 
Form<?> form) {
+                       protected void onSubmit(AjaxRequestTarget target) {
                                
getBean(MailMessageDao.class).delete(getModelObject().getId(), getUserId());
                                setModelObject(new MailMessage());
                                target.add(list, EmailForm.this);

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupForm.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupForm.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupForm.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupForm.java
 Thu Feb 16 12:58:34 2017
@@ -18,11 +18,11 @@
  */
 package org.apache.openmeetings.web.admin.groups;
 
+import static org.apache.openmeetings.db.util.AuthLevelUtil.hasGroupAdminLevel;
+import static org.apache.openmeetings.util.OmFileHelper.getGroupLogo;
 import static org.apache.openmeetings.web.app.Application.getBean;
 import static org.apache.openmeetings.web.app.WebSession.getRights;
 import static org.apache.openmeetings.web.app.WebSession.getUserId;
-import static org.apache.openmeetings.db.util.AuthLevelUtil.hasGroupAdminLevel;
-import static org.apache.openmeetings.util.OmFileHelper.getGroupLogo;
 import static 
org.apache.openmeetings.web.util.GroupLogoResourceReference.getUrl;
 
 import java.io.File;
@@ -188,13 +188,13 @@ public class GroupForm extends AdminBase
        private long getGroupId() {
                return getModelObject().getId() != null ? 
getModelObject().getId() : 0;
        }
-       
+
        @Override
        protected void onNewSubmit(AjaxRequestTarget target, Form<?> f) {
                setModelObject(new Group());
                updateView(target);
        }
-       
+
        @Override
        protected void onRefreshSubmit(AjaxRequestTarget target, Form<?> form) {
                Group org = getModelObject();
@@ -206,14 +206,14 @@ public class GroupForm extends AdminBase
                setModelObject(org);
                updateView(target);
        }
-       
+
        @Override
        protected void onDeleteSubmit(AjaxRequestTarget target, Form<?> form) {
                getBean(GroupDao.class).delete(getModelObject(), getUserId());
                setModelObject(new Group());
                updateView(target);
        }
-       
+
        @Override
        protected void onSaveSubmit(AjaxRequestTarget target, Form<?> form) {
                Group o = getModelObject();

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupUsersPanel.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupUsersPanel.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupUsersPanel.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/groups/GroupUsersPanel.java
 Thu Feb 16 12:58:34 2017
@@ -37,7 +37,6 @@ import org.apache.wicket.ajax.form.OnCha
 import org.apache.wicket.behavior.AttributeAppender;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.CheckBox;
-import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.markup.repeater.Item;
 
@@ -45,12 +44,12 @@ public class GroupUsersPanel extends Pan
        private static final long serialVersionUID = 1L;
        private long groupId;
        private List<GroupUser> users2add = new ArrayList<GroupUser>();
-       
+
        public GroupUsersPanel(String id, long groupId) {
                super(id);
                this.groupId = groupId;
                setOutputMarkupId(true);
-               
+
                SearchableDataView<GroupUser> dataView = new 
SearchableDataView<GroupUser>("userList", new GroupUserDataProvider()) {
                        private static final long serialVersionUID = 1L;
 
@@ -77,7 +76,7 @@ public class GroupUsersPanel extends Pan
                                        private static final long 
serialVersionUID = 1L;
 
                                        @Override
-                                       protected void 
onSubmit(AjaxRequestTarget target, Form<?> form) {
+                                       protected void 
onSubmit(AjaxRequestTarget target) {
                                                if (grpUser.getId() == null) {
                                                        
users2add.remove(grpUser);
                                                } else {
@@ -101,7 +100,7 @@ public class GroupUsersPanel extends Pan
                        }
                });
        }
-       
+
        public static void update(GroupUser grpUser) {
                UserDao uDao = getBean(UserDao.class);
                User u = uDao.get(grpUser.getUser().getId());
@@ -113,33 +112,33 @@ public class GroupUsersPanel extends Pan
                }
                uDao.update(u, WebSession.getUserId());
        }
-       
+
        void update(long groupId) {
                this.groupId = groupId;
                users2add.clear();
        }
-       
+
        List<GroupUser> getUsers2add() {
                return users2add;
        }
-       
+
        private class GroupUserDataProvider extends 
SearchableDataProvider<GroupUser> {
                private static final long serialVersionUID = 1L;
 
                GroupUserDataProvider() {
                        super(GroupUserDao.class);
                }
-               
+
                @Override
                protected GroupUserDao getDao() {
                        return (GroupUserDao)super.getDao();
                }
-               
+
                @Override
                public long size() {
                        return users2add.size() + (search == null ? 
getDao().count(groupId) : getDao().count(groupId, search));
                }
-               
+
                @Override
                public java.util.Iterator<? extends GroupUser> iterator(long 
first, long count) {
                        List<GroupUser> list = new ArrayList<GroupUser>();
@@ -147,7 +146,7 @@ public class GroupUsersPanel extends Pan
                        list.addAll(search == null && getSort() == null
                                        ? getDao().get(groupId, (int)first, 
(int)count)
                                        : getDao().get(groupId, search, 
(int)first, (int)count, getSortStr()));
-                       
+
                        return list.iterator();
                }
        }

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.java
 Thu Feb 16 12:58:34 2017
@@ -50,7 +50,6 @@ import org.apache.wicket.core.request.ha
 import 
org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.upload.FileUpload;
 import org.apache.wicket.markup.html.form.upload.FileUploadField;
 import org.apache.wicket.markup.repeater.Item;
@@ -248,7 +247,7 @@ public class LangPanel extends AdminPane
                        private static final long serialVersionUID = 1L;
 
                        @Override
-                       protected void onSubmit(AjaxRequestTarget target, 
Form<?> form) {
+                       protected void onSubmit(AjaxRequestTarget target) {
                                LabelDao.delete(language.getValue());
                                List<Map.Entry<Long, Locale>> langs = 
LangForm.getLanguages();
                                language = langs.isEmpty() ? null : 
langs.get(0);

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/rooms/RoomForm.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/rooms/RoomForm.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/rooms/RoomForm.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/rooms/RoomForm.java
 Thu Feb 16 12:58:34 2017
@@ -94,18 +94,18 @@ public class RoomForm extends AdminBaseF
                                        private static final long 
serialVersionUID = 1L;
 
                                        @Override
-                                       protected void 
onSubmit(AjaxRequestTarget target, Form<?> form) {
+                                       protected void 
onSubmit(AjaxRequestTarget target) {
                                                Client c = 
item.getModelObject();
                                                
getBean(IUserService.class).kickUserByStreamId(getSid(), c.getStreamid()
                                                                , c.getServer() 
== null ? 0 : c.getServer().getId());
-                                               
+
                                                updateClients(target);
                                        }
                                });
                }
        };
        private IModel<User> moderator2add = Model.of((User)null);
-       
+
        public RoomForm(String id, WebMarkupContainer roomList, final Room 
room) {
                super(id, new CompoundPropertyModel<Room>(room));
                this.roomList = roomList;
@@ -231,11 +231,11 @@ public class RoomForm extends AdminBaseF
                }));
                add(new CheckBox("chatOpened"));
                add(new CheckBox("filesOpened"));
-               add(new CheckBox("autoVideoSelect"));   
-               
-               // Users in this Room 
+               add(new CheckBox("autoVideoSelect"));
+
+               // Users in this Room
                
add(clientsContainer.add(clients.setOutputMarkupId(true)).setOutputMarkupId(true));
-               
+
                // Moderators
                final Select2Choice<User> moderatorChoice = new 
Select2Choice<User>("moderator2add", moderator2add, new 
AdminUserChoiceProvider() {
                        private static final long serialVersionUID = 1L;
@@ -299,7 +299,7 @@ public class RoomForm extends AdminBaseF
                                                private static final long 
serialVersionUID = 1L;
 
                                                @Override
-                                               protected void 
onSubmit(AjaxRequestTarget target, Form<?> form) {
+                                               protected void 
onSubmit(AjaxRequestTarget target) {
                                                        
RoomForm.this.getModelObject().getModerators().remove(item.getIndex());
                                                        
target.add(moderatorContainer);
                                                }
@@ -321,19 +321,19 @@ public class RoomForm extends AdminBaseF
                                updateView(target);
                        }
                }.setOutputMarkupId(true));
-               
+
                // attach an ajax validation behavior to all form component's 
keydown
                // event and throttle it down to once per second
                add(new AjaxFormValidatingBehavior("keydown", 
Duration.ONE_SECOND));
        }
 
        void updateClients(AjaxRequestTarget target) {
-               long roomId = (getModelObject().getId() != null ? 
getModelObject().getId() : 0);  
+               long roomId = (getModelObject().getId() != null ? 
getModelObject().getId() : 0);
                final List<Client> clientsInRoom = 
getBean(ISessionManager.class).getClientListByRoom(roomId);
                clients.setDefaultModelObject(clientsInRoom);
                target.add(clientsContainer);
        }
-       
+
        @Override
        protected void onSaveSubmit(AjaxRequestTarget target, Form<?> form) {
                Room r = getModelObject();
@@ -403,7 +403,7 @@ public class RoomForm extends AdminBaseF
                updateClients(target);
                target.appendJavaScript("omRoomPanelInit();");
        }
-       
+
        @Override
        protected void onDetach() {
                moderator2add.detach();

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
 Thu Feb 16 12:58:34 2017
@@ -49,7 +49,6 @@ import org.apache.commons.lang3.time.Fas
 import org.apache.openmeetings.IWebSession;
 import org.apache.openmeetings.core.ldap.LdapLoginManagement;
 import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
-import org.apache.openmeetings.db.dao.label.LabelDao;
 import org.apache.openmeetings.db.dao.room.InvitationDao;
 import org.apache.openmeetings.db.dao.server.SOAPLoginDao;
 import org.apache.openmeetings.db.dao.server.SessiondataDao;
@@ -64,6 +63,7 @@ import org.apache.openmeetings.db.entity
 import org.apache.openmeetings.db.entity.user.User.Right;
 import org.apache.openmeetings.db.entity.user.User.Type;
 import org.apache.openmeetings.db.util.AuthLevelUtil;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.openmeetings.db.util.TimezoneUtil;
 import org.apache.openmeetings.util.OmException;
 import org.apache.openmeetings.web.user.dashboard.MyRoomsWidget;
@@ -208,7 +208,7 @@ public class WebSession extends Abstract
                                }
                        }
                } catch (Exception e) {
-                       //no-op, will continue to sign-in page
+                       log.error("Unexpected exception while checking hashes", 
e);
                }
        }
 
@@ -265,22 +265,6 @@ public class WebSession extends Abstract
                return false;
        }
 
-       @Override
-       public Locale getLocale(User u) {
-               Long langId = u.getLanguageId();
-               Locale locale = langId == 3 ? Locale.GERMANY : 
LabelDao.languages.get(langId);
-               try {
-                       Locale.Builder builder = new 
Locale.Builder().setLanguage(locale.getLanguage());
-                       if (u.getAddress() != null && 
u.getAddress().getCountry() != null) {
-                               builder.setRegion(u.getAddress().getCountry());
-                       }
-                       locale = builder.build();
-               } catch (Exception e) {
-                       log.error("Unexpected Error whilw constructing locale 
for the user", e.getMessage());
-               }
-               return locale;
-       }
-
        private void setUser(User u, Set<Right> rights) {
                String _sid = SID;
                Long _recordingId = recordingId;
@@ -322,7 +306,7 @@ public class WebSession extends Abstract
                externalType = u.getExternalType();
                tz = getBean(TimezoneUtil.class).getTimeZone(u);
                ISO8601FORMAT = 
FastDateFormat.getInstance(ISO8601_FULL_FORMAT_STRING, tz);
-               setLocale(getLocale(u));
+               setLocale(LocaleHelper.getLocale(u));
                sdf = FastDateFormat.getDateTimeInstance(SHORT, SHORT, 
getLocale());
        }
 

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/ConfirmableAjaxBorder.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/ConfirmableAjaxBorder.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/ConfirmableAjaxBorder.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/ConfirmableAjaxBorder.java
 Thu Feb 16 12:58:34 2017
@@ -19,7 +19,7 @@
 package org.apache.openmeetings.web.common;
 
 import java.io.Serializable;
-import java.util.function.BiConsumer;
+import java.util.function.Consumer;
 
 import org.apache.wicket.ajax.AjaxEventBehavior;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -62,8 +62,8 @@ public abstract class ConfirmableAjaxBor
                        this.dialog = dialog;
                        form.add(new EmptyPanel(DIALOG_ID));
                }
-               
this.dialog.setSubmitHandler((BiConsumer<AjaxRequestTarget,Form<?>> & 
Serializable)(t, f)->onSubmit(t, f));
-               
this.dialog.setErrorHandler((BiConsumer<AjaxRequestTarget,Form<?>> & 
Serializable)(t, f)->onError(t, f));
+               this.dialog.setSubmitHandler((Consumer<AjaxRequestTarget> & 
Serializable)(t)->onSubmit(t));
+               this.dialog.setErrorHandler((Consumer<AjaxRequestTarget> & 
Serializable)(t)->onError(t));
                setOutputMarkupId(true);
        }
 
@@ -115,7 +115,7 @@ public abstract class ConfirmableAjaxBor
         * @param target the {@link AjaxRequestTarget}
         * @param form the {@link Form}
         */
-       protected void onError(AjaxRequestTarget target, Form<?> form) {
+       protected void onError(AjaxRequestTarget target) {
        }
 
        /**
@@ -124,13 +124,13 @@ public abstract class ConfirmableAjaxBor
         * @param target the {@link AjaxRequestTarget}
         * @param form the {@link Form}
         */
-       protected abstract void onSubmit(AjaxRequestTarget target, Form<?> 
form);
+       protected abstract void onSubmit(AjaxRequestTarget target);
 
        public static class ConfirmableBorderDialog extends MessageFormDialog {
                private static final long serialVersionUID = 1L;
                private Form<?> form;
-               private BiConsumer<AjaxRequestTarget,Form<?>> submitHandler = 
null;
-               private BiConsumer<AjaxRequestTarget,Form<?>> errorHandler = 
null;
+               private Consumer<AjaxRequestTarget> submitHandler = null;
+               private Consumer<AjaxRequestTarget> errorHandler = null;
 
                public ConfirmableBorderDialog(String id, String title, String 
message) {
                        this(id, title, message, null);
@@ -141,11 +141,11 @@ public abstract class ConfirmableAjaxBor
                        this.form = form;
                }
 
-               public void setSubmitHandler(BiConsumer<AjaxRequestTarget, 
Form<?>> submitHandler) {
+               public void setSubmitHandler(Consumer<AjaxRequestTarget> 
submitHandler) {
                        this.submitHandler = submitHandler;
                }
 
-               public void setErrorHandler(BiConsumer<AjaxRequestTarget, 
Form<?>> errorHandler) {
+               public void setErrorHandler(Consumer<AjaxRequestTarget> 
errorHandler) {
                        this.errorHandler = errorHandler;
                }
 
@@ -163,14 +163,14 @@ public abstract class ConfirmableAjaxBor
                protected void onError(AjaxRequestTarget target) {
                        super.close(target, null); // closes the dialog on 
error.
                        if (errorHandler != null) {
-                               errorHandler.accept(target, this.getForm());
+                               errorHandler.accept(target);
                        }
                }
 
                @Override
                protected void onSubmit(AjaxRequestTarget target) {
                        if (submitHandler != null) {
-                               submitHandler.accept(target, this.getForm());
+                               submitHandler.accept(target);
                        }
                }
        }

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/MainPanel.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/MainPanel.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/MainPanel.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/MainPanel.java
 Thu Feb 16 12:58:34 2017
@@ -73,7 +73,6 @@ import org.apache.wicket.markup.head.IHe
 import org.apache.wicket.markup.head.JavaScriptHeaderItem;
 import org.apache.wicket.markup.head.PriorityHeaderItem;
 import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.panel.EmptyPanel;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.CompoundPropertyModel;
@@ -281,7 +280,7 @@ public class MainPanel extends Panel {
                        private static final long serialVersionUID = 1L;
 
                        @Override
-                       protected void onSubmit(AjaxRequestTarget target, 
Form<?> form) {
+                       protected void onSubmit(AjaxRequestTarget target) {
                                getSession().invalidate();
                                
setResponsePage(Application.get().getSignInPageClass());
                        }

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java
 Thu Feb 16 12:58:34 2017
@@ -184,7 +184,7 @@ public abstract class FileTreePanel exte
                        }
 
                        @Override
-                       protected void onSubmit(AjaxRequestTarget target, 
Form<?> form) {
+                       protected void onSubmit(AjaxRequestTarget target) {
                                deleteAll(target);
                        }
                });

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
 Thu Feb 16 12:58:34 2017
@@ -319,7 +319,7 @@ public class RoomSidebar extends Panel {
                        private static final long serialVersionUID = 1L;
 
                        @Override
-                       protected void onSubmit(AjaxRequestTarget target, 
Form<?> form) {
+                       protected void onSubmit(AjaxRequestTarget target) {
                                room.kickUser(target, kickedClient);
                        }
                });

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/Chat.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/Chat.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/Chat.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/chat/Chat.java
 Thu Feb 16 12:58:34 2017
@@ -268,11 +268,11 @@ public class Chat extends Panel {
                                private static final long serialVersionUID = 1L;
 
                                @Override
-                               protected void onError(AjaxRequestTarget 
target, Form<?> form) {
+                               protected void onError(AjaxRequestTarget 
target) {
                                }
 
                                @Override
-                               protected void onSubmit(AjaxRequestTarget 
target, Form<?> form) {
+                               protected void onSubmit(AjaxRequestTarget 
target) {
                                        ChatDao dao = getBean(ChatDao.class);
                                        String scope = 
activeTab.getModelObject();
                                        boolean clean = false;

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java
 Thu Feb 16 12:58:34 2017
@@ -70,7 +70,6 @@ import org.apache.wicket.markup.html.bas
 import org.apache.wicket.markup.html.form.Button;
 import org.apache.wicket.markup.html.form.ChoiceRenderer;
 import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.repeater.Item;
@@ -121,12 +120,12 @@ public class MessagesContactsPanel exten
                , Arrays.asList(SELECT_CHOOSE, SELECT_ALL, SELECT_NONE, 
SELECT_UNREAD, SELECT_READ)
                , new ChoiceRenderer<Integer>() {
                        private static final long serialVersionUID = 1L;
-       
+
                        @Override
                        public Object getDisplayValue(Integer object) {
                                return Application.getString(object);
                        }
-                       
+
                        @Override
                        public String getIdValue(Integer object, int index) {
                                return "" + object;
@@ -149,24 +148,24 @@ public class MessagesContactsPanel exten
                        }
                });
        private WebMarkupContainer selectedFolder;
-       
+
        private void setDefaultFolderClass() {
                inbox.add(AttributeAppender.replace("class", "email inbox 
clickable"));
                sent.add(AttributeAppender.replace("class", "email sent 
clickable"));
                trash.add(AttributeAppender.replace("class", "email trash 
clickable"));
        }
-       
+
        private static void selectFolder(WebMarkupContainer folder) {
                folder.add(AttributeAppender.append("class", "ui-widget-header 
ui-corner-all"));
        }
-       
+
        private void setFolderClass(ListItem<PrivateMessageFolder> folder) {
                folder.add(AttributeAppender.replace("class", "email folder 
clickable"));
                if 
(folder.getModelObject().getId().equals(selectedFolderModel.getObject())) {
                        selectFolder(folder);
                }
        }
-       
+
        private void updateControls(AjaxRequestTarget target) {
                deleteBtn.setEnabled(!selectedMessages.isEmpty());
                Long selFldr = selectedFolderModel.getObject();
@@ -175,11 +174,11 @@ public class MessagesContactsPanel exten
                toInboxBtn.setVisible(!INBOX_FOLDER_ID.equals(selFldr) && 
!SENT_FOLDER_ID.equals(selFldr) && !selectedMessages.isEmpty());
                target.add(buttons);
        }
-       
+
        private static String getEmail(User u) {
                return u == null || u.getAddress() == null ? "" : 
u.getAddress().getEmail();
        }
-       
+
        private void selectMessage(long id, AjaxRequestTarget target) {
                PrivateMessage msg = getBean(PrivateMessageDao.class).get(id);
                selectedMessage.addOrReplace(new Label("from", msg == null ? "" 
: getEmail(msg.getFrom())));
@@ -202,14 +201,14 @@ public class MessagesContactsPanel exten
                        updateControls(target);
                }
        }
-       
+
        void updateTable(AjaxRequestTarget target) {
                container.add(fixedTable);
                if (target != null) {
                        target.add(container);
                }
        }
-       
+
        private void selectFolder(WebMarkupContainer folder, Long id, 
AjaxRequestTarget target) {
                selectedFolder = folder;
                selectedFolderModel.setObject(id);
@@ -228,7 +227,7 @@ public class MessagesContactsPanel exten
                        target.add(dataContainer.getLinks());
                }
        }
-       
+
        private void emptySelection(AjaxRequestTarget target) {
                selectedMessages.clear();
                selectMessage(-1, target);
@@ -237,21 +236,21 @@ public class MessagesContactsPanel exten
                        target.add(unread);
                }
        }
-       
+
        private static String getDisplayName(User u) {
                return new StringBuilder().append(u.getFirstname()).append(" ")
                                .append(u.getLastname()).append(" ")
                                .append("<").append(getEmail(u)).append(">")
                                .toString();
        }
-       
+
        private void updateMoveModel() {
                List<PrivateMessageFolder> list = new 
ArrayList<PrivateMessageFolder>();
                list.add(NOT_MOVE_FOLDER);
                list.addAll(foldersModel.getObject());
                moveDropDown.setChoices(list);
        }
-       
+
        private void updateContacts(AjaxRequestTarget target) {
                
pendingContacts.setDefaultModelObject(getBean(UserContactDao.class).getContactRequestsByUserAndStatus(getUserId(),
 true).size());
                
allContacts.setDefaultModelObject(getBean(UserContactDao.class).getContactsByUserAndStatus(getUserId(),
 false).size());
@@ -259,14 +258,14 @@ public class MessagesContactsPanel exten
                        target.add(contacts);
                }
        }
-       
+
        public MessagesContactsPanel(String id) {
                super(id);
                NOT_MOVE_FOLDER.setId(MOVE_CHOOSE);
                NOT_MOVE_FOLDER.setFolderName(Application.getString(1243));
                
foldersModel.setObject(getBean(PrivateMessageFolderDao.class).get(0, 
Integer.MAX_VALUE));
                updateMoveModel();
-               
+
                final AddFolderDialog addFolder = new 
AddFolderDialog("addFolder") {
                        private static final long serialVersionUID = 1L;
 
@@ -322,14 +321,14 @@ public class MessagesContactsPanel exten
                                item.add(new Label("name", 
item.getModelObject().getFolderName()));
                                item.add(new ConfirmableAjaxBorder("delete", 
getString("80"), getString("833")) {
                                        private static final long 
serialVersionUID = 1L;
-                                       
+
                                        @Override
                                        protected void 
updateAjaxAttributes(AjaxRequestAttributes attributes) {
                                                
attributes.setEventPropagation(EventPropagation.STOP_IMMEDIATE);
                                        }
-                                       
+
                                        @Override
-                                       protected void 
onSubmit(AjaxRequestTarget target, Form<?> form) {
+                                       protected void 
onSubmit(AjaxRequestTarget target) {
                                                PrivateMessageFolderDao fDao = 
getBean(PrivateMessageFolderDao.class);
                                                
fDao.delete(item.getModelObject(), getUserId());
                                                
foldersModel.setObject(fDao.get(0, Integer.MAX_VALUE));
@@ -348,7 +347,7 @@ public class MessagesContactsPanel exten
                                setFolderClass(item);
                        }
                }).setOutputMarkupId(true));
-               
+
                SearchableDataProvider<PrivateMessage> sdp = new 
SearchableDataProvider<PrivateMessage>(PrivateMessageDao.class) {
                        private static final long serialVersionUID = 1L;
 
@@ -356,7 +355,7 @@ public class MessagesContactsPanel exten
                        protected PrivateMessageDao getDao() {
                                return (PrivateMessageDao)super.getDao();
                        }
-                       
+
                        @Override
                        public Iterator<? extends PrivateMessage> iterator(long 
first, long count) {
                                allMessages.clear();
@@ -366,7 +365,7 @@ public class MessagesContactsPanel exten
                                boolean isAsc = getSort() == null ? true : 
getSort().isAscending();
                                return getDao().get(getUserId(), 
selectedFolderModel.getObject(), search, sort, isAsc, (int)first, 
(int)count).iterator();
                        }
-                       
+
                        @Override
                        public long size() {
                                return getDao().count(getUserId(), 
selectedFolderModel.getObject(), search);
@@ -431,13 +430,13 @@ public class MessagesContactsPanel exten
                        .addLink(new 
OmOrderByBorder<PrivateMessage>("orderBySend", "inserted", dataContainer));
                add(dataContainer.getLinks());
                add(navigator);
-               
+
                add(unread.setOutputMarkupId(true));
-               
+
                add(buttons.setOutputMarkupId(true));
                buttons.add(toInboxBtn.add(new AjaxEventBehavior("click") {
                        private static final long serialVersionUID = 1L;
-                       
+
                        @Override
                        protected void onEvent(AjaxRequestTarget target) {
                                
getBean(PrivateMessageDao.class).moveMailsToFolder(selectedMessages, 
INBOX_FOLDER_ID);
@@ -446,7 +445,7 @@ public class MessagesContactsPanel exten
                }));
                buttons.add(deleteBtn.add(new AjaxEventBehavior("click") {
                                private static final long serialVersionUID = 1L;
-       
+
                                @Override
                                protected void onEvent(AjaxRequestTarget 
target) {
                                        if 
(TRASH_FOLDER_ID.equals(selectedFolderModel.getObject())) {
@@ -460,7 +459,7 @@ public class MessagesContactsPanel exten
                        }));
                buttons.add(readBtn.add(new AjaxEventBehavior("click") {
                                private static final long serialVersionUID = 1L;
-                               
+
                                @Override
                                protected void onEvent(AjaxRequestTarget 
target) {
                                        
getBean(PrivateMessageDao.class).updateReadStatus(selectedMessages, true);
@@ -470,7 +469,7 @@ public class MessagesContactsPanel exten
                        }));
                buttons.add(unreadBtn.add(new AjaxEventBehavior("click") {
                                private static final long serialVersionUID = 1L;
-                               
+
                                @Override
                                protected void onEvent(AjaxRequestTarget 
target) {
                                        
getBean(PrivateMessageDao.class).updateReadStatus(selectedMessages, false);
@@ -517,12 +516,12 @@ public class MessagesContactsPanel exten
                                selectFolder(selectedFolder, 
selectedFolderModel.getObject(), target);
                        }
                }));
-               
+
                selectMessage(-1, null);
                add(container.add(dv).setOutputMarkupId(true));
                //TODO add valid autoupdate add(new 
AjaxSelfUpdatingTimerBehavior(seconds(15)));
                
add(selectedMessage.add(roomContainer.setVisible(false)).setOutputMarkupId(true));
-               
+
                IDataProvider<UserContact> dp = new 
IDataProvider<UserContact>() {
                        private static final long serialVersionUID = 1L;
 
@@ -551,7 +550,7 @@ public class MessagesContactsPanel exten
                        private String getName(UserContact uc) {
                                return uc.getOwner().getFirstname() + " " + 
uc.getOwner().getLastname(); //FIXME salutation
                        }
-                       
+
                        @Override
                        protected void populateItem(Item<UserContact> item) {
                                UserContact uc = item.getModelObject();
@@ -560,7 +559,7 @@ public class MessagesContactsPanel exten
                                if (uc.isPending()) {
                                        
item.add(AttributeModifier.append("class", "unread"));
                                }
-                               item.add(new Label("name", getName(uc)));       
+                               item.add(new Label("name", getName(uc)));
                                item.add(new 
WebMarkupContainer("accept").add(new AjaxEventBehavior("click") {
                                        private static final long 
serialVersionUID = 1L;
 
@@ -583,14 +582,14 @@ public class MessagesContactsPanel exten
                                item.add(new 
WebMarkupContainer("message").add(AttributeAppender.append("onclick", 
String.format("privateMessage(%s);", userId))).setVisible(!uc.isPending()));
                                item.add(new ConfirmableAjaxBorder("delete", 
getString("80"), getString("833")) {
                                        private static final long 
serialVersionUID = 1L;
-                                       
+
                                        @Override
                                        protected void 
updateAjaxAttributes(AjaxRequestAttributes attributes) {
                                                
attributes.setEventPropagation(EventPropagation.STOP_IMMEDIATE);
                                        }
-                                       
+
                                        @Override
-                                       protected void 
onSubmit(AjaxRequestTarget target, Form<?> form) {
+                                       protected void 
onSubmit(AjaxRequestTarget target) {
                                                
getBean(UserContactDao.class).delete(contactId);
                                                updateContacts(target);
                                        }
@@ -599,7 +598,7 @@ public class MessagesContactsPanel exten
                };
                updateContacts(null);
                add(contacts.add(dw, pendingContacts, 
allContacts).setOutputMarkupId(true));//TODO update
-               
+
                //hack to add FixedHeaderTable after Tabs.
                add(new AbstractDefaultAjaxBehavior() {
                        private static final long serialVersionUID = 1L;
@@ -609,7 +608,7 @@ public class MessagesContactsPanel exten
                                selectFolder(inbox, INBOX_FOLDER_ID, target);
                                selectMessage(-1, target);
                        }
-                       
+
                        @Override
                        public void renderHead(Component component, 
IHeaderResponse response) {
                                super.renderHead(component, response);
@@ -622,7 +621,7 @@ public class MessagesContactsPanel exten
        public void onNewMessageClose(IPartialPageRequestHandler handler) {
                handler.add(container);
        }
-       
+
        @Override
        protected void onDetach() {
                foldersModel.detach();

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/UserProfilePanel.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/UserProfilePanel.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/UserProfilePanel.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/UserProfilePanel.java
 Thu Feb 16 12:58:34 2017
@@ -18,7 +18,7 @@
  */
 package org.apache.openmeetings.web.user.profile;
 
-import static org.apache.openmeetings.util.LocaleHelper.getCountryName;
+import static org.apache.openmeetings.db.util.LocaleHelper.getCountryName;
 import static org.apache.openmeetings.web.app.Application.getBean;
 import static org.apache.openmeetings.web.app.WebSession.getUserId;
 

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/CountryDropDown.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/CountryDropDown.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/CountryDropDown.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/CountryDropDown.java
 Thu Feb 16 12:58:34 2017
@@ -18,8 +18,8 @@
  */
 package org.apache.openmeetings.web.util;
 
-import static org.apache.openmeetings.util.LocaleHelper.getCountries;
-import static org.apache.openmeetings.util.LocaleHelper.getCountryName;
+import static org.apache.openmeetings.db.util.LocaleHelper.getCountries;
+import static org.apache.openmeetings.db.util.LocaleHelper.getCountryName;
 
 import java.util.List;
 

Modified: 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java
 Thu Feb 16 12:58:34 2017
@@ -19,7 +19,7 @@
 package org.apache.openmeetings.core.ldap;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.apache.openmeetings.util.LocaleHelper.validateCountry;
+import static org.apache.openmeetings.db.util.LocaleHelper.validateCountry;
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DEFAULT_GROUP_ID;
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 

Modified: 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java?rev=1783199&r1=1783198&r2=1783199&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
 Thu Feb 16 12:58:34 2017
@@ -19,7 +19,7 @@
 package org.apache.openmeetings.core.remote;
 
 import static 
org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter.nextBroadCastId;
-import static org.apache.openmeetings.util.LocaleHelper.getCountryName;
+import static org.apache.openmeetings.db.util.LocaleHelper.getCountryName;
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DEFAULT_GROUP_ID;
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_FRONTEND_REGISTER_KEY;
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_OAUTH_REGISTER_KEY;
@@ -37,8 +37,10 @@ import java.util.Map;
 import java.util.TimeZone;
 import java.util.UUID;
 
+import org.apache.commons.lang3.time.FastDateFormat;
 import org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter;
 import org.apache.openmeetings.core.remote.util.SessionVariablesUtil;
+import org.apache.openmeetings.db.dao.basic.ChatDao;
 import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
 import org.apache.openmeetings.db.dao.label.LabelDao;
 import org.apache.openmeetings.db.dao.room.RoomDao;
@@ -46,12 +48,14 @@ import org.apache.openmeetings.db.dao.se
 import org.apache.openmeetings.db.dao.server.SessiondataDao;
 import org.apache.openmeetings.db.dao.user.IUserManager;
 import org.apache.openmeetings.db.dao.user.UserDao;
+import org.apache.openmeetings.db.entity.basic.ChatMessage;
 import org.apache.openmeetings.db.entity.room.Client;
 import org.apache.openmeetings.db.entity.room.Room;
 import org.apache.openmeetings.db.entity.server.Sessiondata;
 import org.apache.openmeetings.db.entity.user.Group;
 import org.apache.openmeetings.db.entity.user.GroupUser;
 import org.apache.openmeetings.db.entity.user.User;
+import org.apache.openmeetings.db.util.LocaleHelper;
 import org.apache.openmeetings.util.OmException;
 import org.apache.wicket.util.string.Strings;
 import org.red5.logging.Red5LoggerFactory;
@@ -78,6 +82,8 @@ public class MobileService {
        @Autowired
        private LabelDao labelDao;
        @Autowired
+       private ChatDao chatDao;
+       @Autowired
        private ScopeApplicationAdapter scopeAdapter;
 
        private static void add(Map<String, Object> m, String key, Object v) {
@@ -210,6 +216,7 @@ public class MobileService {
                                c.setUserId(u.getId());
                                c.setFirstname(u.getFirstname());
                                c.setLastname(u.getLastname());
+                               //TODO rights
                                sessionManager.updateClientByStreamId(streamId, 
c, false, null);
 
                                add(result, "sid", sd.getSessionId());
@@ -220,7 +227,7 @@ public class MobileService {
                                add(result, "lastname", u.getLastname());
                                add(result, "login", u.getLogin());
                                add(result, "email", u.getAddress() == null ? 
"" : u.getAddress().getEmail());
-                               add(result, "language", u.getLanguageId()); 
//TODO rights
+                               add(result, "language", u.getLanguageId());
                                add(result, "version", getVersion());
                        }
                }
@@ -303,26 +310,9 @@ public class MobileService {
                return result;
        }
 
+       //designed to do nothing remain for compatibility
        public Map<String, Object> roomConnect(String SID, Long userId) {
-               Map<String, Object> result = new Hashtable<>();
-               /** FIXME TODO
-               User u = userDao.get(userId);
-               Client c = scopeAdapter.setUsernameReconnect(SID, userId, 
u.getLogin(), u.getFirstname(), u.getLastname(), u.getPictureuri());
-                //TODO check if we need anything here
-               long broadcastId = nextBroadCastId();
-               c.setSipTransport(true);
-               c.setRoomId(Long.parseLong(c.getScope()));
-               c.setRoomEnter(new Date());
-               c.setBroadCastID(broadcastId);
-               c.setMobile(true);
-               c.setIsBroadcasting(true);
-               sessionManager.updateClientByStreamId(c.getStreamid(), c, 
false, null);
-               result.put("broadcastId", broadcastId);
-               result.put("publicSid", c.getPublicSID());
-
-               scopeAdapter.sendMessageToCurrentScope("addNewUser", c, false, 
false);
-               */
-               return result;
+               return new Hashtable<>();
        }
 
        public Map<String, Object> updateAvMode(String avMode, String width, 
String height, Integer interviewPodId) {
@@ -346,7 +336,7 @@ public class MobileService {
                
scopeAdapter.sendMessageToCurrentScope("sendVarsToMessageWithClient", hsm, 
true, false);
                return result;
        }
-/*
+
        public void sendChatMessage(String message) {
                IConnection current = Red5.getConnectionLocal();
                Client client = 
sessionManager.getClientByStreamId(current.getClient().getId(), null);
@@ -362,40 +352,42 @@ public class MobileService {
                msg.add("" + client.getUserId());
                Room room = roomDao.get(client.getRoomId());
                msg.add("" + (room.isChatModerated() && !(client.getIsMod() || 
client.getIsSuperModerator())));
-               sendMessageWithClient(msg);
+               //sendMessageWithClient(msg);
 
-               "sendVarsToMessageWithClient"
+               //"sendVarsToMessageWithClient"
+       }
+
+       private static boolean isModerator(Client c) {
+               return c.getIsMod() || c.getIsSuperModerator();
        }
 
        public List<Map<String, Object>> getRoomChatHistory() {
+               List<Map<String,Object>> myChatList = new ArrayList<>();
                try {
                        IConnection current = Red5.getConnectionLocal();
-                       Client currentClient = 
this.sessionManager.getClientByStreamId(current.getClient().getId(), null);
-                       Long roomId = currentClient.getRoomId();
+                       Client c = 
sessionManager.getClientByStreamId(current.getClient().getId(), null);
+                       Long roomId = c.getRoomId();
 
                        log.debug("GET CHATROOM: " + roomId);
 
-                       List<Map<String,Object>> myChatList = 
myChats.get(roomId);
-                       if (myChatList==null) myChatList = new 
ArrayList<Map<String,Object>>();
-
-                       if (!currentClient.getIsMod() && 
!currentClient.getIsSuperModerator()) {
-                               //current user is not moderator, chat history 
need to be filtered
-                               List<Map<String,Object>> tmpChatList = new 
LinkedList<Map<String,Object>>(myChatList);
-                               for (int i = tmpChatList.size() - 1; i > -1; 
--i) {
-                                       @SuppressWarnings("rawtypes")
-                                       List msgList = 
(List)tmpChatList.get(i).get("message");
-                                       if (Boolean.valueOf("" + 
msgList.get(9))) { //needModeration
-                                               tmpChatList.remove(i);
-                                       }
-                               }
-                               myChatList = tmpChatList;
+                       Room r = roomDao.get(roomId);
+                       User u = userDao.get(c.getUserId());
+                       FastDateFormat format = 
FastDateFormat.getDateTimeInstance(
+                                       FastDateFormat.SHORT
+                                       , FastDateFormat.SHORT
+                                       , 
TimeZone.getTimeZone(u.getTimeZoneId())
+                                       , LocaleHelper.getLocale(u));
+                       for (ChatMessage m : chatDao.getRoom(roomId, 0, 30, 
!r.isChatModerated() || isModerator(c))) {
+                               Map<String, Object> mm = new HashMap<>();
+                               mm.put("from", String.format("%s %s", 
m.getFromUser().getFirstname(), m.getFromUser().getLastname()));
+                               mm.put("time", format.format(m.getSent()));
+                               mm.put("msg", m.getMessage());
+                               myChatList.add(mm);
                        }
 
-                       return myChatList;
                } catch (Exception err) {
                        log.error("[getRoomChatHistory] ",err);
-                       return null;
                }
+               return myChatList;
        }
-*/
 }


Reply via email to