perfsonar-dev - perfsonar: r4332 - in branches/WebAdmin/perfSONARWebAdmin: admin/sqlma admin/wizard admin/wizard/services auxiliary/sqlma auxiliary/wizard
Subject: perfsonar development work
List archive
perfsonar: r4332 - in branches/WebAdmin/perfSONARWebAdmin: admin/sqlma admin/wizard admin/wizard/services auxiliary/sqlma auxiliary/wizard
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4332 - in branches/WebAdmin/perfSONARWebAdmin: admin/sqlma admin/wizard admin/wizard/services auxiliary/sqlma auxiliary/wizard
- Date: Wed, 6 Aug 2008 05:39:25 -0400
Author: michalis
Date: 2008-08-06 05:39:24 -0400 (Wed, 06 Aug 2008)
New Revision: 4332
Removed:
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/ConfigurationWizard.java
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMA.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/ServiceConfig.java
Modified:
branches/WebAdmin/perfSONARWebAdmin/admin/sqlma/SQLMAdmin.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/HTMLOutput.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/IbatisConf.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/SQLMAFilter.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/ibatisFileManager.java
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/WizardProperties.java
Log:
Modified: branches/WebAdmin/perfSONARWebAdmin/admin/sqlma/SQLMAdmin.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/admin/sqlma/SQLMAdmin.java
2008-08-05 10:58:59 UTC (rev 4331)
+++ branches/WebAdmin/perfSONARWebAdmin/admin/sqlma/SQLMAdmin.java
2008-08-06 09:39:24 UTC (rev 4332)
@@ -24,6 +24,9 @@
import perfSONARWebAdmin.auxiliary.sqlma.ibatisFileManager;
/**
+ * The SQL MA Admin servlet. A servlet that plans to make the administration
of
+ * ibatis files easier
+ *
* @author Michalis Michael,CyNet
*
*/
@@ -55,6 +58,7 @@
// A class responsible for generation the html code
private static HTMLOutput output = null;
+ // A String array conntaining the two types of available ibatis files
private String[] type = { "Packet Metric", "L2-Path-Status Metric" };
//
-----------------------------------------------------------------------
@@ -127,18 +131,22 @@
if (((Boolean) session.getAttribute("authenticated"))
.booleanValue()) {
+ // Get what the user wants to do
String function =
request.getParameter("Execute");
if (function != null) {
- if(function.equals("Delete File")){
- String ibatisFile =
request.getParameter("ibatisFile").trim();
+ // For these action we need
confirmation first
+ if (function.equals("Delete File")) {
+ String ibatisFile =
request.getParameter("ibatisFile")
+ .trim();
output
- .confirmPage(
- "Would you
like to delete all data inside the metric table?",
- "delete",
ibatisFile);
+ .confirmPage(
+
"Would you like to delete all data inside the metric table?",
+
"delete", ibatisFile);
}
+ // The actio is confirm deleting data
else if (function.equals("Delete
Data")) {
try {
-
+
deleteActions(request);
output
.infoPage(
@@ -149,7 +157,10 @@
output.infoPage("SQL
MA administration", "Error!\n"
+
getFault(e), "manage");
}
- } else if (function.equals("Edit
File")) {
+ }
+ // Displaying the info and editing
options about the
+ // selected file
+ else if (function.equals("Edit
File")) {
String ibatisFile =
request.getParameter("ibatisFile");
try {
output.mainPage("SQL
MA administration", manager
@@ -160,7 +171,9 @@
throw new
ServletException(getFault(e));
}
- } else if (function.equals("Edit")) {
+ }
+ // Editing has finished and the user
was to save the changes
+ else if (function.equals("Edit")) {
try {
editActions(request);
} catch (Exception e) {
@@ -170,6 +183,8 @@
}
}
+ // The user has finished inputing
info about the new ibatis
+ // files and wants it created
else if (function.equals("Create")) {
try {
createActions(request);
@@ -178,10 +193,14 @@
output.infoPage("SQL
MA administration", "Error!\n"
+
getFault(e), "manage_sqlma");
}
- } else if
(function.equals("Initialize")) {
+ }
+ // The user was to initialize the
+ // database(Database|user|table)
after creating or editing
+ else if
(function.equals("Initialize")) {
String ibatisFile =
request.getParameter("ibatisFile");
String action =
request.getParameter("action");
+ // Get what the user wishes
to initialize
String initDatabase = request
.getParameter("createDatabase");
String initUser =
request.getParameter("createUser");
@@ -213,9 +232,15 @@
output.infoPage("SQL
MA administration.",
"Error!\n" + getFault(e), "manage_sqlma");
}
- } else if (function.equals("No")) {
+ }
+ // The user does not want to
initialize anything in the SQL
+ // database
+ else if (function.equals("No")) {
String ibatisFile =
request.getParameter("ibatisFile");
String action =
request.getParameter("action");
+ // In the cae of just editing
the old files are kept as
+ // .old files in case of a
failure. If the editing was
+ // successfull then they are
deleted
if (action.equals("edit")) {
try {
if
(deleteOldFiles(ibatisFile))
@@ -236,36 +261,42 @@
"manage_sqlma");
}
- } else if
(action.equals("create")) {
+ }
+ // In the case of creatin no
further actions need to be
+ // done
+ else if
(action.equals("create")) {
output
.infoPage(
"SQL MA administration",
"Finished configuring ibatis files <a href=\"SQLMAdmin\">Back</a>.",
"manage_sqlma");
- }
- else
if(action.equals("delete")){
-
+ } else if
(action.equals("delete")) {
+
try {
deleteActions(request);
-
+
output
- .infoPage(
-
"SQL MA administration",
-
"Finished deleting ibatis files <a href=\"SQLMAdmin\">Back</a>.",
-
"manage_sqlma");
+
.infoPage(
+
"SQL MA administration",
+
"Finished deleting ibatis files <a
href=\"SQLMAdmin\">Back</a>.",
+
"manage_sqlma");
} catch (Exception e)
{
-
output.infoPage("SQL MA administration", "Error!\n"
-
+ getFault(e), "manage");
+
output.infoPage("SQL MA administration",
+
"Error!\n" + getFault(e), "manage");
}
-
+
}
- } else {
+ }
+ // If there is no other match show
the default main page
+ else {
try {
String ibatisFile =
request
.getParameter("ibatisFile");
String[] files =
manager.getIbatisFiles();
if (ibatisFile ==
null) {
if (files !=
null) {
+ //
Pick the first file in the array if the
+ //
user hasn't chosen one
ibatisFile = files[0];
}
}
@@ -281,12 +312,17 @@
throw new
ServletException(getFault(e));
}
}
- } else {
+ }
+
+ // The user just wants to see the default
main page
+ else {
try {
String ibatisFile =
request.getParameter("ibatisFile");
String[] files =
manager.getIbatisFiles();
if (ibatisFile == null) {
if (files != null) {
+ // Pick the
first file in the array if the user
+ // hasn't
chosen one
ibatisFile =
files[0];
}
}
@@ -353,6 +389,9 @@
// private methods
/**
+ * Method used for deleting an ibatis file and all the data inside
the table
+ * in the db
+ *
* @param request
* @throws Exception
*/
@@ -364,8 +403,8 @@
+ ibatisFilesPath);
if (pass != null) {
String[] properties =
manager.getIbatisFileProperties(ibatisFile);
- SQLDBManager managerDB = new
SQLDBManager(properties[7],
- pass);
+ SQLDBManager managerDB = new
SQLDBManager(properties[7], pass);
+ // If table exists then delete all data from the table
if (managerDB.checkTable(properties[2],
properties[4])) {
managerDB.deleteData(properties[2],
properties[4],
@@ -377,6 +416,8 @@
}
/**
+ * Method used for editing the ibatis file according to the user input
+ *
* @param request
* @throws Exception
* @throws Exception
@@ -394,6 +435,8 @@
ibatisFileManager manager = new ibatisFileManager(ServicePath
+ ibatisFilesPath);
+ // If edititng the file is successful then ask if the user
also wants to
+ // initialize the database
if (manager.modifyIbatisFile(ibatisFile, databaseURL + "/"
+ databaseName, username, password,
tableName, metric, mapFile)) {
output
@@ -406,6 +449,9 @@
}
/**
+ * Mathod used for the creation of the ibatis file according to the
users
+ * input
+ *
* @param request
* @throws Exception
*/
@@ -423,6 +469,8 @@
+ ibatisFilesPath);
String mapFile = "ibatis-" + ibatisFile + ".xml";
ibatisFile = "ibatis-SqlMapConfig-" + ibatisFile + ".xml";
+ // If creating the file is successful then ask if the user
also wants to
+ // initialize the database
if (manager.createIbatisFile(ibatisFile, databaseURL + "/"
+ databaseName, username, password,
tableName, metric, mapFile)) {
@@ -435,6 +483,9 @@
}
/**
+ * Deletes ibatis .old files that are kept for back up reasons during
the
+ * editing process
+ *
* @param ibatisFile
* @throws Exception
*/
@@ -447,6 +498,8 @@
}
/**
+ * Initializes the SQL DB according to the users input
+ *
* @param ibatisFile
* @param action
* @param initDatabase
@@ -464,6 +517,7 @@
+ ibatisFilesPath);
String[] properties =
manager.getIbatisFileProperties(ibatisFile);
+ // Properties froom the old ibatis files, before editing
String[] propertiesOld = null;
if (action.equals("edit")) {
propertiesOld = manager
@@ -473,7 +527,12 @@
SQLDBManager managerDB = new SQLDBManager(properties[7],
rootPass);
managerDB.setDBURL(properties[1] + "/");
boolean createDB = false;
+
if (initDatabase != null) {
+ // In the case of editing we check to see if the
properties of the
+ // edited ibatis files are different from the the
ones in the old
+ // ibbatis file and then make the necessary
initializations in the
+ // db
if (action.equals("edit")) {
if
((!properties[1].equals(propertiesOld[1]))) {
@@ -495,7 +554,10 @@
createDB = true;
}
}
- } else if (action.equals("create")) {
+ }
+ // In the case of a new file we check to see if the
db already
+ // exists and if not to create it
+ else if (action.equals("create")) {
if (!managerDB.checkDB(properties[2])) {
managerDB.createDatabase(properties[2]);
createDB = true;
@@ -507,15 +569,18 @@
createDB = true;
}
+ // The same processs as above is applied when it comes to the
db user
+ // and the table where the data are stored
+
boolean createUser = false;
- if (initUser != null && createDB ) {
- if(!managerDB.checkUser(properties[3],properties[2])){
-
+ if (initUser != null && createDB) {
+ if (!managerDB.checkUser(properties[3],
properties[2])) {
+
managerDB.createUser(properties[3],
"localhost", properties[5]);
managerDB.createUser(properties[3], "%",
properties[5]);
}
-
managerDB.grantPerfsonarPrivileges(properties[2],properties[3]);
-
+ managerDB.grantPerfsonarPrivileges(properties[2],
properties[3]);
+
createUser = true;
} else {
createUser = true;
Deleted:
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/ConfigurationWizard.java
Deleted: branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMA.java
Modified: branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/HTMLOutput.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/HTMLOutput.java
2008-08-05 10:58:59 UTC (rev 4331)
+++ branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/HTMLOutput.java
2008-08-06 09:39:24 UTC (rev 4332)
@@ -17,7 +17,7 @@
// class fields
// The doctype of the html document. Currently XHtml strict
- private static final String doctype ="<!DOCTYPE html PUBLIC
\"-//W3C//DTD XHTML 1.0 Strict//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";
+ private static final String doctype = "<!DOCTYPE html PUBLIC
\"-//W3C//DTD XHTML 1.0 Strict//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";
// The servlet output stream that will be used to output the html code
private static ServletOutputStream out = null;
@@ -62,7 +62,8 @@
out.println("<div align=\"left\" class=\"" + Class + "\">");
out.println("<p class=\"welcometextlavender\">" + topMessage
+ "</p>");
if (message != null) {
- out.println("<p
style=\"float:left;\"class=\"sqlmaheader\">" + message + "</p>");
+ out.println("<p
style=\"float:left;\"class=\"sqlmaheader\">"
+ + message + "</p>");
}
out.println("</div>");
out.println("</body>");
@@ -72,7 +73,22 @@
}
/**
+ *
+ * Displays the main page of the SQL MA Admin servlet
+ *
* @param message
+ * The top message of the page
+ * @param ibatisFileName
+ *
+ * The list of ibatis files
+ * @param type
+ * The type of the ibatis file
+ * @param fileProperties
+ * Info retrieved from the chosen ibatis file
+ * @param ibatisFile
+ * The chosen ibatis file
+ * @param function
+ * The type of function the user has chosen to perform
* @throws IOException
*/
public void mainPage(String message, String[] ibatisFileName,
@@ -125,8 +141,9 @@
display = "block";
if (function.equals("Edit")) {
- out.println("<p> </p><div
id=\"EditFile\" style=\"display:" + display
- + ";\">");
+ out
+ .println("<p> </p><div
id=\"EditFile\" style=\"display:"
+ + display +
";\">");
out.println("<br/>");
out
.println("<form
action=\"SQLMAdmin\" method=\"POST\" onsubmit=\"return confirmForm(this)\">
");
@@ -172,8 +189,9 @@
out.println("</div>");
} else {
- out.println("<p> </p><div
id=\"EditFile\" style=\"display:" + display
- + ";\">");
+ out
+ .println("<p> </p><div
id=\"EditFile\" style=\"display:"
+ + display +
";\">");
out.println("<br/>");
out.println("<table class=\"input_table\"
align=\"center\">");
out
@@ -198,8 +216,8 @@
}
display = "none";
- out.println("<p> </p><div id=\"CreateNewFile\"
style=\"display:" + display
- + ";\" >");
+ out.println("<p> </p><div id=\"CreateNewFile\"
style=\"display:"
+ + display + ";\" >");
out.println("<p> </p>");
out
.println("<form action=\"SQLMAdmin\"
method=\"POST\" onsubmit=\"return confirmForm(this)\"> ");
@@ -238,13 +256,24 @@
}
+ /**
+ * Displays a confirm message page to the user
+ *
+ * @param message
+ * A small message to the user about the action he is
about to
+ * confirm
+ * @param action
+ * The action the user is to confirm
+ * @param ibatisFile
+ * THe ibatis upon which the action will be inflicted
+ * @throws IOException
+ */
public void confirmPage(String message, String action, String
ibatisFile)
throws IOException {
preempt("default.css", true);
String onClick = " onclick=\"showOptions()\"";
- out
- .println("<div class=\"manage_sqlma\">");
+ out.println("<div class=\"manage_sqlma\">");
out.println("<p class=\"sqlmaheader\">" + message + "</p>");
out.println("<form action=\"SQLMAdmin\" method=\"POST\" > ");
out.println("<table style=\"float:left\">");
@@ -253,38 +282,43 @@
+ onClick
+ " type=\"button\"
value=\"Yes\" >Yes</button></td><td><input
class=\"execute_button_sqlma_small\" type=\"submit\" name=\"Execute\"
value=\"No\" /></td> </tr>");
out.println("</table>");
-
+
out.println("<input type=\"hidden\" name=\"ibatisFile\"
value=\""
+ ibatisFile + "\" />");
out.println("<input type=\"hidden\" name=\"action\" value=\""
+ action
+ "\" />");
out.println("</form>");
out.println("</div>");
-
+
String display = "none";
-
- out.println("<div id=\"options\" style=\"display:" + display
+ ";\" >");
+
+ out
+ .println("<div id=\"options\"
style=\"display:" + display
+ + ";\" >");
out.println("<p/>");
out.println("<form action=\"SQLMAdmin\" method=\"POST\" > ");
out.println("<table class=\"init_table\">");
- if(!action.equals("delete"))
- {out
- .println("<tr><th>Choose what to initialize:
</th><td><input type=\"checkbox\" name=\"createDatabase\" value=\"Yes\"
/>Create Database</td><td/></tr>");
- out
- .println("<tr><th/><td><input
type=\"checkbox\" name=\"createUser\" value=\"Yes\" />Create
User</td><td/></tr>");
- out
- .println("<tr><th/><td><input
type=\"checkbox\" name=\"createTable\" value=\"Yes\"/>Initialize
Table</td><td/></tr>");
+ if (!action.equals("delete")) {
+ out
+ .println("<tr><th>Choose what to
initialize: </th><td><input type=\"checkbox\" name=\"createDatabase\"
value=\"Yes\" />Create Database</td><td/></tr>");
+ out
+ .println("<tr><th/><td><input
type=\"checkbox\" name=\"createUser\" value=\"Yes\" />Create
User</td><td/></tr>");
+ out
+ .println("<tr><th/><td><input
type=\"checkbox\" name=\"createTable\" value=\"Yes\"/>Initialize
Table</td><td/></tr>");
}
- String subAction=action.equals("delete")?"Delete
Data":"Initialize";
+ String subAction = action.equals("delete") ? "Delete Data"
+ : "Initialize";
out
- .println("<tr><th>Enter the SQL DB root
password: </th><td><input type=\"password\" size=20 name=\"rtPass\"
value=\"\"/></td><td><input class=\"execute_button_sqlma_large\"
type=\"submit\" name=\"Execute\" value=\""+subAction+"\" /></td></tr>");
-
+ .println("<tr><th>Enter the SQL DB root
password: </th><td><input type=\"password\" size=20 name=\"rtPass\"
value=\"\"/></td><td><input class=\"execute_button_sqlma_large\"
type=\"submit\" name=\"Execute\" value=\""
+ + subAction + "\"
/></td></tr>");
+
out.println("</table>");
-
+
out.println("<input type=\"hidden\" name=\"ibatisFile\"
value=\""
+ ibatisFile + "\" />");
- out.println("<input type=\"hidden\" name=\"action\" value=\""
+ action+ "\" />");
-
+ out.println("<input type=\"hidden\" name=\"action\" value=\""
+ action
+ + "\" />");
+
out.println("</form>");
out.println("</div>");
out.println("</body>");
Modified: branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/IbatisConf.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/IbatisConf.java
2008-08-05 10:58:59 UTC (rev 4331)
+++ branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/IbatisConf.java
2008-08-06 09:39:24 UTC (rev 4332)
@@ -7,6 +7,8 @@
import java.util.Calendar;
/**
+ * Class that is used to create new ibatis files
+ *
* @author Michalis Michael
*
*/
@@ -20,6 +22,8 @@
}
/**
+ * Creates a new L2 Path Status ibatis file content
+ *
* @param table
* @param fileName
* @return
@@ -170,6 +174,8 @@
}
/**
+ * Creates a new Packet metric ibatis file content
+ *
* @param table
* @param fileName
* @return
@@ -259,6 +265,8 @@
}
/**
+ * Creates an sql map file content
+ *
* @param refFile
* @param driver
* @param DBURL
Modified: branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/SQLMAFilter.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/SQLMAFilter.java
2008-08-05 10:58:59 UTC (rev 4331)
+++ branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/SQLMAFilter.java
2008-08-06 09:39:24 UTC (rev 4332)
@@ -4,21 +4,28 @@
import java.io.FilenameFilter;
/**
+ * Filter that is used to pick up SQL MAP config files from the ibatis file
+ * directory
+ *
* @author Michalis Michael
- *
+ *
*/
public class SQLMAFilter implements FilenameFilter {
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
*/
public boolean accept(File arg0, String arg1) {
-
- String name=arg1.toLowerCase();
-
if((name.endsWith(".xml"))&&(name.startsWith("ibatis-SqlMapConfig-".toLowerCase()))&&
(!name.endsWith("template.xml"))){
+
+ String name = arg1.toLowerCase();
+ if ((name.endsWith(".xml"))
+ &&
(name.startsWith("ibatis-SqlMapConfig-".toLowerCase()))
+ && (!name.endsWith("template.xml"))) {
return true;
- }
- else return false;
+ } else
+ return false;
}
}
Modified:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/ibatisFileManager.java
===================================================================
---
branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/ibatisFileManager.java
2008-08-05 10:58:59 UTC (rev 4331)
+++
branches/WebAdmin/perfSONARWebAdmin/auxiliary/sqlma/ibatisFileManager.java
2008-08-06 09:39:24 UTC (rev 4332)
@@ -15,6 +15,9 @@
import javax.xml.xpath.XPathFactory;
/**
+ * Class that helps the user manage the ibatis files used in SQL MA and
retrieve
+ * info from them
+ *
* @author Michalis Michael,CyNet
*
*/
@@ -31,6 +34,7 @@
/**
* @param directoryPath
+ * The path to ibatis files directory
*/
public ibatisFileManager(String directoryPath) {
ibatisDirectory = directoryPath;
@@ -40,7 +44,9 @@
// public methods
/**
- * @return
+ * Retrieves all ibatis files in the directory
+ *
+ * @return A String array with the ibatis files names
* @throws Exception
*/
public String[] getIbatisFiles() throws Exception {
@@ -55,8 +61,11 @@
}
/**
+ * Retrieves information out of ibatis files
+ *
* @param ibatisFile
- * @return
+ * The ibatis file
+ * @return A String Array containing useful information
* @throws Exception
*/
public String[] getIbatisFileProperties(String ibatisFile) throws
Exception {
@@ -124,23 +133,23 @@
String mapFile) throws Exception {
File file = new File(ibatisDirectory + "/" + ibatisFile);
- boolean success1 =false;
-
- if(file.exists()){
+ boolean success1 = false;
+
+ if (file.exists()) {
success1 = file.renameTo(new File(ibatisDirectory +
"/"
+ ibatisFile + ".old"));
- }else{
- success1=true;
+ } else {
+ success1 = true;
}
File file2 = new File(ibatisDirectory + "/" + mapFile);
- boolean success2=false;
- if(file2.exists()){
- success2 = file2.renameTo(new File(ibatisDirectory +
"/"
- + mapFile + ".old"));
- }else{
- success2 =true;
+ boolean success2 = false;
+ if (file2.exists()) {
+ success2 = file2.renameTo(new File(ibatisDirectory +
"/" + mapFile
+ + ".old"));
+ } else {
+ success2 = true;
}
-
+
if (success1 && success2) {
IbatisConf conf = new IbatisConf();
@@ -184,6 +193,8 @@
}
/**
+ * Creates a new ibatis file
+ *
* @param ibatisFile
* @param databaseURL
* @param username
@@ -191,7 +202,7 @@
* @param tableName
* @param metric
* @param mapFile
- * @return
+ * @return true if file was created successfully
* @throws Exception
*/
public boolean createIbatisFile(String ibatisFile, String databaseURL,
@@ -233,8 +244,10 @@
}
/**
+ * Deletes unwanted old(saved as back up) ibatis files
+ *
* @param ibatisFile
- * @return
+ * @return true if the deletion was successfull
* @throws Exception
*/
public boolean deleteOldFiles(String ibatisFile) throws Exception {
@@ -255,8 +268,11 @@
}
/**
+ *
+ * Deletes ibatis files
+ *
* @param ibatisFile
- * @return
+ * @return true if the deletion was successfull
* @throws Exception
*/
public boolean deleteFiles(String ibatisFile) throws Exception {
@@ -283,8 +299,11 @@
// private methods
/**
+ * Gets the type of the ibatis file.Packet Metric or L2 Path Status
+ *
* @param file
- * @return
+ * The ibatis file
+ * @return The type of the ibatis file
* @throws Exception
*/
private String getType(File file) throws Exception {
@@ -308,6 +327,8 @@
}
/**
+ * Returns the SQL table configured for this ibatis file
+ *
* @param file
* @return
* @throws Exception
@@ -358,7 +379,9 @@
System.out.println(pr[i]);
}
}
-
manager.createIbatisFile("ibatis-SqlMapConfig-test.xml","jdbc:mysql://127.0.0.1","perfsonar_ma",
"testpass","test", "L2-Path-Status Metric", "ibatis-test.xml");
+
manager.createIbatisFile("ibatis-SqlMapConfig-test.xml",
+ "jdbc:mysql://127.0.0.1",
"perfsonar_ma", "testpass",
+ "test", "L2-Path-Status Metric",
"ibatis-test.xml");
/*
* file = new File("C:/Documents and Settings/IBM/My
* Documents/ibatis"); File[] f=file.listFiles();
for(int i=0;i<f.length;i++){
Deleted:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/ServiceConfig.java
Modified:
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/WizardProperties.java
===================================================================
---
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/WizardProperties.java
2008-08-05 10:58:59 UTC (rev 4331)
+++
branches/WebAdmin/perfSONARWebAdmin/auxiliary/wizard/WizardProperties.java
2008-08-06 09:39:24 UTC (rev 4332)
@@ -119,6 +119,7 @@
//
-----------------------------------------------------------------------
// class constructors
+
/**
* Class constructor
*/
- perfsonar: r4332 - in branches/WebAdmin/perfSONARWebAdmin: admin/sqlma admin/wizard admin/wizard/services auxiliary/sqlma auxiliary/wizard, svnlog, 08/06/2008
Archive powered by MHonArc 2.6.16.