The issue is that we give those objects to the client and SOAP/REST API.
That means you have to be careful about what UI parts in the client
will change too.
And for the SOAP/REST API all integration plugins might fail.
For example if you rename room_id to id => almost all old integration
code won't work anymore.

So from my point of view we will have to check in-detail which renames
we are going to make and what possible side effects that might have.
The SOAP/REST API should return exactly the same no matter what
OpenMeetings version you are using.
On the long run it would be better to have separated objects for the
SOAP/REST API as return types so that we can make changes to the core
without affecting the Return Types.

Sebastian

2012/7/26 Maxim Solodovnik <[email protected]>:
> Hello Sebastian,
>
> I thought of more massive cleanup like:
> typo correction (Address instead of Adresses and adress)
> field renaming
> table name shortening
>
> This will make the code cleaner
>
> I can revert if you feel this shouldn't be done.
>
>
> On Thu, Jul 26, 2012 at 2:45 AM, [email protected]
> <[email protected]> wrote:
>>
>> Hi Maxim,
>>
>> I thought we would only change the database mapping in the ORM layer.
>> Do you intend to change attribute names in Java Beans too?
>>
>> Sebastian
>>
>> 2012/7/25  <[email protected]>:
>> > Author: solomax
>> > Date: Wed Jul 25 17:15:53 2012
>> > New Revision: 1365669
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1365669&view=rev
>> > Log:
>> > OPENMEETINGS-107 partially fixed
>> >
>> > Modified:
>> >
>> > incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdmin.lzx
>> >
>> > incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdminValueForm.lzx
>> >
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/basic/Configurationmanagement.java
>> >
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/persistence/beans/basic/Configuration.java
>> >
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/ConfigurationService.java
>> >
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/BackupExport.java
>> >
>> > Modified:
>> > incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdmin.lzx
>> > URL:
>> > http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdmin.lzx?rev=1365669&r1=1365668&r2=1365669&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdmin.lzx
>> > (original)
>> > +++
>> > incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/admin/confadmin/confAdmin.lzx
>> > Wed Jul 25 17:15:53 2012
>> > @@ -69,7 +69,7 @@
>> >                 for (var i=0;i<records.length;i++){
>> >                         new
>> > lz.confAdminListItem(this._innerlist._inn._inn,{
>> >                             obj:records[i],
>> > -
>> > configuration_id:records[i].configuration_id,
>> > +                           configuration_id:records[i].id,
>> >                             conf_key:records[i].conf_key,
>> >                          conf_value:records[i].conf_value
>> >                      });
>> >
>> > 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=1365669&r1=1365668&r2=1365669&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
>> > Wed Jul 25 17:15:53 2012
>> > @@ -56,7 +56,7 @@
>> >         <!-- methods -->
>> >
>> >      <method name="initValueFieldsByObject" args="obj">
>> > -               this.configuration_id = obj.configuration_id;
>> > +               this.configuration_id = obj.id;
>> >                 if (this.configuration_id!=0){
>> >                         this.getConfByConfigurationId.doCall();
>> >                 }
>> >
>> > Modified:
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/basic/Configurationmanagement.java
>> > URL:
>> > http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/basic/Configurationmanagement.java?rev=1365669&r1=1365668&r2=1365669&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/basic/Configurationmanagement.java
>> > (original)
>> > +++
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/data/basic/Configurationmanagement.java
>> > Wed Jul 25 17:15:53 2012
>> > @@ -139,14 +139,14 @@ public class Configurationmanagement {
>> >         }
>> >
>> >         public Configuration getConfByConfigurationId(long user_level,
>> > -                       long configuration_id) {
>> > +                       long id) {
>> >                 try {
>> >                         log.debug("getConfByConfigurationId1: user_level
>> > " + user_level);
>> >                         if
>> > (authLevelManagement.checkAdminLevel(user_level)) {
>> >                                 Configuration configuration = null;
>> >                                 TypedQuery<Configuration> query = em
>> > -                                               .createQuery("select c
>> > from Configuration as c where c.configuration_id = :configuration_id",
>> > Configuration.class);
>> > -                               query.setParameter("configuration_id",
>> > configuration_id);
>> > +                                               .createQuery("select c
>> > from Configuration as c where c.id = :id", Configuration.class);
>> > +                               query.setParameter("id", id);
>> >                                 query.setMaxResults(1);
>> >                                 try {
>> >                                         configuration =
>> > query.getSingleResult();
>> > @@ -223,7 +223,7 @@ public class Configurationmanagement {
>> >                         log.debug("selectMaxFromConfigurations ");
>> >                         // get all users
>> >                         TypedQuery<Long> query = em
>> > -                                       .createQuery("select
>> > count(c.configuration_id) from Configuration c where c.deleted = false",
>> > Long.class);
>> > +                                       .createQuery("select count(c.id)
>> > from Configuration c where c.deleted = false", Long.class);
>> >                         List<Long> ll = query.getResultList();
>> >                         log.debug("selectMaxFromConfigurations" +
>> > ll.get(0));
>> >                         return ll.get(0);
>> > @@ -264,18 +264,18 @@ public class Configurationmanagement {
>> >                                 Configuration conf = (Configuration)
>> > CastMapToObject
>> >
>> > .getInstance().castByGivenObject(values,
>> >
>> > Configuration.class);
>> > -                               if
>> > (conf.getConfiguration_id().equals(null)
>> > -                                               ||
>> > conf.getConfiguration_id() == 0) {
>> > +                               if (conf.getId().equals(null)
>> > +                                               || conf.getId() == 0) {
>> >                                         log.info("add new
>> > Configuration");
>> > -                                       conf.setConfiguration_id(null);
>> > +                                       conf.setId(null);
>> >                                         conf.setStarttime(new Date());
>> >                                         conf.setDeleted(false);
>> >                                         return this.addConfig(conf);
>> >                                 } else {
>> >                                         log.info("update Configuration
>> > ID: "
>> > -                                                       +
>> > conf.getConfiguration_id());
>> > +                                                       + conf.getId());
>> >                                         Configuration conf2 =
>> > this.getConfByConfigurationId(3L,
>> > -
>> > conf.getConfiguration_id());
>> > +                                                       conf.getId());
>> >
>> > conf2.setComment(conf.getComment());
>> >
>> > conf2.setConf_key(conf.getConf_key());
>> >
>> > conf2.setConf_value(conf.getConf_value());
>> > @@ -297,8 +297,7 @@ public class Configurationmanagement {
>> >         public Long addConfig(Configuration conf) {
>> >                 try {
>> >                         conf = em.merge(conf);
>> > -                       Long configuration_id =
>> > conf.getConfiguration_id();
>> > -                       return configuration_id;
>> > +                       return conf.getId();
>> >                 } catch (Exception ex2) {
>> >                         log.error("[updateConfByUID]: ", ex2);
>> >                 }
>> > @@ -307,7 +306,7 @@ public class Configurationmanagement {
>> >
>> >         public Long updateConfig(Configuration conf) {
>> >                 try {
>> > -                       if (conf.getConfiguration_id() == null) {
>> > +                       if (conf.getId() == null) {
>> >                                 em.persist(conf);
>> >                         } else {
>> >                                 if (!em.contains(conf)) {
>> > @@ -319,7 +318,7 @@ public class Configurationmanagement {
>> >                         } else if
>> > ("show.whiteboard.draw.status".equals(conf.getConf_key())) {
>> >
>> > ScopeApplicationAdapter.whiteboardDrawStatus =
>> > "1".equals(conf.getConf_value());
>> >                         }
>> > -                       return conf.getConfiguration_id();
>> > +                       return conf.getId();
>> >                 } catch (Exception ex2) {
>> >                         log.error("[updateConfByUID]: ", ex2);
>> >                 }
>> > @@ -338,7 +337,7 @@ public class Configurationmanagement {
>> >                                 conf.setDeleted(true);
>> >
>> >                                 Configuration conf2 =
>> > this.getConfByConfigurationId(3L,
>> > -
>> > conf.getConfiguration_id());
>> > +                                               conf.getId());
>> >                                 conf2.setComment(conf.getComment());
>> >                                 conf2.setConf_key(conf.getConf_key());
>> >
>> > conf2.setConf_value(conf.getConf_value());
>> >
>> > Modified:
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/persistence/beans/basic/Configuration.java
>> > URL:
>> > http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/persistence/beans/basic/Configuration.java?rev=1365669&r1=1365668&r2=1365669&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/persistence/beans/basic/Configuration.java
>> > (original)
>> > +++
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/persistence/beans/basic/Configuration.java
>> > Wed Jul 25 17:15:53 2012
>> > @@ -46,8 +46,8 @@ public class Configuration implements Se
>> >         @Id
>> >         @GeneratedValue(strategy = GenerationType.IDENTITY)
>> >
>> > -       @Column(name="configuration_id")
>> > -       private Long configuration_id;
>> > +       @Column(name="id")
>> > +       private Long id;
>> >         @Column(name="conf_key")
>> >         private String conf_key;
>> >         @Column(name="conf_value")
>> > @@ -88,11 +88,11 @@ public class Configuration implements Se
>> >          this.conf_value = conf_value;
>> >      }
>> >
>> > -    public Long getConfiguration_id() {
>> > -        return configuration_id;
>> > +    public Long getId() {
>> > +        return id;
>> >      }
>> > -    public void setConfiguration_id(Long configuration_id) {
>> > -        this.configuration_id = configuration_id;
>> > +    public void setId(Long id) {
>> > +        this.id = id;
>> >      }
>> >
>> >         public Date getStarttime() {
>> >
>> > Modified:
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/ConfigurationService.java
>> > URL:
>> > http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/ConfigurationService.java?rev=1365669&r1=1365668&r2=1365669&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/ConfigurationService.java
>> > (original)
>> > +++
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/app/remote/ConfigurationService.java
>> > Wed Jul 25 17:15:53 2012
>> > @@ -49,10 +49,10 @@ public class ConfigurationService {
>> >          return cfgManagement.getAllConf(user_level, start, max,
>> > orderby, asc);
>> >      }
>> >
>> > -    public Configuration getConfByConfigurationId(String SID,long
>> > configuration_id){
>> > +    public Configuration getConfByConfigurationId(String SID,long id){
>> >          Long users_id = sessionManagement.checkSession(SID);
>> >          Long user_level = userManagement.getUserLevelByID(users_id);
>> > -        return
>> > cfgManagement.getConfByConfigurationId(user_level,configuration_id);
>> > +        return cfgManagement.getConfByConfigurationId(user_level,id);
>> >      }
>> >
>> >      public Long saveOrUpdateConfiguration(String SID,
>> > LinkedHashMap<String, ?> values){
>> >
>> > Modified:
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/BackupExport.java
>> > URL:
>> > http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/BackupExport.java?rev=1365669&r1=1365668&r2=1365669&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/BackupExport.java
>> > (original)
>> > +++
>> > incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/servlet/outputhandler/BackupExport.java
>> > Wed Jul 25 17:15:53 2012
>> > @@ -1635,7 +1635,7 @@ public class BackupExport {
>> >
>> >                 for (Configuration cfg : configs) {
>> >                         Element cfgElem =
>> > configsElem.addElement("config");
>> > -
>> > cfgElem.addElement("id").addCDATA(formatString("" +
>> > cfg.getConfiguration_id()));
>> > +
>> > cfgElem.addElement("id").addCDATA(formatString("" + cfg.getId()));
>> >
>> > cfgElem.addElement("comment").addCDATA(formatString("" + 
>> > cfg.getComment()));
>> >
>> > cfgElem.addElement("key").addCDATA(formatString(cfg.getConf_key()));
>> >
>> > cfgElem.addElement("value").addCDATA(formatString(cfg.getConf_value()));
>> >
>> >
>>
>>
>>
>> --
>> Sebastian Wagner
>> https://twitter.com/#!/dead_lock
>> http://www.openmeetings.de
>> http://www.webbase-design.de
>> http://www.wagner-sebastian.com
>> [email protected]
>
>
>
>
> --
> WBR
> Maxim aka solomax



-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.openmeetings.de
http://www.webbase-design.de
http://www.wagner-sebastian.com
[email protected]

Reply via email to