[Fusionforge-commits] r11807 - in trunk/src/plugins/oslc/include/oslc-zend/application: controllers views/scripts/fusionforgecm

Sabri LABBENE labbenes at libremir.placard.fr.eu.org
Wed Dec 15 13:57:26 CET 2010


Author: labbenes
Date: 2010-12-15 13:57:26 +0100 (Wed, 15 Dec 2010)
New Revision: 11807

Modified:
   trunk/src/plugins/oslc/include/oslc-zend/application/controllers/FusionForgeCmController.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-document_xml.php
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml
   trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/show-creation-ui.phtml
Log:
Fix service documents urls.


Modified: trunk/src/plugins/oslc/include/oslc-zend/application/controllers/FusionForgeCmController.php
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/controllers/FusionForgeCmController.php	2010-12-15 12:33:53 UTC (rev 11806)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/controllers/FusionForgeCmController.php	2010-12-15 12:57:26 UTC (rev 11807)
@@ -135,7 +135,7 @@
 		
 		// handle OSLC-CM service document access
 		// An OSLC-CM service document describes capabilities of a FusionForge tracker.
-		elseif (isset($params['oslc-cm-service'])) {
+		elseif (isset($params['oslc-cm-service']) && isset($params['tracker'])) {
 			$this->_forward('oslcCmServiceDocument');
 			return;
 		}
@@ -548,9 +548,10 @@
 		
 		$req = $this->getRequest();
 		$params = $req->getParams();
-		$project = $params['oslc-cm-service'];
-		$this->view->project = $project;
 
+		$this->view->project = $params['oslc-cm-service'];
+		$this->view->tracker = $params['tracker'];
+
 		$this->getResponse()->setHeader('Content-Type', $content_type);
 
 	}

Modified: trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-document_xml.php
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-document_xml.php	2010-12-15 12:33:53 UTC (rev 11806)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-document_xml.php	2010-12-15 12:57:26 UTC (rev 11807)
@@ -27,7 +27,7 @@
 
 // Generate a OSLC-CM V1 Change Management Service Description document (http://open-services.net/bin/view/Main/CmServiceDescriptionV1)
 
-function project_to_service_description($base_url, $project) {
+function project_to_service_description($base_url, $project, $tracker) {
 
 	$doc = new DOMDocument();
 	$doc->formatOutput = true;
@@ -61,29 +61,14 @@
 	
 	$child = $doc->createElementNS("http://purl.org/dc/terms/", "dc:title");
 	$title = $sq->appendChild($child);
-	$child = $doc->createTextNode("Simple Project Query");
+	$child = $doc->createTextNode("Simple Tracker Query");
 	$child = $title->appendChild($child);
 	
 	$child = $doc->createElementNS("http://open-services.net/xmlns/cm/1.0/", "oslc_cm:url");
 	$url = $sq->appendChild($child);
-	$child = $doc->createTextNode($base_url.'/cm/project/'.$project);
+	$child = $doc->createTextNode($base_url.'/cm/project/'.$project.'/tracker/'.$tracker);
 	$child = $url->appendChild($child);
 	
-	// OSLC URL-encoded query
-
-	$child = $doc->createElementNS("http://open-services.net/xmlns/cm/1.0/", "oslc_cm:simpleQuery");
-	$sq = $cr->appendChild($child);
-	
-	$child = $doc->createElementNS("http://purl.org/dc/terms/", "dc:title");
-	$title = $sq->appendChild($child);
-	$child = $doc->createTextNode("OSLC Change Request Queries");
-	$child = $title->appendChild($child);
-	
-	$child = $doc->createElementNS("http://open-services.net/xmlns/cm/1.0/", "oslc_cm:url");
-	$url = $sq->appendChild($child);
-	$child = $doc->createTextNode($base_url.'/cm/bugs');
-	$child = $url->appendChild($child);
-	
 	//creation factory
 	
 	$child = $doc->createElementNS("http://open-services.net/xmlns/cm/1.0/", "oslc_cm:factory");
@@ -96,12 +81,12 @@
 	
 	$child = $doc->createElementNS("http://purl.org/dc/terms/", "dc:title");
 	$title = $crdl->appendChild($child);
-	$child = $doc->createTextNode("Location for creation of change requests");
+	$child = $doc->createTextNode("Location for creation of change requests (with a POST HTTP request)");
 	$child = $title->appendChild($child);
 
 	$child = $doc->createElementNS("http://open-services.net/xmlns/cm/1.0/", "oslc_cm:url");
 	$url = $crdl->appendChild($child);
-	$child = $doc->createTextNode($base_url.'/cm/project/'.$project);
+	$child = $doc->createTextNode($base_url.'/cm/project/'.$project.'/tracker/'.$tracker);
 	$child = $url->appendChild($child);
 	
 	//creation dialog
@@ -131,7 +116,7 @@
 
 	$child = $doc->createElementNS("http://open-services.net/xmlns/cm/1.0/", "oslc_cm:url");
 	$url = $crdl->appendChild($child);
-	$child = $doc->createTextNode($base_url.'/cm/project/'.$project.'/ui/creation');
+	$child = $doc->createTextNode($base_url.'/cm/project/'.$project.'/tracker/'.$tracker.'/ui/creation');
 	$child = $url->appendChild($child);
 	
 	//selection dialog
@@ -161,7 +146,7 @@
 
 	$child = $doc->createElementNS("http://open-services.net/xmlns/cm/1.0/", "oslc_cm:url");
 	$url = $sldl->appendChild($child);
-	$child = $doc->createTextNode($base_url.'/cm/project/'.$project.'/ui/selection');
+	$child = $doc->createTextNode($base_url.'/cm/project/'.$project.'/tracker/'.$tracker.'/ui/selection');
 	$child = $url->appendChild($child);
 
 	return $doc->saveXML();

Modified: trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.phtml
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.phtml	2010-12-15 12:33:53 UTC (rev 11806)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.phtml	2010-12-15 12:57:26 UTC (rev 11807)
@@ -48,7 +48,7 @@
 <h1>OSLC-CM V1 Service Description document</h1>
 <pre>
 <?php
-	$xml = project_to_service_description($this->baseUrl(), $this->project);
+	$xml = project_to_service_description($this->baseUrl(), $this->project, $this->tracker);
 	$text = str_replace('>', '&gt;', str_replace('<', '&lt;', $xml));
 	$text = add_links($text, "http");
 	$text = add_links($text, $this->baseUrl());

Modified: trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml	2010-12-15 12:33:53 UTC (rev 11806)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml	2010-12-15 12:57:26 UTC (rev 11807)
@@ -27,4 +27,4 @@
 
 require('_service-document_xml.php');
 
-print project_to_service_description($this->baseUrl(), $this->project);
\ No newline at end of file
+print project_to_service_description($this->baseUrl(), $this->project, $this->tracker);
\ No newline at end of file

Modified: trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/show-creation-ui.phtml
===================================================================
--- trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/show-creation-ui.phtml	2010-12-15 12:33:53 UTC (rev 11806)
+++ trunk/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/show-creation-ui.phtml	2010-12-15 12:57:26 UTC (rev 11807)
@@ -4,22 +4,6 @@
 
 	$project = $this->data['project'];
 	$tracker = $this->data['tracker'];
-
-	//type
-	//reproducibility
-	//severity
-	//priority
-	//platform //os //os_build ????
-	//product version
-	//product build
-	//assigned to (handler)
-	//target version
-	//summary
-	//description
-	//steps to reproduce
-	//additional info
-	//custom field
-	//view status
 	
 	/*
 	 * @import "http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojox/grid/resources/Grid.css";




More information about the Fusionforge-commits mailing list