Changeset 30055 for main/trunk/greenstone3/src/java
- Timestamp:
- 2015-07-24T22:48:03+12:00 (9 years ago)
- Location:
- main/trunk/greenstone3/src/java/org/greenstone/gsdl3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/sql/derby/DerbySQLServer.java
r30043 r30055 12 12 public class DerbySQLServer implements SQLServer{ 13 13 14 static final String PORT = GlobalProperties.getProperty("derby.server.port" );//, "1527");15 static final String DERBYSERVER = GlobalProperties.getProperty("derby.server" );//, "localhost");14 static final String PORT = GlobalProperties.getProperty("derby.server.port", "1527"); 15 static final String DERBYSERVER = GlobalProperties.getProperty("derby.server", "localhost"); 16 16 static final String PROTOCOL = "jdbc:derby://"+DERBYSERVER+":"+PORT+"/"; // "jdbc:derby://localhost:1527"; 17 17 static final String DRIVER = "org.apache.derby.jdbc.ClientDriver"; //"org.apache.derby.jdbc.EmbeddedDriver"; -
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DerbyWrapper.java
r30043 r30055 35 35 public class DerbyWrapper 36 36 { 37 static final String PORT = GlobalProperties.getProperty("derby.server.port" );//, "1527");38 static final String DERBYSERVER = GlobalProperties.getProperty("derby.server" );//, "localhost");37 static final String PORT = GlobalProperties.getProperty("derby.server.port", "1527"); 38 static final String DERBYSERVER = GlobalProperties.getProperty("derby.server", "localhost"); 39 39 static final String PROTOCOL = "jdbc:derby://"+DERBYSERVER+":"+PORT+"/"; // "jdbc:derby://localhost:1527"; 40 40 static final String DRIVER = "org.apache.derby.jdbc.ClientDriver"; //"org.apache.derby.jdbc.EmbeddedDriver"; -
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/ModifyUsersDB.java
r29467 r30055 27 27 public class ModifyUsersDB 28 28 { 29 public static int PWD_MIN_LENGTH = 3; 30 public static int PWD_MAX_LENGTH = 20; 29 31 30 32 public static void main(String[] args) throws SQLException … … 49 51 50 52 // If the user specifically sets any of the fields on the cmdline, they'll be overwritten in the db, 51 // even if the user had set them to empty. Except the password which must be between 3 and 8characters.53 // even if the user had set them to empty. Except the password which must be between PWD_MIN_LENGTH and PWD_MAX_LENGTH characters. 52 54 for (int i = 2; i < args.length; i++) 53 55 { … … 56 58 password = args[i].substring("password=".length()); 57 59 58 if (password.length() < 3 || password.length() > 8)60 if (password.length() < PWD_MIN_LENGTH || password.length() > PWD_MAX_LENGTH) 59 61 { 60 62 if (!password.equals("")) 61 63 { 62 System.out.println("Password not updated. It should be between 3 and 8characters (inclusive).");64 System.out.println("Password not updated. It should be between " + PWD_MIN_LENGTH + " and " + PWD_MAX_LENGTH + " characters (inclusive)."); 63 65 } 64 66 }
Note:
See TracChangeset
for help on using the changeset viewer.