Commit 54687deb authored by Guus der Kinderen's avatar Guus der Kinderen

OF-546: Distribute custom tags in a library.

For plugins to be able to use the tags used in the admin console, the tags should be distributed in a library. By making this library a Maven module, plugins can define the library as a dependency.

Note that the admin.tld file is duplicated, but *slightly* modified in the Maven module: the path of the tags is different (META-INF vs WEB-INF).
parent 404a63d9
...@@ -127,6 +127,11 @@ ...@@ -127,6 +127,11 @@
<artifactId>xmppserver</artifactId> <artifactId>xmppserver</artifactId>
<version>${openfire.version}</version> <version>${openfire.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.igniterealtime.openfire</groupId>
<artifactId>webadmintld</artifactId>
<version>${openfire.version}</version>
</dependency>
</dependencies> </dependencies>
</plugin> </plugin>
</plugins> </plugins>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<module>starter</module> <module>starter</module>
<module>plugins</module> <module>plugins</module>
<module>webadmin</module> <module>webadmin</module>
<module>webadmintld</module>
</modules> </modules>
<organization> <organization>
......
package org.jivesoftware.admin; package org.jivesoftware.admin;
import org.bouncycastle.asn1.*;
import org.jivesoftware.util.Log;
import java.io.IOException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/** /**
* Utility functions that are exposed through a taglib. * Utility functions that are exposed through a taglib.
* *
......
...@@ -161,4 +161,29 @@ ...@@ -161,4 +161,29 @@
<function-class>org.jivesoftware.util.CertificateManager</function-class> <function-class>org.jivesoftware.util.CertificateManager</function-class>
<function-signature>java.util.List getClientIdentities(java.security.cert.X509Certificate)</function-signature> <function-signature>java.util.List getClientIdentities(java.security.cert.X509Certificate)</function-signature>
</function> </function>
<function>
<name>getProperty</name>
<function-class>org.jivesoftware.util.JiveGlobals</function-class>
<function-signature>java.lang.String getProperty(java.lang.String,java.lang.String)</function-signature>
</function>
<function>
<name>getIntProperty</name>
<function-class>org.jivesoftware.util.JiveGlobals</function-class>
<function-signature>int getIntProperty(java.lang.String,int)</function-signature>
</function>
<function>
<name>getBooleanProperty</name>
<function-class>org.jivesoftware.util.JiveGlobals</function-class>
<function-signature>boolean getBooleanProperty(java.lang.String,boolean)</function-signature>
</function>
<function>
<name>getLongProperty</name>
<function-class>org.jivesoftware.util.JiveGlobals</function-class>
<function-signature>long getLongProperty(java.lang.String,long)</function-signature>
</function>
<function>
<name>getListProperty</name>
<function-class>org.jivesoftware.util.JiveGlobals</function-class>
<function-signature>java.util.List getListProperty(java.lang.String,java.util.List)</function-signature>
</function>
</taglib> </taglib>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>parent</artifactId>
<groupId>org.igniterealtime.openfire</groupId>
<version>4.2.0-SNAPSHOT</version>
</parent>
<artifactId>webadmintld</artifactId>
<name>Administration Interface Taglibs</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<includes>
<include>org/jivesoftware/admin/*Tag.java</include>
<include>org/jivesoftware/admin/JSTL*.java</include>
</includes>
</configuration>
</plugin>
</plugins>
<sourceDirectory>../src/java</sourceDirectory>
</build>
<dependencies>
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.openfire</groupId>
<artifactId>xmppserver</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>taglib</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<outputDirectory>META-INF/tags/admin</outputDirectory>
<directory>${project.basedir}/../src/web/WEB-INF/tags/admin</directory>
<includes>
<include>*.tag</include>
<include>*.tagx</include>
</includes>
</fileSet>
<fileSet>
<outputDirectory>META-INF/</outputDirectory>
<directory>${project.basedir}/src/main/webapp/META-INF/</directory>
<includes>
<include>*.tld</include>
</includes>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
version="2.1">
<tlib-version>1.2</tlib-version>
<short-name>Tag Library for Openfire</short-name>
<description>Tab Library for Openfire Admin Console</description>
<short-name>admin</short-name>
<uri>admin</uri>
<tag>
<name>tabs</name>
<tag-class>org.jivesoftware.admin.TabsTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>css</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>currentcss</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>role</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>minEdition</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>justlinks</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>subnavbar</name>
<tag-class>org.jivesoftware.admin.SubnavTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>css</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>currentcss</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>role</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>minEdition</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>sidebar</name>
<tag-class>org.jivesoftware.admin.SidebarTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>css</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>currentcss</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>headercss</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>role</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>minEdition</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>subsidebar</name>
<tag-class>org.jivesoftware.admin.SubSidebarTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>css</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>currentcss</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>role</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>minEdition</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>ASN1DER</name>
<tag-class>org.jivesoftware.admin.ASN1DERTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag-file>
<name>contentBox</name>
<path>/META-INF/tags/admin/contentBox.tagx</path>
</tag-file>
<tag-file>
<name>infobox</name>
<path>/META-INF/tags/admin/infoBox.tagx</path>
</tag-file>
<tag-file>
<name>infoBox</name>
<path>/META-INF/tags/admin/infoBox.tagx</path>
</tag-file>
<function>
<name>replaceAll</name>
<function-class>org.jivesoftware.admin.JSTLFunctions</function-class>
<function-signature>java.lang.String replaceAll(java.lang.String, java.lang.String, java.lang.String)</function-signature>
</function>
<function>
<name>split</name>
<function-class>org.jivesoftware.admin.JSTLFunctions</function-class>
<function-signature>java.lang.String[] split(java.lang.String, java.lang.String)</function-signature>
</function>
<function>
<name>serverIdentities</name>
<function-class>org.jivesoftware.util.CertificateManager</function-class>
<function-signature>java.util.List getServerIdentities(java.security.cert.X509Certificate)</function-signature>
</function>
<function>
<name>clientIdentities</name>
<function-class>org.jivesoftware.util.CertificateManager</function-class>
<function-signature>java.util.List getClientIdentities(java.security.cert.X509Certificate)</function-signature>
</function>
<function>
<name>getProperty</name>
<function-class>org.jivesoftware.util.JiveGlobals</function-class>
<function-signature>java.lang.String getProperty(java.lang.String,java.lang.String)</function-signature>
</function>
<function>
<name>getIntProperty</name>
<function-class>org.jivesoftware.util.JiveGlobals</function-class>
<function-signature>int getIntProperty(java.lang.String,int)</function-signature>
</function>
<function>
<name>getBooleanProperty</name>
<function-class>org.jivesoftware.util.JiveGlobals</function-class>
<function-signature>boolean getBooleanProperty(java.lang.String,boolean)</function-signature>
</function>
<function>
<name>getLongProperty</name>
<function-class>org.jivesoftware.util.JiveGlobals</function-class>
<function-signature>long getLongProperty(java.lang.String,long)</function-signature>
</function>
<function>
<name>getListProperty</name>
<function-class>org.jivesoftware.util.JiveGlobals</function-class>
<function-signature>java.util.List getListProperty(java.lang.String,java.util.List)</function-signature>
</function>
</taglib>
<jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:jsp="http://java.sun.com/JSP/Page"
version="2.0">
<jsp:directive.attribute name="title" required="true" />
<div class="jive-contentBoxHeader">
<c:out value="${title}" />
</div>
<div class="jive-contentBox">
<jsp:doBody />
</div>
</jsp:root>
\ No newline at end of file
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
version="2.0">
<jsp:directive.attribute name="type" required="true" />
<div class="jive-${type}">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td class="jive-icon"><img src="images/${type}-16x16.gif" width="16" height="16" border="0" alt=""/></td>
<td class="jive-icon-label">
<jsp:doBody />
</td>
</tr>
</tbody>
</table>
</div>
<br />
</jsp:root>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment