Index: trunk/gsdl3/src/java/org/greenstone/gsdl3/action/SystemAction.java
===================================================================
--- trunk/gsdl3/src/java/org/greenstone/gsdl3/action/SystemAction.java	(revision 4105)
+++ trunk/gsdl3/src/java/org/greenstone/gsdl3/action/SystemAction.java	(revision 4106)
@@ -35,19 +35,47 @@
 	page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.CONFIGURATION_ELEM), true));
 
+	String coll = (String)params.get(GSCGI.COLLECTION_ARG);
 
-	Element response = null;
+	String to = "";
+	if (coll!=null && !coll.equals("")) {
+	    to = coll;
+	}
+
+	Element mr_request_message = doc_.createElement(GSXML.MESSAGE_ELEM);
+	Element mr_request = GSXML.createBasicRequest(doc_, GSXML.REQUEST_TYPE_SYSTEM, to, lang);
+	mr_request_message.appendChild(mr_request);
+	
+	Element system = doc_.createElement(GSXML.SYSTEM_ELEM);
+	mr_request.appendChild(system);
+	
+	// will need to change the following if can do more than one system request at once
 	if (subaction.equals("c")) { // configure
-	    response =  processConfigure(page, params, lang);
-	} else if (subaction.equals("d")) { // delete
-	    response = processDelete(page, params, lang);
-	} else if (subaction.equals("a")) { // add
-	    response = processAdd(page, params, lang);
+	    system.setAttribute(GSXML.TYPE_ATT, GSXML.SYSTEM_TYPE_CONFIGURE);
+	    String info = (String)params.get(GSCGI.STATUS_SUBSET_ARG);
+	    system.setAttribute(GSXML.SYSTEM_SUBSET_ATT, info);
+	
 	} else {
+	    String name = (String)params.get(GSCGI.STATUS_MODULE_NAME_ARG);
+	    String type = (String)params.get(GSCGI.STATUS_MODULE_TYPE_ARG);
+
+	    system.setAttribute(GSXML.SYSTEM_MODULE_NAME_ATT, name);
+	    system.setAttribute(GSXML.SYSTEM_MODULE_TYPE_ATT, type);
+	    
+	    if (subaction.equals("d")) { // delete
+		system.setAttribute(GSXML.TYPE_ATT, GSXML.SYSTEM_TYPE_DEACTIVATE);
+
+	    } else if (subaction.equals("a")) { // add
+		system.setAttribute(GSXML.TYPE_ATT, GSXML.SYSTEM_TYPE_ACTIVATE);
+	    } else {
 	    // create the default response
 	    // for now just have an error
 	    System.err.println("SystemAction error: bad subaction type");
 	    return null;
+	    }
 	}
-	page.appendChild(response);
+
+	Element response_message = mr_.process(mr_request_message);
+	
+	page.appendChild(GSXML.duplicateWithNewName(doc_, (Element)GSXML.getChildByTagName(response_message, GSXML.RESPONSE_ELEM), GSXML.PAGE_RESPONSE_ELEM, true));
 	
 	// check that the stylesheet is present - cant output the page without one. 
@@ -64,45 +92,3 @@
     }
 
-    /** processes a configure request */
-    protected Element processConfigure(Element page, HashMap params, 
-				       String lang) {
-	
-	//System.out.println("params are:");
-	//Misc.printHash(params);
-	Element page_response = doc_.createElement(GSXML.PAGE_RESPONSE_ELEM);
-	
-	String info = (String)params.get(GSCGI.CONFIGURE_SUBSET_ARG);
-	String coll = (String)params.get(GSCGI.COLLECTION_ARG);
-
-	String to = "";
-	if (coll!=null && !coll.equals("")) {
-	    to = coll;
-	}
-
-	Element request_message = doc_.createElement(GSXML.MESSAGE_ELEM);
-	Element request = GSXML.createBasicRequest(doc_, GSXML.REQUEST_TYPE_SYSTEM, to, lang);
-	request_message.appendChild(request);
-	
-	Element system = doc_.createElement(GSXML.SYSTEM_ELEM);
-	system.setAttribute(GSXML.TYPE_ATT, GSXML.SYSTEM_TYPE_CONFIGURE);
-	system.setAttribute(GSXML.SYSTEM_SUBSET_ATT, info);
-	request.appendChild(system);
-	Element response_message = mr_.process(request_message);
-
-	
-	return GSXML.duplicateWithNewName(doc_, (Element)GSXML.getChildByTagName(response_message, GSXML.RESPONSE_ELEM), GSXML.PAGE_RESPONSE_ELEM, true);
-	
-    } 
-    protected Element processDelete(Element page, HashMap params, String lang) {
-
-	Element page_response = doc_.createElement(GSXML.PAGE_RESPONSE_ELEM);
-	return page_response;
-
-    } 
-    protected Element processAdd(Element page, HashMap params, String lang) {
-
-	Element page_response = doc_.createElement(GSXML.PAGE_RESPONSE_ELEM);
-	return page_response;
-	
-    } 
 }
