2006/unicorn/WebContent/WEB-INF/resources/templates text.error.vm,1.2,1.3 text.vm,1.2,1.3

Update of /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates
In directory hutz:/tmp/cvs-serv7940/WebContent/WEB-INF/resources/templates

Modified Files:
	text.error.vm text.vm 
Log Message:
new text templates

Index: text.error.vm
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/text.error.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- text.error.vm	28 Aug 2009 12:40:00 -0000	1.2
+++ text.error.vm	28 Sep 2009 14:24:44 -0000	1.3
@@ -1,114 +1,23 @@
-#macro(error $error)
--- Error -------------------------
-#if($error.Line)Line $error.Line #end #if($error.Column)Column $error.Column #end:
-#foreach($message in $error.Message)
->> error.Message: $message
-#end
-#if($error.Context && $error.Context != "")
->> error.Context: $error.Context
-#end
-#foreach($longMessage in $error.Longmessage)
-#foreach($longMessagePiece in $longMessage.Content)
->> error.longMessagePiece: $longMessagePiece
-#end
-#end
-#end
-
-#macro(info $information)
--- Information -------------------
-#if($information.Line)Line $information.Line #end #if($information.Column)Column $information.Column #end:
-#foreach($message in $information.Message)
->> information.Message: $message
-#end
-#if($information.Context && $information.Context != "")
->> information.Context: $information.Context
-#end
-#foreach($longMessage in $information.Longmessage)
-#foreach($longMessagePiece in $longMessage.Content)
->> information.longMessagePiece: $longMessagePiece
-#end
-#end
-#end
-
-#macro(warning $warning)
--- Alerte -----------------------
-#if($warning.Line)Line $warning.Line #end #if($warning.Column)Column $warning.Column #end:
-#foreach($message in $warning.Message)
->> warning.Message: $message
-#end
-#if($warning.Context && $warning.Context != "")
->> warning.Context: $warning.Context
-#end
-#foreach($longMessage in $warning.Longmessage)
-#foreach($longMessagePiece in $longMessage.Content)
->> warning.longMessagePiece: $longMessagePiece
-#end
-#end
-#end
-
-#macro(produceErrors $errors)
-// Errors /////////////////////////////////////////
-
-#foreach($errorList in $errors.Errorlist)
->>>> Location: $errorList.Uri
-#foreach($error in $errorList.Error)
-#error($error)
-#end
-#end
-#end
-
-#macro(produceWarnings $warnings)
-// Alerts ///////////////////////////////////////
-
-#foreach($warningList in $warnings.Warninglist)
-#if($warningList.Warning && $warningList.Warning.size() != 0)
->>>> Location: $warningList.Uri
-#foreach($warning in $warningList.Warning)
-#warning($warning)
-#end
-#end
-#end
-#end
-
-#macro(produceInfos $infos)
-// Informations ///////////////////////////////////
-
-#foreach($infoList in $infos.Infolist)
->>>> Location: $infoList.Uri
-#foreach($information in $infoList.Info)
-#info($information)
-#end
-#end
-#end
-
-
-#set($observationList = $unicorncall.ObservationList)
-#foreach($observationName in $observationList.keySet())
-#set($observation = $observationList.get($observationName))
-
-
-
-========================= $observationName ====================================
-
-#if($observation.isPassed())
-> Le document est valide le test #if($observation.getVersion()) $observation.getVersion().toUpperCase() #else $observationName #end !
-#else
-> Le document ne passe pas le test #if($observation.getVersion()) $observation.getVersion().toUpperCase() #else $observationName #end !
-#produceErrors($observation.Result.Errors)
+#if ($messages.size() > 0)
+#foreach ($message in $messages)
+#if ($message.Level == "ERROR")
+Error:
+	#evaluate($message.Message)
+	$!{message.Content}
 #end
-
-
-#if($observation.Result.Informations)
-#produceInfos($observation.Result.Informations)
 #end
-#if($observation.Result.Warnings)
-#produceWarnings($observation.Result.Warnings)
+#foreach ($message in $messages)
+#if ($message.Level == "WARNING")
+Warning:
+	#evaluate($message.Message)
+	$!{message.Content}
 #end
 #end
-
-#if(!$unicorncall.haveHighPassed())
-$fail_high_priority
+#foreach ($message in $messages)
+#if ($message.Level == "INFO")
+Info:
+	#evaluate($message.Message)
+	$!{message.Content}
 #end
-#if(!$unicorncall.haveMediumPassed())
-$fail_medium_priority
 #end
+#end
\ No newline at end of file

Index: text.vm
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/text.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- text.vm	28 Aug 2009 12:40:00 -0000	1.2
+++ text.vm	28 Sep 2009 14:24:44 -0000	1.3
@@ -1,113 +1,125 @@
-#macro(error $error)
-  ---$text_error--------------------------
-  #if($error.Line)$line $error.Line #end #if($error.Column)Column $error.Column #end :
-  #foreach($message in $error.Message)
-    $text_error : $message
-  #end
-  #if($error.Context && $error.Context != "")
-    ${error_context} : $error.Context
-  #end
-  #foreach($longMessage in $error.Longmessage)
-      	#foreach($longMessagePiece in $longMessage.Content)
-			$longMessagePiece
-        #end
-  #end
-#end
-
-#macro(info $information)
--- Information -------------------
-#if($information.Line)$line $information.Line #end #if($information.Column)Column $information.Column #end:
-#foreach($message in $information.Message)
->> information.Message: $message
-#end
-#if($information.Context && $information.Context != "")
->> information.Context: $information.Context
-#end
-#foreach($longMessage in $information.Longmessage)
-#foreach($longMessagePiece in $longMessage.Content)
->> information.longMessagePiece: $longMessagePiece
-#end
+#if ($messages.size() > 0)
+#foreach ($message in $messages)
+#if ($message.Level == "ERROR")
+Error:
+	#evaluate($message.Message)
+	$!{message.Content}
 #end
 #end
-
-#macro(warning $warning)
--- Alerte -----------------------
-#if($warning.Line)$line $warning.Line #end #if($warning.Column)Column $warning.Column #end:
-#foreach($message in $warning.Message)
->> warning.Message: $message
+#foreach ($message in $messages)
+#if ($message.Level == "WARNING")
+Warning:
+	#evaluate($message.Message)
+	$!{message.Content}
 #end
-#if($warning.Context && $warning.Context != "")
->> warning.Context: $warning.Context
 #end
-#foreach($longMessage in $warning.Longmessage)
-#foreach($longMessagePiece in $longMessage.Content)
->> warning.longMessagePiece: $longMessagePiece
+#foreach ($message in $messages)
+#if ($message.Level == "INFO")
+Info:
+	#evaluate($message.Message)
+	$!{message.Content}
 #end
 #end
 #end
 
+#set($observationList = $unicorncall.ObservationList)
+#foreach ($observationName in $observationList.keySet())
+#set ($observation = $observationList.get($observationName))
+#set ($infoCount = $observation.getInfoCount())
+#set ($errorCount = $observation.getErrorCount())
+#set ($warningCount = $observation.getWarningCount())
+==================================================================================================================================================
+>> #if($observation.isPassed())$test_ok_1#else$test_fail_1#end $unicorncall.getObserverName($observationName, $lang)#if($observation.Rating) ($observation.Rating/100)#end
 
-#macro(produceErrors $errors)
-============== ${text_errors} ===================
-
-	#foreach($error in $errors)
-		#error($error)
-	#end
-#end
+#if($infoCount && $infoCount > 0)   Infos: $infoCount
+#end#if($errorCount && $errorCount > 0)   Errors: $errorCount
+#end#if($warningCount && $warningCount > 0)   Warnings: $warningCount
+#end#if($observation.getFilteredRequestUri())   Direct Link: $observation.getFilteredRequestUri()
+#else   Direct Link: $observation.getBaseURI($observationName)#end
+#if ($infoCount && $infoCount > 0)
+--------------------------------------------------------------------------------------------------------------------------------------------------
+Infos ($infoCount)
+--------------------------------------------------------------------------------------------------------------------------------------------------
+#foreach($result in $observation.getResultsList())
+#if(!$result.Infos.isEmpty())
+#if ($unicorncall.getInputMethod() == "URI")>> URI : $result.Uri#end
+#if ($unicorncall.getInputMethod() == "UPLOAD")>> File : $result.Uri#end
+#if ($unicorncall.getInputMethod() == "DIRECT")>> File : Direct Input#end
 
-#macro(produceWarnings $warnings)
-// $warning ///////////////////////////////////////
+#foreach($info in $result.Infos)
+   -#if($info.Line) Line:$info.Line#end#if($info.Column) Column:$info.Column#end#if($info.Context) Context:$info.Context#end
+#if ($info.Line || $info.Column || $info.Context)
 
-#foreach($warningList in $warnings.Warninglist)
-#if($warningList.Warning && $warningList.Warning.size() != 0)
->>>> $location: $warningList.Uri
-#foreach($warning in $warningList.Warning)
-#warning($warning)
+    #end
+#foreach($message in $info.Message)
+ $message
+#if($velocityHasNext)    #end
 #end
+##foreach($longMessage in $info.Longmessage)
+##foreach($longMessagePiece in $longMessage.Content)
+##$longMessagePiece
+##end
+##end
 #end
 #end
 #end
+#end
+#if ($errorCount && $errorCount > 0)
+--------------------------------------------------------------------------------------------------------------------------------------------------
+Errors ($errorCount)
+--------------------------------------------------------------------------------------------------------------------------------------------------
+#foreach($result in $observation.getResultsList())
+#if(!$result.Errors.isEmpty())
+#if ($unicorncall.getInputMethod() == "URI")>> URI : $result.Uri#end
+#if ($unicorncall.getInputMethod() == "UPLOAD")>> File : $result.Uri#end
+#if ($unicorncall.getInputMethod() == "DIRECT")>> File : Direct Input#end
 
-#macro(produceInfos $infos)
-// $information ///////////////////////////////////
+#foreach($error in $result.Errors)
+   -#if($error.Line) Line:$error.Line#end#if($error.Column) Column:$error.Column#end#if($error.Context) Context:$error.Context#end
+#if ($error.Line || $error.Column || $error.Context)
 
-#foreach($infoList in $infos.Infolist)
->>>> $location: $infoList.Uri
-#foreach($information in $infoList.Info)
-#info($information)
+    #end
+#foreach($message in $error.Message)
+ $message
+#if($velocityHasNext)    #end
 #end
+##foreach($longMessage in $error.Longmessage)
+##foreach($longMessagePiece in $longMessage.Content)
+##$longMessagePiece
+##end
+##end
 #end
 #end
-
-
-#set($observationList = $unicorncall.ObservationList)
-#foreach($observationName in $observationList.keySet())
-#set($observation = $observationList.get($observationName))
-
-
-
-========================= $observationName ====================================
-
-
-#if($observation.isPassed())
-> $test_ok_1 #if($observation.getVersion()) $observation.getVersion().toUpperCase() #else $observationName #end $test_ok_2
-#else
-> $test_fail_1 #if($observation.getVersion()) $observation.getVersion().toUpperCase() #else $observationName #end $test_fail_2
-#foreach($result in $observation.getResultsList())
-        #if(!$result.Errors.isEmpty())
-          $location: $result.Uri
-      	  #produceErrors($result.Errors)
-      	#end
-      #end
 #end
+#end
+#if ($warningCount && $warningCount > 0)
+--------------------------------------------------------------------------------------------------------------------------------------------------
+Warnings ($warningCount)
+--------------------------------------------------------------------------------------------------------------------------------------------------
+#foreach($result in $observation.getResultsList())
+#if(!$result.Warnings.isEmpty())
+#if ($unicorncall.getInputMethod() == "URI")>> URI : $result.Uri#end
+#if ($unicorncall.getInputMethod() == "UPLOAD")>> File : $result.Uri#end
+#if ($unicorncall.getInputMethod() == "DIRECT")>> File : Direct Input#end
 
+#foreach($warning in $result.Warnings)
+   -#if($warning.Line) Line:$warning.Line#end#if($warning.Column) Column:$warning.Column#end#if($warning.Context) Context:$warning.Context#end
+#if ($warning.Line || $warning.Column || $warning.Context)
 
-#if($observation.Result.Informations)
-#produceInfos($observation.Result.Informations)
+    #end
+#foreach($message in $warning.Message)
+ $message
+#if($velocityHasNext)    #end
+#end
+##foreach($longMessage in $warning.Longmessage)
+##foreach($longMessagePiece in $longMessage.Content)
+##$longMessagePiece
+##end
+##end
+#end
 #end
-#if($observation.Result.Warnings)
-#produceWarnings($observation.Result.Warnings)
 #end
 #end
 
-
+#end
+==================================================================================================================================================
\ No newline at end of file

Received on Monday, 28 September 2009 14:24:57 UTC