@Test public void testHtmlProcessorActionPolicySetType() { PolicySetType mockPolicySetType = Mockito.mock(PolicySetType.class); processor = new HtmlProcessor(tempAction, mockPolicySetType); processor.onFinishScan(mockPolicySetType); verify(mockPolicySetType).getVersion(); }
@Override public void onFinishScan(Object root) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(ENTER); } if (rootPolicyObject instanceof PolicySetType) { htmlOut.println("</dl>"); } else { htmlOut.println("</ol>"); } htmlOut.println("<hr>"); htmlOut.println("<h3>Attribute Table:</h3>"); htmlOut.println("<table border=\"3\" style=\"width:100%\">"); htmlOut.println("<tr>"); htmlOut.print("<th>Category</th>"); htmlOut.print("<th>Type</th>"); htmlOut.print("<th>Identifier</th>"); htmlOut.println("</tr>"); for (Map.Entry<String, AttributeIdentifiers> entry : this.attributeIdentifiersMap.entrySet()) { AttributeIdentifiers value = entry.getValue(); htmlOut.println("<tr>"); htmlOut.print("<td><a name=\"" + entry.getKey() + "\"></a>" + value.category + "</td>"); htmlOut.print("<td>" + value.getType() + "</td>"); htmlOut.print("<td>" + value.id + "</td>"); htmlOut.println("</tr>"); } htmlOut.println("</table>"); htmlOut.println("<p></p>"); super.onFinishScan(root); }
HtmlProcessor extends SimpleCallback { @Override public void onFinishScan(Object root) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(ENTER); } if (rootPolicyObject instanceof PolicySetType) { htmlOut.println("</dl>"); } else { htmlOut.println("</ol>"); } htmlOut.println("<hr>"); htmlOut.println("<h3>Attribute Table:</h3>"); htmlOut.println("<table border=\"3\" style=\"width:100%\">"); htmlOut.println("<tr>"); htmlOut.print("<th>Category</th>"); htmlOut.print("<th>Type</th>"); htmlOut.print("<th>Identifier</th>"); htmlOut.println("</tr>"); for (Map.Entry<String, AttributeIdentifiers> entry : this.attributeIdentifiersMap.entrySet()) { AttributeIdentifiers value = entry.getValue(); htmlOut.println("<tr>"); htmlOut.print("<td><a name=\"" + entry.getKey() + "\"></a>" + value.category + "</td>"); htmlOut.print("<td>" + value.getType() + "</td>"); htmlOut.print("<td>" + value.id + "</td>"); htmlOut.println("</tr>"); } htmlOut.println("</table>"); htmlOut.println("<p></p>"); super.onFinishScan(root); } }
HtmlProcessor extends SimpleCallback { @Override public void onFinishScan(Object root) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(ENTER); } if (rootPolicyObject instanceof PolicySetType) { htmlOut.println("</dl>"); } else { htmlOut.println("</ol>"); } htmlOut.println("<hr>"); htmlOut.println("<h3>Attribute Table:</h3>"); htmlOut.println("<table border=\"3\" style=\"width:100%\">"); htmlOut.println("<tr>"); htmlOut.print("<th>Category</th>"); htmlOut.print("<th>Type</th>"); htmlOut.print("<th>Identifier</th>"); htmlOut.println("</tr>"); for (Map.Entry<String, AttributeIdentifiers> entry : this.attributeIdentifiersMap.entrySet()) { AttributeIdentifiers value = entry.getValue(); htmlOut.println("<tr>"); htmlOut.print("<td><a name=\"" + entry.getKey() + "\"></a>" + value.category + "</td>"); htmlOut.print("<td>" + value.getType() + "</td>"); htmlOut.print("<td>" + value.id + "</td>"); htmlOut.println("</tr>"); } htmlOut.println("</table>"); htmlOut.println("<p></p>"); super.onFinishScan(root); } HtmlProcessor(File policyFile, Object policyObject); }
HtmlProcessor extends SimpleCallback { @Override public void onFinishScan(Object root) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(ENTER); } if (rootPolicyObject instanceof PolicySetType) { htmlOut.println("</dl>"); } else { htmlOut.println("</ol>"); } htmlOut.println("<hr>"); htmlOut.println("<h3>Attribute Table:</h3>"); htmlOut.println("<table border=\"3\" style=\"width:100%\">"); htmlOut.println("<tr>"); htmlOut.print("<th>Category</th>"); htmlOut.print("<th>Type</th>"); htmlOut.print("<th>Identifier</th>"); htmlOut.println("</tr>"); for (Map.Entry<String, AttributeIdentifiers> entry : this.attributeIdentifiersMap.entrySet()) { AttributeIdentifiers value = entry.getValue(); htmlOut.println("<tr>"); htmlOut.print("<td><a name=\"" + entry.getKey() + "\"></a>" + value.category + "</td>"); htmlOut.print("<td>" + value.getType() + "</td>"); htmlOut.print("<td>" + value.id + "</td>"); htmlOut.println("</tr>"); } htmlOut.println("</table>"); htmlOut.println("<p></p>"); super.onFinishScan(root); } HtmlProcessor(File policyFile, Object policyObject); Map<String, AttributeIdentifiers> getAttributeIdentifiersMap(); @Override void onFinishScan(Object root); @Override CallbackResult onPreVisitPolicySet(PolicySetType parent, PolicySetType policySet); @Override CallbackResult onPostVisitPolicySet(PolicySetType parent, PolicySetType policySet); void policySet(PolicySetType policySet, String htmlListElement); @Override CallbackResult onPreVisitPolicy(PolicySetType parent, PolicyType policy); @Override CallbackResult onPostVisitPolicy(PolicySetType parent, PolicyType policy); void policy(PolicyType policy); @Override CallbackResult onPreVisitRule(PolicyType parent, RuleType rule); @Override CallbackResult onPostVisitRule(PolicyType parent, RuleType rule); void rule(RuleType rule); void target(List<AnyOfType> anyOfList); String html(); }
HtmlProcessor extends SimpleCallback { @Override public void onFinishScan(Object root) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(ENTER); } if (rootPolicyObject instanceof PolicySetType) { htmlOut.println("</dl>"); } else { htmlOut.println("</ol>"); } htmlOut.println("<hr>"); htmlOut.println("<h3>Attribute Table:</h3>"); htmlOut.println("<table border=\"3\" style=\"width:100%\">"); htmlOut.println("<tr>"); htmlOut.print("<th>Category</th>"); htmlOut.print("<th>Type</th>"); htmlOut.print("<th>Identifier</th>"); htmlOut.println("</tr>"); for (Map.Entry<String, AttributeIdentifiers> entry : this.attributeIdentifiersMap.entrySet()) { AttributeIdentifiers value = entry.getValue(); htmlOut.println("<tr>"); htmlOut.print("<td><a name=\"" + entry.getKey() + "\"></a>" + value.category + "</td>"); htmlOut.print("<td>" + value.getType() + "</td>"); htmlOut.print("<td>" + value.id + "</td>"); htmlOut.println("</tr>"); } htmlOut.println("</table>"); htmlOut.println("<p></p>"); super.onFinishScan(root); } HtmlProcessor(File policyFile, Object policyObject); Map<String, AttributeIdentifiers> getAttributeIdentifiersMap(); @Override void onFinishScan(Object root); @Override CallbackResult onPreVisitPolicySet(PolicySetType parent, PolicySetType policySet); @Override CallbackResult onPostVisitPolicySet(PolicySetType parent, PolicySetType policySet); void policySet(PolicySetType policySet, String htmlListElement); @Override CallbackResult onPreVisitPolicy(PolicySetType parent, PolicyType policy); @Override CallbackResult onPostVisitPolicy(PolicySetType parent, PolicyType policy); void policy(PolicyType policy); @Override CallbackResult onPreVisitRule(PolicyType parent, RuleType rule); @Override CallbackResult onPostVisitRule(PolicyType parent, RuleType rule); void rule(RuleType rule); void target(List<AnyOfType> anyOfList); String html();  }