← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21569: Renamed trackedentityattributevalue > encrypted_value to encryptedvalue

 

------------------------------------------------------------
revno: 21569
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-01-04 11:26:11 +0100
message:
  Renamed trackedentityattributevalue > encrypted_value to encryptedvalue
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValue.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/trackedentityattributevalue/hibernate/TrackedEntityAttributeValue.hbm.xml


--
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/trackedentityattributevalue/TrackedEntityAttributeValue.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValue.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValue.java	2016-01-04 10:26:11 +0000
@@ -255,8 +255,8 @@
     }
 
     /**
-     * Returns the encrypted or the plain-text value, based on the attribute's
-     * confidential value.
+     * Returns the encrypted or the plain-text value based on the confidential
+     * state of the attribute.
      *
      * @return String with value, either plain-text or decrypted.
      */
@@ -269,11 +269,11 @@
     }
 
     /**
-     * Since we never can be 100% certain Attribute is not null, we store the
-     * value in a temporary variable. The getEncrypted and getPlaintext methods
-     * will handle this value when requested.
+     * Property which temporarily stores the attribute value. The 
+     * {@link getEncryptedValue} and {@link getPlainValue} methods handle the 
+     * value when requested.
      *
-     * @param value the value to be stored
+     * @param value the value to be stored.
      */
     public void setValue( String value )
     {

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java	2016-01-04 10:26:11 +0000
@@ -33,13 +33,9 @@
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.jdbc.StatementBuilder;
 import org.hisp.dhis.system.startup.AbstractStartupRoutine;
-import org.jasypt.encryption.pbe.PBEStringEncryptor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-import javax.annotation.Resource;
-
-
 /**
  * @author Lars Helge Overland
  */
@@ -54,12 +50,6 @@
     @Autowired
     private StatementBuilder statementBuilder;
 
-    @Resource( name = "stringEncryptor" )
-    PBEStringEncryptor oldPBEStringEncryptor;
-
-    @Resource( name = "strongStringEncryptor" )
-    PBEStringEncryptor newPBEStringEncryptor;
-
     // -------------------------------------------------------------------------
     // Execute
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2016-01-04 10:26:11 +0000
@@ -865,6 +865,7 @@
         executeSql( "update keyjsonvalue set namespacekey = key where namespacekey is null" );
         executeSql( "alter table keyjsonvalue alter column namespacekey set not null" );
         executeSql( "alter table keyjsonvalue drop column key" );
+        executeSql( "alter table trackedentityattributevalue drop column encrypted_value" );
 
         // Remove data mart
         executeSql( "drop table aggregateddatasetcompleteness" );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/trackedentityattributevalue/hibernate/TrackedEntityAttributeValue.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/trackedentityattributevalue/hibernate/TrackedEntityAttributeValue.hbm.xml	2015-12-16 13:23:46 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/trackedentityattributevalue/hibernate/TrackedEntityAttributeValue.hbm.xml	2016-01-04 10:26:11 +0000
@@ -19,7 +19,7 @@
 
     <property name="plainValue" column="value" access="property" length="50000" />
 
-    <property name="encryptedValue" column="encrypted_value" access="property" type="AESEncryptedString" />
+    <property name="encryptedValue" column="encryptedvalue" access="property" type="AESEncryptedString" />
 
   </class>
 </hibernate-mapping>