← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22161: Translations, method naming

 

------------------------------------------------------------
revno: 22161
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-03-07 17:43:07 +0100
message:
  Translations, method naming
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/translation/TranslationService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/translation/TranslationStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultSchemaService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/DefaultTranslationService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/hibernate/HibernateTranslationStore.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/translation/TranslationService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/translation/TranslationService.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/translation/TranslationService.java	2016-03-07 16:43:07 +0000
@@ -145,5 +145,11 @@
 
     void createOrUpdate( Translation translation );
 
-    boolean haveTranslations( String className );
+    /**
+     * Indicates whether translations exist for the given class name.
+     * 
+     * @param className the class name.
+     * @return true if translations exist.
+     */
+    boolean hasTranslations( String className );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/translation/TranslationStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/translation/TranslationStore.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/translation/TranslationStore.java	2016-03-07 16:43:07 +0000
@@ -110,5 +110,11 @@
      */
     void deleteTranslations( String className, String objectUid );
 
-    boolean haveTranslations( String className );
+    /**
+     * Indicates whether translations exist for the given class name.
+     * 
+     * @param className the class name.
+     * @return true if translations exist.
+     */
+    boolean hasTranslations( String className );
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultSchemaService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultSchemaService.java	2016-03-07 14:09:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/DefaultSchemaService.java	2016-03-07 16:43:07 +0000
@@ -83,7 +83,7 @@
             if ( sessionFactory.getClassMetadata( schema.getKlass() ) != null )
             {
                 schema.setPersisted( true );
-                schema.setTranslated( translationService.haveTranslations( schema.getKlass().getSimpleName() ) );
+                schema.setTranslated( translationService.hasTranslations( schema.getKlass().getSimpleName() ) );
             }
 
             schema.setDisplayName( beautify( schema.getName() ) );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/DefaultTranslationService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/DefaultTranslationService.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/DefaultTranslationService.java	2016-03-07 16:43:07 +0000
@@ -157,8 +157,8 @@
     }
 
     @Override
-    public boolean haveTranslations( String className )
+    public boolean hasTranslations( String className )
     {
-        return translationStore.haveTranslations( className );
+        return translationStore.hasTranslations( className );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/hibernate/HibernateTranslationStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/hibernate/HibernateTranslationStore.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/hibernate/HibernateTranslationStore.java	2016-03-07 16:43:07 +0000
@@ -178,7 +178,7 @@
     }
 
     @Override
-    public boolean haveTranslations( String className )
+    public boolean hasTranslations( String className )
     {
         Session session = sessionFactory.getCurrentSession();