From 44250793d40a7fd6f25a9308c397cc55c44247c9 Mon Sep 17 00:00:00 2001
From: cramakri <cramakri>
Date: Mon, 22 Oct 2012 09:11:16 +0000
Subject: [PATCH] Introducd abstract superclass for handlers.

SVN: 27262
---
 .../UserInterfaceState.xcuserstate            | Bin 159187 -> 159187 bytes
 .../ipad-read-service-v1/ipad_read.py         |  45 ++++++++++--------
 2 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate b/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate
index eecba2bb70861565cdcc9e264d8fcac2f81b0823..e503324679de9d1a81f180e7e61672237b914ebf 100644
GIT binary patch
delta 59
zcmV-B0L1^(+X>U#39x)B1+DQD4V8m|Dz||u0cr#Vt??2fV3UC=7Pkg30jQM)t>5%F
R_?NT90Ve@Dx7)-4_^9^$8SDT6

delta 59
zcmV-B0L1^(+X>U#39x)B1+2XQfuVzeDz||u0cr#Vti1nbVv~U?7Pkg30jQM)tg8S^
R^_R260Ve@8x7)-4_^1ub8Uz3U

diff --git a/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service-v1/ipad_read.py b/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service-v1/ipad_read.py
index fb041ecd39e..c3b921a8c3b 100644
--- a/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service-v1/ipad_read.py
+++ b/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service-v1/ipad_read.py
@@ -18,7 +18,26 @@ class RequestHandler:
 		pass
 
 	def add_headers():
-		"""Add the headers for this request. Subclass responsibility"""
+		"""Configure the headers for this request.
+
+		The possible headers come from the following list:
+			PERM_ID : A stable identifier for the object.
+			REFCON : Data that is passed unchanged back to the server when a row is modified.
+				This can be used by the server to encode whatever it needs in order to
+				modify the row.
+			CATEGORY : A category identifier for showing the entity. If empty or None, then the
+				the entity in this row is not shown in top level navigation views. Such entities
+				may appear as children of other entities.
+			SUMMARY_HEADER : A short summary of the entity.
+			SUMMARY : A potentially longer summary of the entity.
+			CHILDREN : The permIds of the children of this entity. Transmitted as JSON.
+			IDENTIFIER : An identifier for the object.
+			IMAGE_URL : A url for an image associated with this entity. If None or empty, no
+				image is shown.
+			PROPERTIES : Properties (metadata) that should be displayed for this entity. Transmitted as JSON.
+
+		The relevant headers are determined by the request.
+		"""
 		pass
 
 	def add_data_rows():
@@ -27,26 +46,14 @@ class RequestHandler:
 		"""
 		pass
 
+	def process_request():
+		"""Execute the steps necessary to process the request."""
+		self.add_headers()
+		self.retrieve_data()
+		self.add_data_rows()
+
 
 def add_headers(builder):
-	"""Configure the headers for the iPad UI -- these are fixed.
-
-	The headers are following: 
-		PERM_ID : A stable identifier for the object.
-		REFCON : Data that is passed unchanged back to the server when a row is modified. 
-			This can be used by the server to encode whatever it needs in order to 
-			modify the row.
-		CATEGORY : A category identifier for showing the entity. If empty or None, then the 
-			the entity in this row is not shown in top level navigation views. Such entities
-			may appear as children of other entities.			
-		SUMMARY_HEADER : A short summary of the entity.
-		SUMMARY : A potentially longer summary of the entity.
-		CHILDREN : The permIds of the children of this entity. Transmitted as JSON.		
-		IDENTIFIER : An identifier for the object.
-		IMAGE_URL : A url for an image associated with this entity. If None or empty, no
-			image is shown.
-		PROPERTIES : Properties (metadata) that should be displayed for this entity. Transmitted as JSON.
-	"""
 	builder.addHeader("PERM_ID")
 	builder.addHeader("REFCON")
 	builder.addHeader("CATEGORY")
-- 
GitLab