perfsonar-dev - Web-Admin Update
Subject: perfsonar development work
List archive
- From: Michael Michalis <>
- To: "" <>
- Subject: Web-Admin Update
- Date: Tue, 15 Apr 2008 10:08:27 +0300
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi All,
I have made a reference implementation for the new updated wizard that includes AS configuration. You can find the updated wizard.properties file here:
http://anonsvn.internet2.edu/svn/perfsonar/branches/WebAdmin/wizard.properties
I've also updated the example ConfigurationHandler for the RRD MA to handle the AS configuration. You can find the code here:
http://anonsvn.internet2.edu/svn/perfsonar/branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMAHandler.java
The code changes are very minor:
/**
* Method for handling all configuration actions regarding any other group
* besides LS and eXist
*
* @param group
* The group
* @param functionProperties
* The properties regardung the group
* @throws IOException
*/
private void otherActions(String group, WizardProperties functionProperties)
throws IOException {
// The only other group for rrd ma is the Store group
// So in this case changes go into the service.property file that uses
// groupig and description
// In order to keep that functionality we need in this case to use the
// PerfsonarProperties class
~ Code Change ---------->if (!group.equals("Administration")) {
// Using PerfsonarProperties in order to keep the grouping and
// description
PerfsonarProperties serviceProperties = null;
serviceProperties = new PerfsonarPropertiesImpl();
serviceProperties.loadProperties(new FileInputStream(ServicePath
+ ServicePropertiesPath));
// Getting the names for every property of the group
Iterator it = functionProperties.orderedKeys();
// Setting the value of each property
// An object that holds the property group,description,value and key
PerfsonarProperty property = new PerfsonarProperty();
while (it.hasNext()) {
String key = (String) it.next();
// Setting service properties and wizard properties
// Get the property
property = serviceProperties.getProperty(key);
// If key property does not exist the throw an exception
if (property == null) {
throw new IOException("Key is invalid " + key + " ");
} else {
// Change the value of the property
Code changes ------------------------>if(functionProperties.getProperty(key).equals("yes"))
I've done a little trick setting property.setValue("on");
the auth properties to "yes" or "no" else if (functionProperties.getProperty(key).equals("no"))
in wizard.properties but they still property.setValue("off");
to be set to "on" and "off" now. else
property.setValue(functionProperties.getProperty(key));
serviceProperties.setProperty(key, property);
}
properties.setWizardProperty(key, functionProperties
.getWizardProperty(key));
}
// Storing all changes
serviceProperties.storeProperties(new FileOutputStream(ServicePath
+ ServicePropertiesPath));
}
Also you might want to switch to the new web-admin jar that fixes some aligning and presentation that might occur when adding the AS configuration.
Best Regards,
Michalis Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIBFRroEWq51/Q/40RAjmoAKCP3b47x0zsVUXtfXNEbeHaX/tZowCfajwC
tp+XNOnFFoV72SOOiap1H2I=
=68dZ
-----END PGP SIGNATURE-----
- Web-Admin Update, Michael Michalis, 04/15/2008
Archive powered by MHonArc 2.6.16.