You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2013/07/11 13:50:16 UTC

svn commit: r1502195 - in /syncope/trunk: ./ common/src/main/java/org/apache/syncope/common/report/ core/src/main/java/org/apache/syncope/core/report/ core/src/main/resources/report/

Author: ilgrosso
Date: Thu Jul 11 11:50:15 2013
New Revision: 1502195

URL: http://svn.apache.org/r1502195
Log:
[SYNCOPE-395] Merge from 1_1_X

Added:
    syncope/trunk/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
      - copied unchanged from r1502194, syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/report/RoleReportlet.java
      - copied unchanged from r1502194, syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/report/RoleReportlet.java
    syncope/trunk/core/src/main/resources/report/roleReportlet2fo.xsl
      - copied unchanged from r1502194, syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2fo.xsl
    syncope/trunk/core/src/main/resources/report/roleReportlet2html.xsl
      - copied unchanged from r1502194, syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2html.xsl
Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java
    syncope/trunk/core/src/main/resources/report/report2fo.xsl
    syncope/trunk/core/src/main/resources/report/report2html.xsl
    syncope/trunk/core/src/main/resources/report/userReportlet2fo.xsl
    syncope/trunk/core/src/main/resources/report/userReportlet2html.xsl

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_1_X:r1502188-1502194

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java?rev=1502195&r1=1502194&r2=1502195&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java Thu Jul 11 11:50:15 2013
@@ -87,7 +87,7 @@ public class UserReportletConf extends A
         return attrs;
     }
 
-    public void setAttrs(List<String> attrs) {
+    public void setAttrs(final List<String> attrs) {
         this.attrs = attrs;
     }
 
@@ -97,7 +97,7 @@ public class UserReportletConf extends A
         return derAttrs;
     }
 
-    public void setDerAttrs(List<String> derAttrs) {
+    public void setDerAttrs(final List<String> derAttrs) {
         this.derAttrs = derAttrs;
     }
 
@@ -107,7 +107,7 @@ public class UserReportletConf extends A
         return features;
     }
 
-    public void setFeatures(List<Feature> features) {
+    public void setFeatures(final List<Feature> features) {
         this.features = features;
     }
 
@@ -115,7 +115,7 @@ public class UserReportletConf extends A
         return matchingCond;
     }
 
-    public void setMatchingCond(NodeCond matchingCond) {
+    public void setMatchingCond(final NodeCond matchingCond) {
         this.matchingCond = matchingCond;
     }
 
@@ -125,7 +125,7 @@ public class UserReportletConf extends A
         return virAttrs;
     }
 
-    public void setVirAttrs(List<String> virAttrs) {
+    public void setVirAttrs(final List<String> virAttrs) {
         this.virAttrs = virAttrs;
     }
 }

Modified: syncope/trunk/core/src/main/resources/report/report2fo.xsl
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/report/report2fo.xsl?rev=1502195&r1=1502194&r2=1502195&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/report/report2fo.xsl (original)
+++ syncope/trunk/core/src/main/resources/report/report2fo.xsl Thu Jul 11 11:50:15 2013
@@ -16,14 +16,13 @@ software distributed under the License i
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-
 -->
-
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">
 
   <xsl:import href="userReportlet2fo.xsl"/>
+  <xsl:import href="roleReportlet2fo.xsl"/>
   <xsl:import href="staticReportlet2fo.xsl"/>
  
   <xsl:param name="status"/>
@@ -36,55 +35,61 @@ under the License.
       
       <!-- defines the layout master -->
       <fo:layout-master-set>
-	<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" 
-			       margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
-	  <fo:region-body margin-top="1cm"/>
-	  <fo:region-before extent="1cm"/>
-	  <fo:region-after extent="1.5cm"/>
-	</fo:simple-page-master>
+        <fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" 
+                               margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
+          <fo:region-body margin-top="1cm"/>
+          <fo:region-before extent="1cm"/>
+          <fo:region-after extent="1.5cm"/>
+        </fo:simple-page-master>
       </fo:layout-master-set>
 
       <!-- starts actual layout -->
       <fo:page-sequence master-reference="first">
 	
-	<fo:flow flow-name="xsl-region-body">
-	  <fo:block font-size="24pt" font-weight="bold" text-align="center" space-after="1cm">
-	    Apache Syncope Report - <xsl:value-of select="report/@name"/>
-	  </fo:block>
-
-	  <fo:table table-layout="fixed" border-width="0.5mm" border-style="solid" width="100%" space-after="1cm">
-	    <fo:table-column column-width="proportional-column-width(1)"/>
-	    <fo:table-column column-width="proportional-column-width(1)"/>
-	    <fo:table-body>
-	      <fo:table-row>
-		<fo:table-cell>
-		  <fo:block font-size="18pt" font-weight="bold">Report Name:</fo:block>
-		</fo:table-cell>
-		<fo:table-cell>
-		  <fo:block font-size="18pt" font-weight="bold"><xsl:value-of select="report/@name"/></fo:block>
-		</fo:table-cell>
-	      </fo:table-row>
-	      <fo:table-row>
-		<fo:table-cell>
-		  <fo:block font-size="18pt" font-weight="bold">Start Date:</fo:block>
-		</fo:table-cell>
-		<fo:table-cell>
-		  <fo:block font-size="18pt" font-weight="bold"><xsl:value-of select="$startDate"/></fo:block>
-		</fo:table-cell>
-	      </fo:table-row>
-	      <fo:table-row>
-		<fo:table-cell>
-		  <fo:block font-size="18pt" font-weight="bold">End Date:</fo:block>
-		</fo:table-cell>
-		<fo:table-cell>
-		  <fo:block font-size="18pt" font-weight="bold"><xsl:value-of select="$endDate"/></fo:block>
-		</fo:table-cell>
-	      </fo:table-row>
-	    </fo:table-body>
-	  </fo:table>
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block font-size="24pt" font-weight="bold" text-align="center" space-after="1cm">
+            Apache Syncope Report - <xsl:value-of select="report/@name"/>
+          </fo:block>
+
+          <fo:table table-layout="fixed" border-width="0.5mm" border-style="solid" width="100%" space-after="1cm">
+            <fo:table-column column-width="proportional-column-width(1)"/>
+            <fo:table-column column-width="proportional-column-width(1)"/>
+            <fo:table-body>
+              <fo:table-row>
+                <fo:table-cell>
+                  <fo:block font-size="18pt" font-weight="bold">Report Name:</fo:block>
+                </fo:table-cell>
+                <fo:table-cell>
+                  <fo:block font-size="18pt" font-weight="bold">
+                    <xsl:value-of select="report/@name"/>
+                  </fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+              <fo:table-row>
+                <fo:table-cell>
+                  <fo:block font-size="18pt" font-weight="bold">Start Date:</fo:block>
+                </fo:table-cell>
+                <fo:table-cell>
+                  <fo:block font-size="18pt" font-weight="bold">
+                    <xsl:value-of select="$startDate"/>
+                  </fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+              <fo:table-row>
+                <fo:table-cell>
+                  <fo:block font-size="18pt" font-weight="bold">End Date:</fo:block>
+                </fo:table-cell>
+                <fo:table-cell>
+                  <fo:block font-size="18pt" font-weight="bold">
+                    <xsl:value-of select="$endDate"/>
+                  </fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+            </fo:table-body>
+          </fo:table>
 
-	  <xsl:apply-templates/>
-	</fo:flow>
+          <xsl:apply-templates/>
+        </fo:flow>
       </fo:page-sequence>
     </fo:root>
   </xsl:template>

Modified: syncope/trunk/core/src/main/resources/report/report2html.xsl
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/report/report2html.xsl?rev=1502195&r1=1502194&r2=1502195&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/report/report2html.xsl (original)
+++ syncope/trunk/core/src/main/resources/report/report2html.xsl Thu Jul 11 11:50:15 2013
@@ -16,13 +16,12 @@ software distributed under the License i
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-
 -->
-
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="1.0">
 
   <xsl:import href="userReportlet2html.xsl"/>
+  <xsl:import href="roleReportlet2html.xsl"/>
   <xsl:import href="staticReportlet2html.xsl"/>
  
   <xsl:param name="status"/>
@@ -33,26 +32,44 @@ under the License.
   <xsl:template match="/">
     <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       <head>
-	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-	<title>Apache Syncope Report - <xsl:value-of select="report/@name"/></title>
+        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+        <title>Apache Syncope Report - <xsl:value-of select="report/@name"/></title>
       </head>
       <body>
-	<table style="border: 1px solid black;">
-	  <tr>
-	    <td><h1>Report Name:</h1></td>
-	    <td><h1><xsl:value-of select="report/@name"/></h1></td>
-	  </tr>
-	  <tr>
-	    <td><h2>Start Date:</h2></td>
-	    <td><h2><xsl:value-of select="$startDate"/></h2></td>
-	  </tr>
-	  <tr>
-	    <td><h2>End Date:</h2></td>
-	    <td><h2><xsl:value-of select="$endDate"/></h2></td>
-	  </tr>
-	</table>
+        <table style="border: 1px solid black;">
+          <tr>
+            <td>
+              <h1>Report Name:</h1>
+            </td>
+            <td>
+              <h1>
+                <xsl:value-of select="report/@name"/>
+              </h1>
+            </td>
+          </tr>
+          <tr>
+            <td>
+              <h2>Start Date:</h2>
+            </td>
+            <td>
+              <h2>
+                <xsl:value-of select="$startDate"/>
+              </h2>
+            </td>
+          </tr>
+          <tr>
+            <td>
+              <h2>End Date:</h2>
+            </td>
+            <td>
+              <h2>
+                <xsl:value-of select="$endDate"/>
+              </h2>
+            </td>
+          </tr>
+        </table>
 
-	<xsl:apply-templates/>
+        <xsl:apply-templates/>
       </body>
     </html>
   </xsl:template>

Modified: syncope/trunk/core/src/main/resources/report/userReportlet2fo.xsl
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/report/userReportlet2fo.xsl?rev=1502195&r1=1502194&r2=1502195&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/report/userReportlet2fo.xsl (original)
+++ syncope/trunk/core/src/main/resources/report/userReportlet2fo.xsl Thu Jul 11 11:50:15 2013
@@ -16,9 +16,7 @@ software distributed under the License i
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-
 -->
-
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">
@@ -170,7 +168,8 @@ under the License.
                   <fo:block color="red" font-size="8pt" space-after="2mm">THIS ROLE HASN'T ANY VIRTUAL ATTRIBUTE</fo:block>
                 </xsl:otherwise>
               </xsl:choose>
-              <xsl:call-template name="resources">
+              <!-- 'roleResources" is defined in roleReportlet2fo.xsl -->
+              <xsl:call-template name="roleResources">
                 <xsl:with-param name="node" select="resources/resource"/>
               </xsl:call-template>
             </fo:block>

Modified: syncope/trunk/core/src/main/resources/report/userReportlet2html.xsl
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/report/userReportlet2html.xsl?rev=1502195&r1=1502194&r2=1502195&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/report/userReportlet2html.xsl (original)
+++ syncope/trunk/core/src/main/resources/report/userReportlet2html.xsl Thu Jul 11 11:50:15 2013
@@ -16,16 +16,16 @@ software distributed under the License i
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-
 -->
-
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="1.0">
 
   <xsl:template match="reportlet[@class='org.apache.syncope.core.report.UserReportlet']">
-    <h2>Reportlet: <xsl:value-of select="@name"/></h2>
+    
+    <h3>Reportlet: <xsl:value-of select="@name"/></h3>
+    
     <xsl:for-each select="user">
-      <h3>User <xsl:value-of select="@username"/></h3>
+      <h4>User <xsl:value-of select="@username"/></h4>
       
       <table style="border: 1px solid black;">
         <tr>
@@ -90,7 +90,7 @@ under the License.
           </xsl:call-template>
         </xsl:when>
         <xsl:otherwise>
-          <h5>THIS USER HASN'T ANY DERIVED ATTRIBUTE</h5>
+          <h5>THIS USER HASN'T DERIVED ATTRIBUTES</h5>
         </xsl:otherwise>
       </xsl:choose>
       <!--</xsl:if>-->
@@ -102,7 +102,7 @@ under the License.
           </xsl:call-template>
         </xsl:when>
         <xsl:otherwise>
-          <h5>THIS USER HASN'T ANY VIRTUAL ATTRIBUTE</h5>
+          <h5>THIS USER HASN'T VIRTUAL ATTRIBUTES</h5>
         </xsl:otherwise>
       </xsl:choose>
       
@@ -120,7 +120,7 @@ under the License.
                   </xsl:call-template>
                 </xsl:when>
                 <xsl:otherwise>
-                  <h5>THIS ROLE HASN'T ANY ATTRIBUTE</h5>
+                  <h5>THIS ROLE HASN'T ATTRIBUTES</h5>
                 </xsl:otherwise>
               </xsl:choose>
               <xsl:choose>
@@ -131,7 +131,7 @@ under the License.
                   </xsl:call-template>
                 </xsl:when>
                 <xsl:otherwise>
-                  <h5>THIS ROLE HASN'T ANY DERIVED ATTRIBUTE</h5>
+                  <h5>THIS ROLE HASN'T DERIVED ATTRIBUTES</h5>
                 </xsl:otherwise>
               </xsl:choose>
               <xsl:choose>
@@ -142,17 +142,18 @@ under the License.
                   </xsl:call-template>
                 </xsl:when>
                 <xsl:otherwise>
-                  <h5>THIS ROLE HASN'T ANY VIRTUAL ATTRIBUTE</h5>
+                  <h5>THIS ROLE HASN'T VIRTUAL ATTRIBUTES</h5>
                 </xsl:otherwise>
               </xsl:choose>
-              <xsl:call-template name="resources">
+              <!-- 'roleResources" is defined in roleReportlet2html.xsl -->
+              <xsl:call-template name="roleResources">
                 <xsl:with-param name="node" select="resources/resource"/>
               </xsl:call-template>
             </blockquote>
           </xsl:for-each>
         </xsl:when>
         <xsl:otherwise>
-          <h5>THIS USER ISN'T ASSIGNED TO ANY ROLE</h5>
+          <h5>THIS USER ISN'T ASSIGNED TO A ROLE</h5>
         </xsl:otherwise>
       </xsl:choose>
       <xsl:call-template name="resources">
@@ -160,6 +161,7 @@ under the License.
       </xsl:call-template>
       <hr/>
     </xsl:for-each>
+       
   </xsl:template>
 
   <xsl:template name="attributes">