]> WPIA git - gigi.git/commitdiff
upd: replace the word state by country when used in country context
authorINOPIAE <m.maengel@inopiae.de>
Wed, 17 Aug 2016 09:25:30 +0000 (11:25 +0200)
committerINOPIAE <m.maengel@inopiae.de>
Fri, 19 Aug 2016 17:04:22 +0000 (19:04 +0200)
Change-Id: I6dd378bfc7964810751a325e62bed7b502e51f2a

src/org/cacert/gigi/dbObjects/Organisation.java
src/org/cacert/gigi/output/CountrySelector.java

index 7f6df7520717cd80c33b48f12ab53a1916bb4309..9c57049a969ed4a2e18045183bc92cefaeb1b75d 100644 (file)
@@ -54,7 +54,7 @@ public class Organisation extends CertificateOwner {
 
     private String name;
 
-    private Country state;
+    private Country country;
 
     private String province;
 
@@ -66,15 +66,15 @@ public class Organisation extends CertificateOwner {
 
     private String postalAddress;
 
-    public Organisation(String name, Country state, String province, String city, String email, String optionalName, String postalAddress, User creator) throws GigiApiException {
+    public Organisation(String name, Country country, String province, String city, String email, String optionalName, String postalAddress, User creator) throws GigiApiException {
         if ( !creator.isInGroup(Group.ORGASSURER)) {
             throw new GigiApiException("Only Organisation RA Agents may create organisations.");
         }
-        if (state == null) {
+        if (country == null) {
             throw new GigiApiException("Got country code of illegal type.");
         }
         this.name = name;
-        this.state = state;
+        this.country = country;
         this.province = province;
         this.city = city;
         this.email = email;
@@ -84,7 +84,7 @@ public class Organisation extends CertificateOwner {
         try (GigiPreparedStatement ps = new GigiPreparedStatement("INSERT INTO organisations SET id=?, name=?, state=?, province=?, city=?, contactEmail=?, optional_name=?, postal_address=?, creator=?")) {
             ps.setInt(1, id);
             ps.setString(2, name);
-            ps.setString(3, state.getCode());
+            ps.setString(3, country.getCode());
             ps.setString(4, province);
             ps.setString(5, city);
             ps.setString(6, email);
@@ -100,7 +100,7 @@ public class Organisation extends CertificateOwner {
     protected Organisation(GigiResultSet rs) throws GigiApiException {
         super(rs.getInt("id"));
         name = rs.getString("name");
-        state = Country.getCountryByCode(rs.getString("state"), CountryCodeType.CODE_2_CHARS);
+        country = Country.getCountryByCode(rs.getString("state"), CountryCodeType.CODE_2_CHARS);
         province = rs.getString("province");
         city = rs.getString("city");
         email = rs.getString("contactEmail");
@@ -113,7 +113,7 @@ public class Organisation extends CertificateOwner {
     }
 
     public Country getState() {
-        return state;
+        return country;
     }
 
     public String getProvince() {
@@ -228,7 +228,7 @@ public class Organisation extends CertificateOwner {
             ps.executeUpdate();
         }
         name = o;
-        state = c;
+        country = c;
         province = st;
         city = l;
     }
index c58600a74bd961a0f60310d494b717dafcc31a3c..bb1fab920e661dca205f49173c59fe54413161da 100644 (file)
@@ -30,9 +30,9 @@ public class CountrySelector implements Outputable {
         this.optional = optional;
     }
 
-    public CountrySelector(String name, boolean optional, Country state) {
+    public CountrySelector(String name, boolean optional, Country country) {
         this(name, optional);
-        selected = state;
+        selected = country;
     }
 
     public void update(HttpServletRequest r) throws GigiApiException {