001/*
002 * Copyright (c) 2004-2010, Kohsuke Kawaguchi
003 * All rights reserved.
004 *
005 * Redistribution and use in source and binary forms, with or without modification, are permitted provided
006 * that the following conditions are met:
007 *
008 *     * Redistributions of source code must retain the above copyright notice, this list of
009 *       conditions and the following disclaimer.
010 *     * Redistributions in binary form must reproduce the above copyright notice, this list of
011 *       conditions and the following disclaimer in the documentation and/or other materials
012 *       provided with the distribution.
013 *
014 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
015 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
016 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
017 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
018 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
019 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
020 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
021 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
022 */
023
024package org.kohsuke.stapler.jelly;
025
026import org.apache.commons.jelly.TagSupport;
027import org.apache.commons.jelly.XMLOutput;
028import org.jvnet.maven.jellydoc.annotation.Required;
029
030/**
031 * Documentation for an attribute of a Jelly tag file.
032 *
033 * <p>
034 * This tag should be placed right inside {@code <st:documentation>}
035 * to describe attributes of a tag. The body would describe
036 * the meaning of an attribute in a natural language.
037 * The description text can also use
038 * <a href="http://textile.thresholdstate.com/">Textile markup</a>
039 *
040 * @author Kohsuke Kawaguchi
041 */
042public class AttributeTag extends TagSupport {
043    public void doTag(XMLOutput output) {
044        // noop
045    }
046
047    /**
048     * Name of the attribute.
049     */
050    @Required
051    public void setName(String v) {}
052
053    /**
054     * If the attribute is required, specify use="required".
055     * (This is modeled after XML Schema attribute declaration.)
056     *
057     * <p>
058     * By default, use="optional" is assumed.
059     */
060    public void setUse(String v) {}
061
062    /**
063     * If it makes sense, describe the Java type that the attribute
064     * expects as values.
065     */
066    public void setType(String v) {}
067
068    /**
069     * If the attribute is deprecated, set to true.
070     * Use of the deprecated attribute will cause a warning.
071     */
072    public void setDeprecated(boolean v) {}
073    
074    /**
075     * Used to track when the attribute was added to the API surface.
076     * @since 1.247
077     */
078    public void setSince(String v) {}
079}
080