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:49:31 UTC
svn commit: r1502194 - in /syncope/branches/1_1_X:
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:49:30 2013
New Revision: 1502194
URL: http://svn.apache.org/r1502194
Log:
[SYNCOPE-395] Applying provided patch, thanks
Added:
syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java (with props)
syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/report/RoleReportlet.java (with props)
syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2fo.xsl (with props)
syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2html.xsl (with props)
Modified:
syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java
syncope/branches/1_1_X/core/src/main/resources/report/report2fo.xsl
syncope/branches/1_1_X/core/src/main/resources/report/report2html.xsl
syncope/branches/1_1_X/core/src/main/resources/report/userReportlet2fo.xsl
syncope/branches/1_1_X/core/src/main/resources/report/userReportlet2html.xsl
Added: syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java?rev=1502194&view=auto
==============================================================================
--- syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java (added)
+++ syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java Thu Jul 11 11:49:30 2013
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.report;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.syncope.common.annotation.FormAttributeField;
+import org.apache.syncope.common.search.NodeCond;
+import org.apache.syncope.common.types.IntMappingType;
+
+@XmlRootElement(name = "RoleReportletConfiguration")
+@XmlType
+public class RoleReportletConf extends AbstractReportletConf {
+
+ private static final long serialVersionUID = -8488503068032439699L;
+
+ @XmlEnum
+ @XmlType(name = "RoleReportletConfigurationFeature")
+ public enum Feature {
+
+ id,
+ name,
+ roleOwner,
+ userOwner,
+ entitelments,
+ users,
+ resources
+
+ }
+
+ private NodeCond matchingCond;
+
+ @FormAttributeField(schema = IntMappingType.RoleSchema)
+ private List<String> attrs;
+
+ @FormAttributeField(schema = IntMappingType.RoleDerivedSchema)
+ private List<String> derAttrs;
+
+ @FormAttributeField(schema = IntMappingType.RoleVirtualSchema)
+ private List<String> virAttrs;
+
+ private List<Feature> features;
+
+ public RoleReportletConf() {
+ super();
+ }
+
+ public RoleReportletConf(final String name) {
+ super(name);
+
+ attrs = new ArrayList<String>();
+ derAttrs = new ArrayList<String>();
+ virAttrs = new ArrayList<String>();
+ features = new ArrayList<Feature>();
+ }
+
+ @XmlElementWrapper(name = "normalAttributes")
+ @XmlElement(name = "attribute")
+ public List<String> getAttrs() {
+ return attrs;
+ }
+
+ public void setAttrs(final List<String> attrs) {
+ this.attrs = attrs;
+ }
+
+ @XmlElementWrapper(name = "derivedAttributes")
+ @XmlElement(name = "attribute")
+ public List<String> getDerAttrs() {
+ return derAttrs;
+ }
+
+ public void setDerAttrs(final List<String> derAttrs) {
+ this.derAttrs = derAttrs;
+ }
+
+ @XmlElementWrapper(name = "features")
+ @XmlElement(name = "feature")
+ public List<Feature> getFeatures() {
+ return features;
+ }
+
+ public void setFeatures(final List<Feature> features) {
+ this.features = features;
+ }
+
+ public NodeCond getMatchingCond() {
+ return matchingCond;
+ }
+
+ public void setMatchingCond(final NodeCond matchingCond) {
+ this.matchingCond = matchingCond;
+ }
+
+ @XmlElementWrapper(name = "virtualAttributes")
+ @XmlElement(name = "attribute")
+ public List<String> getVirAttrs() {
+ return virAttrs;
+ }
+
+ public void setVirAttrs(final List<String> virAttrs) {
+ this.virAttrs = virAttrs;
+ }
+}
Propchange: syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/RoleReportletConf.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java?rev=1502194&r1=1502193&r2=1502194&view=diff
==============================================================================
--- syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java (original)
+++ syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/report/UserReportletConf.java Thu Jul 11 11:49:30 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;
}
}
Added: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/report/RoleReportlet.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/report/RoleReportlet.java?rev=1502194&view=auto
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/report/RoleReportlet.java (added)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/report/RoleReportlet.java Thu Jul 11 11:49:30 2013
@@ -0,0 +1,287 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.report;
+
+import static org.apache.syncope.core.report.ReportXMLConst.ATTR_NAME;
+import static org.apache.syncope.core.report.ReportXMLConst.XSD_LONG;
+import static org.apache.syncope.core.report.ReportXMLConst.XSD_STRING;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.syncope.common.report.RoleReportletConf;
+import org.apache.syncope.common.report.RoleReportletConf.Feature;
+import org.apache.syncope.common.to.AbstractAttributableTO;
+import org.apache.syncope.common.to.AttributeTO;
+import org.apache.syncope.common.to.RoleTO;
+import org.apache.syncope.common.types.AttributableType;
+import org.apache.syncope.core.persistence.beans.membership.Membership;
+import org.apache.syncope.core.persistence.beans.role.SyncopeRole;
+import org.apache.syncope.core.persistence.dao.AttributableSearchDAO;
+import org.apache.syncope.core.persistence.dao.EntitlementDAO;
+import org.apache.syncope.core.persistence.dao.RoleDAO;
+import org.apache.syncope.core.rest.data.RoleDataBinder;
+import org.apache.syncope.core.util.AttributableUtil;
+import org.apache.syncope.core.util.EntitlementUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+
+@ReportletConfClass(RoleReportletConf.class)
+public class RoleReportlet extends AbstractReportlet<RoleReportletConf> {
+
+ private static final int PAGE_SIZE = 10;
+
+ @Autowired
+ private EntitlementDAO entitlementDAO;
+
+ @Autowired
+ private RoleDAO roleDAO;
+
+ @Autowired
+ private AttributableSearchDAO searchDAO;
+
+ @Autowired
+ private RoleDataBinder roleDataBinder;
+
+ private List<SyncopeRole> getPagedRoles(final int page) {
+ final Set<Long> adminRoleIds = EntitlementUtil.getRoleIds(entitlementDAO.findAll());
+ final List<SyncopeRole> result;
+ if (conf.getMatchingCond() == null) {
+ result = roleDAO.findAll();
+ } else {
+ result = searchDAO.search(adminRoleIds, conf.getMatchingCond(), page, PAGE_SIZE,
+ AttributableUtil.getInstance(AttributableType.ROLE));
+ }
+
+ return result;
+ }
+
+ private int count() {
+ Set<Long> adminRoleIds = EntitlementUtil.getRoleIds(entitlementDAO.findAll());
+
+ return conf.getMatchingCond() == null
+ ? roleDAO.findAll().size()
+ : searchDAO.count(adminRoleIds, conf.getMatchingCond(),
+ AttributableUtil.getInstance(AttributableType.ROLE));
+ }
+
+ private void doExtractResources(final ContentHandler handler, final AbstractAttributableTO attributableTO)
+ throws SAXException {
+
+ if (attributableTO.getResources().isEmpty()) {
+ LOG.debug("No resources found for {}[{}]", attributableTO.getClass().getSimpleName(), attributableTO
+ .getId());
+ } else {
+ AttributesImpl atts = new AttributesImpl();
+ handler.startElement("", "", "resources", null);
+
+ for (String resourceName : attributableTO.getResources()) {
+ atts.clear();
+
+ atts.addAttribute("", "", ATTR_NAME, XSD_STRING, resourceName);
+ handler.startElement("", "", "resource", atts);
+ handler.endElement("", "", "resource");
+ }
+
+ handler.endElement("", "", "resources");
+ }
+ }
+
+ private void doExtractAttributes(final ContentHandler handler, final AbstractAttributableTO attributableTO,
+ final Collection<String> attrs, final Collection<String> derAttrs, final Collection<String> virAttrs)
+ throws SAXException {
+
+ AttributesImpl atts = new AttributesImpl();
+ if (!attrs.isEmpty()) {
+ Map<String, AttributeTO> attrMap = attributableTO.getAttributeMap();
+
+ handler.startElement("", "", "attributes", null);
+ for (String attrName : attrs) {
+ atts.clear();
+
+ atts.addAttribute("", "", ATTR_NAME, XSD_STRING, attrName);
+ handler.startElement("", "", "attribute", atts);
+
+ if (attrMap.containsKey(attrName)) {
+ for (String value : attrMap.get(attrName).getValues()) {
+ handler.startElement("", "", "value", null);
+ handler.characters(value.toCharArray(), 0, value.length());
+ handler.endElement("", "", "value");
+ }
+ } else {
+ LOG.debug("{} not found for {}[{}]", attrName,
+ attributableTO.getClass().getSimpleName(), attributableTO.getId());
+ }
+
+ handler.endElement("", "", "attribute");
+ }
+ handler.endElement("", "", "attributes");
+ }
+
+ if (!derAttrs.isEmpty()) {
+ Map<String, AttributeTO> derAttrMap = attributableTO.getDerivedAttributeMap();
+
+ handler.startElement("", "", "derivedAttributes", null);
+ for (String attrName : derAttrs) {
+ atts.clear();
+
+ atts.addAttribute("", "", ATTR_NAME, XSD_STRING, attrName);
+ handler.startElement("", "", "derivedAttribute", atts);
+
+ if (derAttrMap.containsKey(attrName)) {
+ for (String value : derAttrMap.get(attrName).getValues()) {
+ handler.startElement("", "", "value", null);
+ handler.characters(value.toCharArray(), 0, value.length());
+ handler.endElement("", "", "value");
+ }
+ } else {
+ LOG.debug("{} not found for {}[{}]", attrName,
+ attributableTO.getClass().getSimpleName(), attributableTO.getId());
+ }
+
+ handler.endElement("", "", "derivedAttribute");
+ }
+ handler.endElement("", "", "derivedAttributes");
+ }
+
+ if (!virAttrs.isEmpty()) {
+ Map<String, AttributeTO> virAttrMap = attributableTO.getVirtualAttributeMap();
+
+ handler.startElement("", "", "virtualAttributes", null);
+ for (String attrName : virAttrs) {
+ atts.clear();
+
+ atts.addAttribute("", "", ATTR_NAME, XSD_STRING, attrName);
+ handler.startElement("", "", "virtualAttribute", atts);
+
+ if (virAttrMap.containsKey(attrName)) {
+ for (String value : virAttrMap.get(attrName).getValues()) {
+ handler.startElement("", "", "value", null);
+ handler.characters(value.toCharArray(), 0, value.length());
+ handler.endElement("", "", "value");
+ }
+ } else {
+ LOG.debug("{} not found for {}[{}]", attrName,
+ attributableTO.getClass().getSimpleName(), attributableTO.getId());
+ }
+
+ handler.endElement("", "", "virtualAttribute");
+ }
+ handler.endElement("", "", "virtualAttributes");
+ }
+ }
+
+ private void doExtract(final ContentHandler handler, final List<SyncopeRole> roles)
+ throws SAXException, ReportException {
+
+ AttributesImpl atts = new AttributesImpl();
+ for (SyncopeRole role : roles) {
+ atts.clear();
+
+ for (Feature feature : conf.getFeatures()) {
+ String type = null;
+ String value = null;
+ switch (feature) {
+ case id:
+ type = XSD_LONG;
+ value = String.valueOf(role.getId());
+ break;
+
+ case name:
+ type = XSD_STRING;
+ value = String.valueOf(role.getName());
+ break;
+
+ case roleOwner:
+ type = XSD_LONG;
+ value = String.valueOf(role.getRoleOwner());
+ break;
+
+ case userOwner:
+ type = XSD_LONG;
+ value = String.valueOf(role.getUserOwner());
+ break;
+
+ default:
+ }
+
+ if (type != null && value != null) {
+ atts.addAttribute("", "", feature.name(), type, value);
+ }
+ }
+
+ handler.startElement("", "", "role", atts);
+
+ // Using RoleTO for attribute values, since the conversion logic of
+ // values to String is already encapsulated there
+
+ RoleTO roleTO = roleDataBinder.getRoleTO(role);
+
+ doExtractAttributes(handler, roleTO, conf.getAttrs(), conf.getDerAttrs(), conf.getVirAttrs());
+
+ if (conf.getFeatures().contains(Feature.entitelments)) {
+ handler.startElement("", "", "entitlements", null);
+
+ for (String ent : roleTO.getEntitlements()) {
+ atts.clear();
+
+ atts.addAttribute("", "", "id", XSD_STRING, String.valueOf(ent));
+
+ handler.startElement("", "", "entitlement", atts);
+ handler.endElement("", "", "entitlement");
+ }
+
+ handler.endElement("", "", "entitlements");
+ }
+ // to get resources associated to a role
+ if (conf.getFeatures().contains(Feature.resources)) {
+ doExtractResources(handler, roleTO);
+ }
+ //to get users asscoiated to a role is preferred RoleDAO to RoleTO
+ if (conf.getFeatures().contains(Feature.users)) {
+ handler.startElement("", "", "users", null);
+
+ for (Membership memb : roleDAO.findMemberships(role)) {
+ atts.clear();
+
+ atts.addAttribute("", "", "userId", XSD_LONG, String.valueOf(memb.getSyncopeUser().getId()));
+ atts.addAttribute("", "", "userUsername", XSD_STRING, String.valueOf(memb.getSyncopeUser().
+ getUsername()));
+
+ handler.startElement("", "", "user", atts);
+ handler.endElement("", "", "user");
+ }
+
+ handler.endElement("", "", "users");
+ }
+
+ handler.endElement("", "", "role");
+ }
+ }
+
+ @Override
+ protected void doExtract(final ContentHandler handler) throws SAXException, ReportException {
+ for (int i = 1; i <= (count() / PAGE_SIZE) + 1; i++) {
+ doExtract(handler, getPagedRoles(i));
+ }
+ }
+}
Propchange: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/report/RoleReportlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/report/RoleReportlet.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/report/RoleReportlet.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: syncope/branches/1_1_X/core/src/main/resources/report/report2fo.xsl
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/resources/report/report2fo.xsl?rev=1502194&r1=1502193&r2=1502194&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/resources/report/report2fo.xsl (original)
+++ syncope/branches/1_1_X/core/src/main/resources/report/report2fo.xsl Thu Jul 11 11:49:30 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/branches/1_1_X/core/src/main/resources/report/report2html.xsl
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/resources/report/report2html.xsl?rev=1502194&r1=1502193&r2=1502194&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/resources/report/report2html.xsl (original)
+++ syncope/branches/1_1_X/core/src/main/resources/report/report2html.xsl Thu Jul 11 11:49:30 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>
Added: syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2fo.xsl
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2fo.xsl?rev=1502194&view=auto
==============================================================================
--- syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2fo.xsl (added)
+++ syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2fo.xsl Thu Jul 11 11:49:30 2013
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+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:template match="reportlet[@class='org.apache.syncope.core.report.RoleReportlet']">
+
+ <fo:block font-size="16pt" font-weight="bold" space-after="0.5cm" space-before="5mm">Reportlet: <xsl:value-of select="@name"/></fo:block>
+
+ <xsl:for-each select="role">
+ <fo:block font-size="14pt" font-weight="bold" space-before="15mm" space-after="5mm" background-color="(#8888ff)">Role <xsl:value-of select="@name"/></fo:block>
+ <fo:table table-layout="fixed" space-after="7mm">
+ <fo:table-column/>
+ <fo:table-column/>
+ <fo:table-body>
+ <fo:table-row background-color="(#ccccff)">
+ <fo:table-cell>
+ <fo:block>Id:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-style="italic">
+ <xsl:value-of select="@id"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <xsl:if test="@roleOwner != 'null'">
+ <fo:table-row background-color="(#ccccff)">
+ <fo:table-cell>
+ <fo:block>Role Owner:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-style="italic">
+ <xsl:value-of select="@roleOwner"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:if>
+ <xsl:if test="@userOwner != 'null'">
+ <fo:table-row background-color="(#ccccff)">
+ <fo:table-cell>
+ <fo:block>Last Login Date:</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-style="italic">
+ <xsl:value-of select="@userOwner"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:if>
+ </fo:table-body>
+ </fo:table>
+ <xsl:choose>
+ <xsl:when test="string-length(attributes/attribute) > 0">
+ <xsl:call-template name="attributes">
+ <xsl:with-param name="label">Attributes</xsl:with-param>
+ <xsl:with-param name="node" select="attributes/attribute"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block color="red" font-size="9pt" space-after="3mm">THIS ROLE HASN'T ANY ATTRIBUTE</fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="string-length(derivedAttributes/derivedAttribute) > 0">
+ <xsl:call-template name="attributes">
+ <xsl:with-param name="label">Derived Attributes</xsl:with-param>
+ <xsl:with-param name="node" select="derivedAttributes/derivedAttribute"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block color="red" font-size="9pt" space-after="3mm">THIS ROLE HASN'T ANY DERIVED ATTRIBUTE</fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="string-length(virtualAttributes/virtualAttribute) > 0">
+ <xsl:call-template name="attributes">
+ <xsl:with-param name="label">Virtual Attributes</xsl:with-param>
+ <xsl:with-param name="node" select="virtualAttributes/virtualAttribute"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block color="red" font-size="9pt" space-after="3mm">THIS ROLE HASN'T ANY VIRTUAL ATTRIBUTE</fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!--entitlements-->
+ <xsl:choose>
+ <xsl:when test="entitlements/entitlement">
+ <xsl:call-template name="entitlements">
+ <xsl:with-param name="label">Entitlements</xsl:with-param>
+ <xsl:with-param name="node" select="entitlements/entitlement"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block color="red" font-size="9pt" space-after="3mm">THIS ROLE HASN'T ANY ENTITLEMENT</fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="users/user">
+ <fo:block font-size="11pt" font-weight="bold">Users</fo:block>
+ <xsl:for-each select="users/user">
+ <fo:block background-color="(#ccccff)" font-size="9pt" font-weight="bold" space-before="4mm">User: <xsl:value-of select="@userUsername"/> (Id: <xsl:value-of select="@userId"/>)</fo:block>
+
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block color="red" font-size="9pt" space-after="3mm">THIS ROLE HASN'T ANY USER ASSIGNED TO</fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="roleResources">
+ <xsl:with-param name="node" select="resources/resource"/>
+ </xsl:call-template>
+ </xsl:for-each>
+
+ </xsl:template>
+
+ <xsl:template name="attributes">
+ <xsl:param name="label"/>
+ <xsl:param name="node"/>
+ <fo:block font-size="11pt" font-weight="bold" space-after="2mm">
+ <xsl:value-of select="$label"/>
+ </fo:block>
+ <fo:table table-layout="fixed" space-after="7mm">
+ <fo:table-column/>
+ <fo:table-column/>
+ <fo:table-header>
+ <fo:table-row height="7mm" background-color="(#ccccba)">
+ <fo:table-cell>
+ <fo:block font-weight="bold">Schema name</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Value(s)</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <xsl:for-each select="$node">
+ <xsl:if test="string-length(value/text()) > 0">
+ <fo:table-row height="4mm" background-color="(#ccccff)">
+ <fo:table-cell>
+ <fo:block>
+ <xsl:value-of select="@name"/>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <xsl:for-each select="value">
+ <fo:block></fo:block><!-- <fo:block>•</fo:block>-->
+ <fo:block font-style="italic">
+ <xsl:value-of select="text()"/>
+ </fo:block>
+ </xsl:for-each>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:if>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block></fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block></fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:for-each>
+ </fo:table-body>
+ </fo:table>
+ </xsl:template>
+ <!--entitlements template-->
+ <xsl:template name="entitlements">
+ <xsl:param name="label"/>
+ <xsl:param name="node"/>
+ <fo:block font-size="11pt" font-weight="bold" space-after="2mm" space-before="5mm">
+ <xsl:value-of select="$label"/>
+ </fo:block>
+ <fo:table table-layout="fixed" space-after="7mm">
+ <fo:table-column/>
+ <!--<fo:table-column/>-->
+ <fo:table-header>
+ <fo:table-row height="7mm" background-color="(#ccccba)">
+ <fo:table-cell>
+ <fo:block font-weight="bold">Name</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <xsl:for-each select="$node">
+ <fo:table-row height="4mm" background-color="(#ccccff)">
+ <fo:table-cell>
+ <fo:block>
+ <xsl:value-of select="@id"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:for-each>
+ </fo:table-body>
+ </fo:table>
+ </xsl:template>
+
+ <xsl:template name="roleResources">
+ <xsl:param name="node"/>
+ <fo:block font-size="11pt" font-weight="bold" space-after="3mm" space-before="5mm">Role Resources</fo:block>
+ <xsl:for-each select="$node">
+ <fo:block></fo:block> <!-- <fo:block>•</fo:block>-->
+ <fo:block background-color="(#ccccff)">
+ <xsl:value-of select="@name"/>
+ </fo:block>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
Propchange: syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2fo.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2fo.xsl
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2fo.xsl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2html.xsl
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2html.xsl?rev=1502194&view=auto
==============================================================================
--- syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2html.xsl (added)
+++ syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2html.xsl Thu Jul 11 11:49:30 2013
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+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.RoleReportlet']">
+ <h2>Reportlet: <xsl:value-of select="@name"/></h2>
+ <xsl:for-each select="role">
+ <h3>Role <xsl:value-of select="@name"/></h3>
+
+ <table style="border: 1px solid black;">
+ <tr>
+ <td>Id:</td>
+ <td>
+ <xsl:value-of select="@id"/>
+ </td>
+ </tr>
+ <xsl:if test="@roleOwner != 'null'"> <!--!= null test="not(USER/FIRSTNAME)" -->
+ <tr>
+ <td>Role Owner:</td>
+ <td>
+ <xsl:value-of select="@roleOwner"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@userOwner != 'null'">
+ <tr>
+ <td>User Owner:</td>
+ <td>
+ <xsl:value-of select="@userOwner"/>
+ </td>
+ </tr>
+ </xsl:if>
+
+ </table>
+
+ <xsl:choose>
+ <xsl:when test="string-length(attributes/attribute) > 0">
+ <xsl:call-template name="attributes">
+ <xsl:with-param name="label">Attributes</xsl:with-param>
+ <xsl:with-param name="node" select="attributes/attribute"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <h5>THIS ROLE HASN'T ANY ATTRIBUTE</h5>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="string-length(derivedAttributes/derivedAttribute) > 0">
+ <xsl:call-template name="attributes">
+ <xsl:with-param name="label">Derived Attributes</xsl:with-param>
+ <xsl:with-param name="node" select="derivedAttributes/derivedAttribute"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <h5>THIS ROLE HASN'T ANY DERIVED ATTRIBUTE</h5>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!--</xsl:if>-->
+ <xsl:choose>
+ <xsl:when test="string-length(virtualAttributes/virtualAttribute) > 0">
+ <xsl:call-template name="attributes">
+ <xsl:with-param name="label">Virtual Attributes</xsl:with-param>
+ <xsl:with-param name="node" select="virtualAttributes/virtualAttribute"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <h5>THIS ROLE HASN'T ANY VIRTUAL ATTRIBUTE</h5>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="entitlements/entitlement">
+ <xsl:call-template name="entitlements">
+ <xsl:with-param name="label">Entitlements: </xsl:with-param>
+ <xsl:with-param name="node" select="entitlements/entitlement"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <h5>THIS ROLE HASN'T ANY ENTITLEMENT</h5>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="users/user">
+ <h4>Users</h4>
+ <xsl:for-each select="users/user">
+ <h5>User: <xsl:value-of select="@userUsername"/> (Id: <xsl:value-of select="@userId"/>)</h5>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <h5>THIS ROLE HASN'T ANY USER ASSIGNED TO</h5>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:call-template name="roleResources">
+ <xsl:with-param name="node" select="resources/resource"/>
+ </xsl:call-template>
+ <hr/>
+
+ </xsl:for-each>
+ </xsl:template>
+
+ <!--entitlement template-->
+ <xsl:template name="entitlements">
+ <xsl:param name="label"/>
+ <xsl:param name="node"/>
+
+ <h4>
+ <xsl:value-of select="$label"/>
+ </h4>
+
+ <table>
+
+ <tbody>
+ <xsl:for-each select="$node">
+ <tr>
+ <td>
+ <xsl:value-of select="@id"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </xsl:template>
+
+
+ <xsl:template name="attributes">
+ <xsl:param name="label"/>
+ <xsl:param name="node"/>
+
+ <h4>
+ <xsl:value-of select="$label"/>
+ </h4>
+
+ <table>
+ <thead>
+ <tr>
+ <th>Schema name</th>
+ <th>Value(s)</th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="$node">
+ <xsl:if test="string-length(value/text()) > 0">
+ <tr>
+ <td>
+ <xsl:value-of select="@name"/>
+ </td>
+ <td>
+ <ul>
+ <xsl:for-each select="value">
+ <li>
+ <xsl:value-of select="text()"/>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </td>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </xsl:template>
+
+ <xsl:template name="roleResources">
+ <xsl:param name="node"/>
+
+ <h4>Role Resources</h4>
+ <ul>
+ <xsl:for-each select="$node">
+ <li>
+ <xsl:value-of select="@name"/>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
Propchange: syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2html.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2html.xsl
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: syncope/branches/1_1_X/core/src/main/resources/report/roleReportlet2html.xsl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: syncope/branches/1_1_X/core/src/main/resources/report/userReportlet2fo.xsl
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/resources/report/userReportlet2fo.xsl?rev=1502194&r1=1502193&r2=1502194&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/resources/report/userReportlet2fo.xsl (original)
+++ syncope/branches/1_1_X/core/src/main/resources/report/userReportlet2fo.xsl Thu Jul 11 11:49:30 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/branches/1_1_X/core/src/main/resources/report/userReportlet2html.xsl
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/resources/report/userReportlet2html.xsl?rev=1502194&r1=1502193&r2=1502194&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/resources/report/userReportlet2html.xsl (original)
+++ syncope/branches/1_1_X/core/src/main/resources/report/userReportlet2html.xsl Thu Jul 11 11:49:30 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">