Author: sebawagner
Date: Sat Sep 29 11:43:02 2012
New Revision: 1391784

URL: http://svn.apache.org/viewvc?rev=1391784&view=rev
Log:
OPENMEETINGS-434 fix fetch strategy for Users, rename attribute, fix UI for 
username

Modified:
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdminValueForm.lzx
    
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/Organisationmanagement.java
    
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Configuration.java
    
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/config/TestConfig.java
    
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigForm.java
    
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigsPanel.html

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdminValueForm.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdminValueForm.lzx?rev=1391784&r1=1391783&r2=1391784&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdminValueForm.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdminValueForm.lzx
 Sat Sep 29 11:43:02 2012
@@ -71,7 +71,7 @@
                        this.conf_value.setAttribute('text',obj.conf_value);
                        this.updatetime.setAttribute('text',obj.updatetime);
             if(obj.users!=null){
-                           
this.users_login.setAttribute('text',obj.users.login);
+                           
this.users_login.setAttribute('text',obj.user.login);
             } else {
                 this.users_login.setAttribute('text','');
             }

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/Organisationmanagement.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/Organisationmanagement.java?rev=1391784&r1=1391783&r2=1391784&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/Organisationmanagement.java
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/Organisationmanagement.java
 Sat Sep 29 11:43:02 2012
@@ -212,7 +212,6 @@ public class Organisationmanagement {
         * @param organisation_id
         * @param orgname
         * @param users_id
-        * @param users
         * @return
         */
        public Long updateOrganisation(Long user_level, long organisation_id,

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Configuration.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Configuration.java?rev=1391784&r1=1391783&r2=1391784&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Configuration.java
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Configuration.java
 Sat Sep 29 11:43:02 2012
@@ -44,103 +44,109 @@ import org.simpleframework.xml.Root;
                @NamedQuery(name = "getConfigurationByKey", query = "SELECT c 
FROM Configuration c WHERE c.conf_key LIKE :conf_key and c.deleted = false"),
                @NamedQuery(name = "getConfigurationsByKeys", query = "SELECT c 
FROM Configuration c WHERE c.conf_key IN :conf_keys and c.deleted = false"),
                @NamedQuery(name = "getNondeletedConfiguration", query = 
"SELECT c FROM Configuration c  "
-                               + "LEFT JOIN c.users users WHERE c.deleted = 
false"),
-               @NamedQuery(name = "getConfigurationById", query = "SELECT c 
FROM Configuration c WHERE c.configuration_id = :configuration_id and c.deleted 
= false")
-})
+                               + "LEFT JOIN FETCH c.user WHERE c.deleted = 
false"),
+               @NamedQuery(name = "getConfigurationById", query = "SELECT c 
FROM Configuration c WHERE c.configuration_id = :configuration_id and c.deleted 
= false") })
 @Table(name = "configuration")
-@Root(name="config")
+@Root(name = "config")
 public class Configuration implements Serializable, OmEntity {
        private static final long serialVersionUID = -6129473946508963339L;
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
-       @Column(name="id")
-       @Element(name="id", data=true)
+       @Column(name = "id")
+       @Element(name = "id", data = true)
        private Long configuration_id;
-       
-       @Column(name="conf_key")
-       @Element(name="key", data=true)
+
+       @Column(name = "conf_key")
+       @Element(name = "key", data = true)
        private String conf_key;
-       
-       @Column(name="conf_value")
-       @Element(name="value", data=true, required = false)
+
+       @Column(name = "conf_value")
+       @Element(name = "value", data = true, required = false)
        private String conf_value;
-       
-       @Column(name="starttime")
-       @Element(name="created", data=true, required=false)
+
+       @Column(name = "starttime")
+       @Element(name = "created", data = true, required = false)
        private Date starttime;
-       
-       @Column(name="updatetime")
-       @Element(name="updated", data=true, required=false)
+
+       @Column(name = "updatetime")
+       @Element(name = "updated", data = true, required = false)
        private Date updatetime;
-       
+
        @Lob
-       @Column(name="comment_field", length=2048)
-       @Element(data=true, required = false)
+       @Column(name = "comment_field", length = 2048)
+       @Element(data = true, required = false)
        private String comment;
-       
-       @Column(name="deleted")
-       @Element(data=true)
+
+       @Column(name = "deleted")
+       @Element(data = true)
        private boolean deleted;
-       
-       @Column(name="user_id")
-       @Element(data=true, required=false)
+
+       @Column(name = "user_id")
+       @Element(data = true, required = false)
        private Long user_id;
 
        @ManyToOne(fetch = FetchType.LAZY)
        @JoinColumn(name = "user_id")
        @Element(name = "user_id", data = true, required = false)
-       private Users users;
-       
-    public String getComment() {
-        return comment;
-    }
-    public void setComment(String comment) {
-        this.comment = comment;
-    }
-    
-    public String getConf_key() {
-        return conf_key;
-    }
-    public void setConf_key(String conf_key) {
-        this.conf_key = conf_key;
-    }
-    
-    public String getConf_value() {
-        return conf_value;
-    }
-    public void setConf_value(String conf_value) {
-        this.conf_value = conf_value;
-    }
-    
-    public Long getConfiguration_id() {
-        return configuration_id;
-    }
-    public void setConfiguration_id(Long configuration_id) {
-        this.configuration_id = configuration_id;
-    }
-    
+       private Users user;
+
+       public String getComment() {
+               return comment;
+       }
+
+       public void setComment(String comment) {
+               this.comment = comment;
+       }
+
+       public String getConf_key() {
+               return conf_key;
+       }
+
+       public void setConf_key(String conf_key) {
+               this.conf_key = conf_key;
+       }
+
+       public String getConf_value() {
+               return conf_value;
+       }
+
+       public void setConf_value(String conf_value) {
+               this.conf_value = conf_value;
+       }
+
+       public Long getConfiguration_id() {
+               return configuration_id;
+       }
+
+       public void setConfiguration_id(Long configuration_id) {
+               this.configuration_id = configuration_id;
+       }
+
        public Date getStarttime() {
                return starttime;
        }
+
        public void setStarttime(Date starttime) {
                this.starttime = starttime;
        }
-    
+
        public Date getUpdatetime() {
                return updatetime;
        }
+
        public void setUpdatetime(Date updatetime) {
                this.updatetime = updatetime;
        }
-       
+
        public boolean getDeleted() {
                return deleted;
        }
+
        public void setDeleted(boolean deleted) {
                this.deleted = deleted;
        }
-       
-    public Long getUser_id() {
+
+       public Long getUser_id() {
                return user_id;
        }
 
@@ -148,12 +154,12 @@ public class Configuration implements Se
                this.user_id = user_id;
        }
 
- public Users getUsers() {
-     return users;
- }
- public void setUsers(Users users) {
-     this.users = users;
- }
+       public Users getUser() {
+               return user;
+       }
+
+       public void setUsers(Users user) {
+               this.user = user;
+       }
 
-       
 }

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/config/TestConfig.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/config/TestConfig.java?rev=1391784&r1=1391783&r2=1391784&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/config/TestConfig.java
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/config/TestConfig.java
 Sat Sep 29 11:43:02 2012
@@ -51,9 +51,9 @@ public class TestConfig extends Abstract
                                        "smtp_server");
                        
                        System.err.println("smtp_server " + 
smtp_server.getUser_id());
-                       System.err.println("smtp_server " + 
smtp_server.getUsers());
+                       System.err.println("smtp_server " + 
smtp_server.getUser());
                        
-                       assertEquals(null, smtp_server.getUsers());
+                       assertEquals(null, smtp_server.getUser());
 
                } catch (Exception err) {
                        log.error("[startConversion]", err);
@@ -65,14 +65,18 @@ public class TestConfig extends Abstract
        public void getConfigs() {
                
                try {
-                       List<Configuration> list = 
configurationmanagement.get(0, 1);
+                       List<Configuration> list = 
configurationmanagement.get(4, 6);
                        
                        for (Configuration conf : list) {
+                               System.err.println("conf.getConf_key() " + 
conf.getConf_key());
                                System.err.println("conf.getUser_id() " + 
conf.getUser_id());
-                               System.err.println("conf.getUsers() " + 
conf.getUsers());
+                               if (conf.getUser() != null) {
+                                       System.err.println("conf.getUsers() "
+                                                       + 
conf.getUser().getLogin());
+                               }
                        }
 
-                       assertEquals(list.size(), 1);
+                       assertEquals(list.size(), 6);
 
                } catch (Exception err) {
                        log.error("[startConversion]", err);

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigForm.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigForm.java?rev=1391784&r1=1391783&r2=1391784&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigForm.java
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigForm.java
 Sat Sep 29 11:43:02 2012
@@ -52,7 +52,7 @@ public class ConfigForm extends AdminBas
                add(new RequiredTextField<String>("conf_key"));
                add(new RequiredTextField<String>("conf_value"));
                add(DateLabel.forDatePattern("updatetime", "dd.MM.yyyy 
HH:mm:ss"));
-               add(new Label("users.login"));
+               add(new Label("user.login"));
                add(new TextArea<String>("comment"));
                
                // attach an ajax validation behavior to all form component's 
keydown

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigsPanel.html
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigsPanel.html?rev=1391784&r1=1391783&r2=1391784&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigsPanel.html
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/configurations/ConfigsPanel.html
 Sat Sep 29 11:43:02 2012
@@ -57,7 +57,7 @@
                                    <br/>
                                    <wicket:ommessage key="268" />: <span 
wicket:id="updatetime"/>
                                    <br/>
-                                   <wicket:ommessage key="269" />: <span 
wicket:id="users.login"/>
+                                   <wicket:ommessage key="269" />: <span 
wicket:id="user.login"/>
                                    <br/>
                                    <wicket:ommessage key="270" />: <textarea 
wicket:id="comment"/>
                                    <br/>


Reply via email to