Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions api-tld/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>io.neba.neba-api-tld</artifactId>
<packaging>jar</packaging>
<name>NEBA API TLD</name>

<description>
Annotations and annotation processor for generating JSP Tag Library Descriptors (TLD).
</description>

<parent>
<groupId>io.neba</groupId>
<artifactId>io.neba.neba-parent</artifactId>
<version>5.2.4-SNAPSHOT</version>
</parent>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<proc>none</proc>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<!-- Only need javax.annotation.processing for AbstractProcessor -->
</dependencies>
</project>
38 changes: 38 additions & 0 deletions api-tld/src/main/java/io/neba/api/tags/Tag.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Copyright 2013 the original author or authors.

Licensed 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 io.neba.api.tags;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Declares a JSP tag. Used on {@link javax.servlet.jsp.tagext.TagSupport} subclasses
* to generate the tag metadata in the TLD.
*/
@Documented
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface Tag {

/**
* Description of the tag.
*/
String description();
}
43 changes: 43 additions & 0 deletions api-tld/src/main/java/io/neba/api/tags/TagAttribute.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
Copyright 2013 the original author or authors.

Licensed 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 io.neba.api.tags;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Declares a JSP tag attribute. Used on setter methods of tag classes
* to generate the attribute metadata in the TLD.
*/
@Documented
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.METHOD)
public @interface TagAttribute {

/**
* Description of the attribute.
*/
String description();

/**
* Whether the attribute supports runtime expressions (rtexprvalue).
*/
boolean runtimeValueAllowed() default false;
}
52 changes: 52 additions & 0 deletions api-tld/src/main/java/io/neba/api/tags/TagLibrary.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
Copyright 2013 the original author or authors.

Licensed 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 io.neba.api.tags;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Declares a JSP tag library. Used on package-info.java to generate the TLD descriptor.
*/
@Documented
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.PACKAGE)
public @interface TagLibrary {

/**
* The tag library URI (e.g. {@code http://neba.io/1.0}).
*/
String value();

/**
* The output TLD filename (e.g. {@code neba.tld}).
*/
String descriptorFile();

/**
* Short name for the tag library (e.g. {@code neba}).
*/
String shortName();

/**
* Description of the tag library.
*/
String description();
}
Loading