perfsonar-dev - perfsonar: r3124 - in branches/WebAdmin: . perfSONARWebAdmin perfSONARWebAdmin/admin perfSONARWebAdmin/admin/exist perfSONARWebAdmin/admin/service perfSONARWebAdmin/admin/wizard perfSONARWebAdmin/admin/wizard/services perfSONARWebAdmin/auxiliary perfSONARWebAdmin/auxiliary/wizard perfSONARWebAdmin/auxiliary/xmlDB
Subject: perfsonar development work
List archive
perfsonar: r3124 - in branches/WebAdmin: . perfSONARWebAdmin perfSONARWebAdmin/admin perfSONARWebAdmin/admin/exist perfSONARWebAdmin/admin/service perfSONARWebAdmin/admin/wizard perfSONARWebAdmin/admin/wizard/services perfSONARWebAdmin/auxiliary perfSONARWebAdmin/auxiliary/wizard perfSONARWebAdmin/auxiliary/xmlDB
Chronological Thread
- From:
- To:
- Subject: perfsonar: r3124 - in branches/WebAdmin: . perfSONARWebAdmin perfSONARWebAdmin/admin perfSONARWebAdmin/admin/exist perfSONARWebAdmin/admin/service perfSONARWebAdmin/admin/wizard perfSONARWebAdmin/admin/wizard/services perfSONARWebAdmin/auxiliary perfSONARWebAdmin/auxiliary/wizard perfSONARWebAdmin/auxiliary/xmlDB
- Date: Thu, 13 Dec 2007 05:53:39 -0500
Author: michalis
Date: 2007-12-13 05:53:39 -0500 (Thu, 13 Dec 2007)
New Revision: 3124
Added:
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/ConfigurationWizard.java
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/Wizard.java
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMA.java
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMAHandler.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/ConfigurationHandler.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/HTMLOutput.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/ServiceConfig.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/WizardProperties.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/WizardProperty.java
branches/WebAdmin/wizard.properties
Removed:
branches/WebAdmin/perfSONARWebAdmin/admin/service/ConfigurationWizard.java
Modified:
branches/WebAdmin/perfSONARWebAdmin/ExistTesterXmlRpc.java
branches/WebAdmin/perfSONARWebAdmin/PractisingWizard.java
branches/WebAdmin/perfSONARWebAdmin/admin/exist/eXistAdmin.java
branches/WebAdmin/perfSONARWebAdmin/admin/service/Admin.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/ServletPropertiesImpl.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/xmlDB/eXistServletProperties.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/xmlDB/eXistServletPropertiesImpl.java
branches/WebAdmin/wizardproperties.dtd
Log:
Committing recently developed serlets and changes
Modified: branches/WebAdmin/perfSONARWebAdmin/ExistTesterXmlRpc.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/ExistTesterXmlRpc.java 2007-12-13
10:35:17 UTC (rev 3123)
+++ branches/WebAdmin/perfSONARWebAdmin/ExistTesterXmlRpc.java 2007-12-13
10:53:39 UTC (rev 3124)
@@ -11,6 +11,7 @@
import org.xmldb.api.modules.XMLResource;
import org.xmldb.api.modules.XQueryService;
+import perfSONARWebAdmin.auxiliary.wizard.WizardProperties;
import perfSONARWebAdmin.auxiliary.xmlDB.XMLDocument;
import perfSONARWebAdmin.auxiliary.xmlDB.xmlDBCollection;
import perfSONARWebAdmin.auxiliary.xmlDB.xmlDBCollectionImpl;
@@ -21,16 +22,29 @@
public class ExistTesterXmlRpc {
public static void main(String[] argv){
+
+ /*try {
+ // theClass = Class.forName( className, true,
Thread.currentThread().getContextClassLoader() );
+ Class
clas=Class.forName("perfSONARWebAdmin.auxiliary.wizardProperties",true,
Thread.currentThread().getContextClassLoader());
+ wizardProperties pr=(wizardProperties)
clas.newInstance();
+ pr.setProperty("hell0", "world");
+ System.out.println("Hell0"+pr.getProperty("hell0"));
+ } catch (ClassNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }*/
try {
- xmlDBManager manager= new
xmlDBManagerImpl("192.168.10.86:8080/exist/xmlrpc","admin","michalis");
- try {
+ xmlDBManager manager= new
xmlDBManagerImpl("192.168.10.86:8080/exist/xmlrpc","admin","perfsonar");
+
xmlDBCollection root = manager.getCollection(null);
- String[] collections=manager.getCollections();
- for(int i=0;i<collections.length;i++){
-
System.out.println(collections[i]);
- }
- manager.createCollection("/db/testcol/no");
+ System.out.println(root.getName());
+ manager.createCollection("mike");
+ // String[] collections=manager.getCollections();
+ // for(int i=0;i<collections.length;i++){
+
//System.out.println(collections[i]);
+
+ // manager.createCollection("/db/testcol/no");
//xmlDBCollection
col=manager.getCollection("/db/testcol/no");
//col.getName();
//System.out.println("");
@@ -39,7 +53,7 @@
//
System.out.println(collections[i]);
//}
- xmlDBCollection
test=manager.getCollection("/db/testcol/no");
+ // xmlDBCollection
test=manager.getCollection("/db/testcol/no");
// XMLResource res=(XMLResource)
test.getCollection().createResource("hello", "XMLResource");
@@ -91,16 +105,16 @@
//Document
doc=test.getDocument("rrd-database_TEST.xml");
//test.addDocument(doc,"test.xml","mike3");
- System.out.println("");
- String[] docs=test.getDocuments();
- for(int i=0;i<docs.length;i++){
- XMLDocument
doc=test.getXMLDocument(docs[i]);
+ // System.out.println("");
+ //String[] docs=test.getDocuments();
+ // for(int i=0;i<docs.length;i++){
+ // XMLDocument
doc=test.getXMLDocument(docs[i]);
- System.out.println(docs[i]+"
"+doc.getOwner()+" "+doc.getGroup()+" "+doc.getPermissions()+"
"+doc.creationDate().toString());
+ // System.out.println(docs[i]+"
"+doc.getOwner()+" "+doc.getGroup()+" "+doc.getPermissions()+"
"+doc.creationDate().toString());
//System.out.println(doc.getDocumentAsString());
- }
-
System.out.print(test.getCollection().getName()+" ");
- System.out.println(test.getOwner()+"
"+test.getGroup()+" "+test.getCreationDate()+" "+test.getPermissions());
+ // }
+ //
System.out.print(test.getCollection().getName()+" ");
+ // System.out.println(test.getOwner()+"
"+test.getGroup()+" "+test.getCreationDate()+" "+test.getPermissions());
//mike.setPermissions(7, 7, 7);
//System.out.println(mike.getPermissions());
@@ -142,19 +156,25 @@
// TODO Auto-generated catch block
e.printStackTrace();
}
- } catch (ClassNotFoundException e) {
+ //} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
- } catch (XMLDBException e) {
+ // e.printStackTrace();
+ // } catch (XMLDBException e) {
+ // // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // } catch (InstantiationException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
- } catch (InstantiationException e) {
+ // e.printStackTrace();
+ //} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IllegalAccessException e) {
+ // e.printStackTrace();
+ // }
+ //*/ catch (InstantiationException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
- }
-
+ // e.printStackTrace();
+ // } catch (IllegalAccessException e) {
+ // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // }
}
}
Modified: branches/WebAdmin/perfSONARWebAdmin/PractisingWizard.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/PractisingWizard.java 2007-12-13
10:35:17 UTC (rev 3123)
+++ branches/WebAdmin/perfSONARWebAdmin/PractisingWizard.java 2007-12-13
10:53:39 UTC (rev 3124)
@@ -1,11 +1,134 @@
package perfSONARWebAdmin;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
import java.util.Properties;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jdom.Element;
+import org.jdom.input.DOMBuilder;
+import org.jdom.output.XMLOutputter;
+import org.xml.sax.SAXException;
+
public class PractisingWizard {
- public void main(String[] argv){
- Properties p= new Properties();
- p.setProperty("component.ma.xmldb.db_status", "['on',
'off']");
+ public static void main(String[] argv){
+ String listener = "\n\n<listener>\n
<listener-class>org.perfsonar.service.base.container.listeners.StartupInitializer</listener-class>\n</listener>\n";
+ File web = new File("web.xml");
+ FileReader fr = null;
+ try {
+ fr = new FileReader(web);
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ StringBuffer contents = new StringBuffer();
+ BufferedReader br = new BufferedReader(fr);
+ String line = "";
+ while (line != null) {
+ if (line.contains("<web-app>")) {
+ int ch=line.indexOf("<web-app>") + 9;
+ String webappbe = line.substring(0,ch);
+ String
webapprest = "";
+ if (ch+1 > line.length()) {
+ webapprest = "";
+ } else {
+ webapprest = line.substring(ch+1);
+ }
+ line = webappbe + listener + webapprest;
+ }
+ contents.append(line+"\n");
+ try {
+ line = br.readLine();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ FileWriter fw;
+ try {
+ fw = new FileWriter(web);
+ BufferedWriter bw = new BufferedWriter(fw);
+ System.out.println(contents.toString().trim());
+ bw.write(contents.toString());
+ bw.close();
+ fw.close();
+ br.close();
+ fr.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ /* File web = new File("web.xml");
+ FileInputStream stream = null;
+ try {
+ stream = new FileInputStream(web);
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ DocumentBuilderFactory dbfactory =
+ DocumentBuilderFactory.newInstance();
dbfactory.setValidating(false);
+ DocumentBuilder parser = null; DOMBuilder jparser = null;
+ org.jdom.Document webDoc = null; try {
+ parser =
+ dbfactory.newDocumentBuilder();
+ } catch (ParserConfigurationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } jparser = new DOMBuilder(); try {
+
+ webDoc =
+ jparser.build(parser.parse(stream));
+ } catch (SAXException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } Element root =
+ webDoc.getRootElement(); Element listenerEl = new
Element("listener");
+ Element listenerClass = new Element("listener-class");
+
listenerClass.addContent("org.perfsonar.service.base.container.listeners.StartupInitializer");
+ listenerEl.addContent(listenerClass);
+ root.addContent(listenerEl);
+ XMLOutputter outputter = new XMLOutputter();
FileOutputStream out = null;
+ try {
+ out = new FileOutputStream(web);
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } try {
+ outputter.setIndent(true);
+ outputter.setNewlines(true);
+ outputter.output(root, out);
+ } catch (IOException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ } try {
+ out.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ try {
+ stream.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ */
}
}
Modified: branches/WebAdmin/perfSONARWebAdmin/admin/exist/eXistAdmin.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/admin/exist/eXistAdmin.java
2007-12-13 10:35:17 UTC (rev 3123)
+++ branches/WebAdmin/perfSONARWebAdmin/admin/exist/eXistAdmin.java
2007-12-13 10:53:39 UTC (rev 3124)
@@ -38,15 +38,21 @@
* Administration servlet for managing eXist Database To be used in perfSONAR
* web Services Administration
*/
+@SuppressWarnings("all")
public class eXistAdmin extends HttpServlet {
//
-----------------------------------------------------------------------
// class fields
// Properties file for the admin servlet
- private String existProperties =
"/WEB-INF/classes/perfsonar/conf/exist_servlet.properties";
+
+ private static String servicePath;
+
+ private static final String
confPath="/WEB-INF/classes/perfsonar/conf/";
+
+ private static final String existProperties =
confPath+"servlet.properties";
- public String driver = "org.exist.xmldb.DatabaseImpl";
+ public static final String driver = "org.exist.xmldb.DatabaseImpl";
private xmlDBManager manager;
@@ -68,17 +74,19 @@
super.init(config);
ServletContext sc = getServletContext();
+ servicePath=sc.getRealPath("/");
// Loading servlet properties and initializing authenticator
try {
- servletProperties = new eXistServletPropertiesImpl(sc
- .getRealPath("/")
- + existProperties);
+ servletProperties = new eXistServletPropertiesImpl(
+ servicePath+ existProperties);
authenticator = new
existAuthenticatorImpl("xmldb:exist://"
+ servletProperties.getDBLocation(),
servletProperties
.getAdminPassword());
} catch (Exception e) {
// TODO Auto-generated catch block
throw new ServletException("Failed loading
Properties\n"
+
+servletProperties.getDBLocation()+"\n"
+
+servletProperties.getAdminPassword()+"\n"
+ e.getMessage());
}
@@ -112,6 +120,8 @@
HttpSession session = request.getSession(true);
ServletOutputStream out = response.getOutputStream();
+ servletProperties = new eXistServletPropertiesImpl(
+ servicePath+ existProperties);
// Set the inactive interval for this session
if (session.isNew())
session.setMaxInactiveInterval(1800);
@@ -124,7 +134,7 @@
manager = (xmlDBManager)
session.getAttribute("manager");
}
- // if the manager is null start the proces again
+ // if the manager is null start the process again
if (manager == null) {
session.invalidate();
doPost(request, response);
@@ -144,7 +154,7 @@
}
} else {
- // if this is the fiesrt time set authenticated to
false
+ // if this is the fisrt time set authenticated to
false
session.setAttribute("authenticated", false);
}
// If a multipart request arrives its probably for uploading
a metadata
@@ -504,6 +514,7 @@
out.println("<td>");
String DBLocation = servletProperties.getDBLocation();
DBLocation = DBLocation.substring(0,
DBLocation.indexOf("/xmlrpc"));
+
out.println("<a href=http://" + DBLocation + "/rest/"
+ currentCollection.getName() + "/" +
documents[i] + " >"
+ documents[i] + "</a>");
@@ -1238,6 +1249,7 @@
if (formUser.equals("admin")) {
servletProperties
.setAdminPassword(password.trim());
+
servletProperties.store();
authenticator.setPassword(password.trim());
}
refresh_message(
@@ -1541,7 +1553,7 @@
out
.println("<li><a
href=\"eXistAdmin?function=users\" >Manage Users</a></li>");
- out.println("</ul");
+ out.println("</ul>");
out.println("</p>");
if (logged) {
out.println("<p>");
@@ -1639,7 +1651,7 @@
out.println("<p align=\"center\" > ");
if (back) {
out
- .println("<a style=\" font-size: 130%
\" href=\"/perfSONAR/eXistAdmin\" \">Go Back</a>");
+ .println("<a style=\" font-size: 130%
\" href=\"eXistAdmin\" \">Go Back</a>");
}
out.println("</p>");
out.println("</div>");
@@ -1670,7 +1682,7 @@
out.println("</h2>");
out.println("<p align=\"center\" > ");
out
- .println("<a style=\" font-size: 130% \"
href=\"/perfSONAR/eXistAdmin?function="
+ .println("<a style=\" font-size: 130% \"
href=\"eXistAdmin?function="
+ manage
+ "&ChildCollection="
+ collection
Modified: branches/WebAdmin/perfSONARWebAdmin/admin/service/Admin.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/admin/service/Admin.java
2007-12-13 10:35:17 UTC (rev 3123)
+++ branches/WebAdmin/perfSONARWebAdmin/admin/service/Admin.java
2007-12-13 10:53:39 UTC (rev 3124)
@@ -28,6 +28,7 @@
* @author Michalis Michael, CyNet
*
*/
+@SuppressWarnings("all")
public class Admin extends HttpServlet {
//
-----------------------------------------------------------------------
@@ -102,9 +103,7 @@
response.setContentType("text/html");
// Getting the service path
- String servicePath = (servletProperties.getServiceLocation()
!= null) ? (servletProperties
- .getServiceLocation())
- : (null);
+ String servicePath =sc.getRealPath("/") ;
// Setting the path for the properties file based on the type
of
// properties file
if (session.getAttribute("propertyType") != null) {
@@ -218,7 +217,7 @@
} else {
error_page(
out,
- "Error modyfying
properties file. PLease try again",
+ "Error modifying
properties file. PLease try again",
Type);
}
} else {
@@ -266,6 +265,7 @@
* @param response
* The httpServlet response
*/
+
private void askForPassword(HttpServletResponse response) {
response.setStatus(response.SC_UNAUTHORIZED); // I.e., 401
Deleted:
branches/WebAdmin/perfSONARWebAdmin/admin/service/ConfigurationWizard.java
Added:
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/ConfigurationWizard.java
Property changes on:
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/ConfigurationWizard.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: branches/WebAdmin/perfSONARWebAdmin/admin/wizard/Wizard.java
Property changes on:
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/Wizard.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMA.java
Property changes on:
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMA.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMAHandler.java
Property changes on:
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMAHandler.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/ServletPropertiesImpl.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/auxiliary/ServletPropertiesImpl.java
2007-12-13 10:35:17 UTC (rev 3123)
+++ branches/WebAdmin/perfSONARWebAdmin/auxiliary/ServletPropertiesImpl.java
2007-12-13 10:53:39 UTC (rev 3124)
@@ -49,7 +49,7 @@
* @see perfSONARWebAdmin.auxiliary.ServletProperties#getPassword()
*/
public String getPassword() {
- return (String) servletProperties.get("servlet_password");
+ return (String) servletProperties.get("servlet.password");
}
/*
@@ -69,7 +69,7 @@
*/
public String getUserName() {
- return (String) servletProperties.get("servlet_username");
+ return (String) servletProperties.get("servlet.username");
}
/*
@@ -79,7 +79,7 @@
*/
public String getServiceLocation() {
// TODO Auto-generated method stub
- return (String) servletProperties.get("service_name");
+ return (String) servletProperties.get("servlet.service_type");
}
public static void main(String argv[]) {
@@ -106,7 +106,7 @@
*/
public void setPassword(String password) {
- servletProperties.setProperty("servlet_password", password);
+ servletProperties.setProperty("servlet.password", password);
}
@@ -117,7 +117,7 @@
*/
public void setServiceLocation(String location) {
- servletProperties.setProperty("service_name", location);
+ servletProperties.setProperty("service.name", location);
}
Added:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/ConfigurationHandler.java
Property changes on:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/ConfigurationHandler.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/HTMLOutput.java
Property changes on:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/HTMLOutput.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/ServiceConfig.java
Property changes on:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/ServiceConfig.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/WizardProperties.java
Property changes on:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/WizardProperties.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/WizardProperty.java
Property changes on:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/WizardProperty.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/xmlDB/eXistServletProperties.java
===================================================================
---
branches/WebAdmin/perfSONARWebAdmin/auxiliary/xmlDB/eXistServletProperties.java
2007-12-13 10:35:17 UTC (rev 3123)
+++
branches/WebAdmin/perfSONARWebAdmin/auxiliary/xmlDB/eXistServletProperties.java
2007-12-13 10:53:39 UTC (rev 3124)
@@ -48,5 +48,10 @@
* @throws Exception
*/
public void setAdminPassword(String password) throws Exception;
+
+ /**
+ * @throws Exception
+ */
+ public void store()throws Exception;
}
Modified:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/xmlDB/eXistServletPropertiesImpl.java
===================================================================
---
branches/WebAdmin/perfSONARWebAdmin/auxiliary/xmlDB/eXistServletPropertiesImpl.java
2007-12-13 10:35:17 UTC (rev 3123)
+++
branches/WebAdmin/perfSONARWebAdmin/auxiliary/xmlDB/eXistServletPropertiesImpl.java
2007-12-13 10:53:39 UTC (rev 3124)
@@ -4,6 +4,7 @@
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.util.Calendar;
import java.util.Properties;
/**
@@ -47,7 +48,7 @@
*/
public String getDBLocation() {
- return (String) servletProperties.get("exist_location");
+ return (String)
servletProperties.get("servlet.exist.location");
}
/*
@@ -67,7 +68,7 @@
*/
public void setDBLocation(String location) {
- servletProperties.setProperty("exist_location", location);
+ servletProperties.setProperty("servlet.exist.location",
location);
}
@@ -76,14 +77,20 @@
*/
public String getAdminPassword() {
- return (String) servletProperties.get("admin_password");
+ return (String)
servletProperties.get("servlet.exist.admin_password");
}
public void setAdminPassword(String password) throws IOException {
- servletProperties.setProperty("admin_password", password);
+ servletProperties.setProperty("servlet.exist.admin_password",
password);
+ }
+
+ /**
+ * @throws IOException
+ */
+ public void store() throws IOException {
+
FileOutputStream out = new
FileOutputStream(servletPropertiesFile);
- servletProperties.store(out, "Exist servlet properties");
+ servletProperties.store(out, "Modified at
"+Calendar.getInstance().getTime().toString());
}
-
}
Added: branches/WebAdmin/wizard.properties
Modified: branches/WebAdmin/wizardproperties.dtd
===================================================================
--- branches/WebAdmin/wizardproperties.dtd 2007-12-13 10:35:17 UTC (rev
3123)
+++ branches/WebAdmin/wizardproperties.dtd 2007-12-13 10:53:39 UTC (rev
3124)
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- DTD for wizard properties -->
+ <!ELEMENT properties ( comment?, property* )>
+ <!ATTLIST properties version CDATA #FIXED "0.1">
+ <!ELEMENT comment (#PCDATA) >
+ <!ELEMENT property
(entry,Comment,ProposedValue,Group+,AcceptedValue*) >
+ <!ELEMENT entry (#PCDATA) >
+ <!ATTLIST entry
+ key CDATA #REQUIRED
+ password (true|false) #IMPLIED
+ required (true|false) #IMPLIED >
+ <!ELEMENT Comment (#CDATA) >
+ <!ELEMENT ProposedValue (#PCDATA) >
+ <!ELEMENT Group (#PCDATA) >
+ <!ATTLIST Group
+ order CDATA #REQUIRED
+ check (true|false) #IMPLIED
+ >
+ <!ELEMENT AcceptedValue (#PCDATA) >
- <!ELEMENT properties ( comment?, property* ) >
-
- <!ATTLIST properties version CDATA #FIXED "0.1">
-
- <!ELEMENT comment (#PCDATA) >
-
- <!ELEMENT property (entry,ProposedValue?,AcceptedValue*) >
-
- <!ELEMENT entry (#PCDATA) >
-
- <!ATTLIST entry key CDATA #REQUIRED>
-
- <!ATTLIST entry comment CDATA #REQUIRED>
-
- <!ELEMENT ProposedVAlue (#PCDATA) >
-
- <!ELEMENT AcceptedVAlue (#PCDATA) >
\ No newline at end of file
+
\ No newline at end of file
- perfsonar: r3124 - in branches/WebAdmin: . perfSONARWebAdmin perfSONARWebAdmin/admin perfSONARWebAdmin/admin/exist perfSONARWebAdmin/admin/service perfSONARWebAdmin/admin/wizard perfSONARWebAdmin/admin/wizard/services perfSONARWebAdmin/auxiliary perfSONARWebAdmin/auxiliary/wizard perfSONARWebAdmin/auxiliary/xmlDB, svnlog, 12/13/2007
Archive powered by MHonArc 2.6.16.