001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.dto.html5; 014 015import org.apache.juneau.annotation.*; 016 017/** 018 * DTO for an HTML {@doc ExtHTML5.embedded-content-0#the-param-element <param>} 019 * element. 020 * 021 * <ul class='seealso'> 022 * <li class='link'>{@doc DtoHtml5} 023 * </ul> 024 */ 025@Bean(typeName="param") 026public class Param extends HtmlElementVoid { 027 028 /** 029 * Creates an empty {@link Param} element. 030 */ 031 public Param() {} 032 033 /** 034 * Creates a {@link Param} element with the specified {@link Param#name(String)} and {@link Param#value(Object)} 035 * attributes. 036 * 037 * @param name The {@link Param#name(String)} attribute. 038 * @param value The {@link Param#value(Object)} attribute. 039 */ 040 public Param(String name, Object value) { 041 name(name).value(value); 042 } 043 044 /** 045 * {@doc ExtHTML5.embedded-content-0#attr-param-name name} attribute. 046 * 047 * <p> 048 * Name of parameter. 049 * 050 * @param name The new value for this attribute. 051 * @return This object (for method chaining). 052 */ 053 public final Param name(String name) { 054 attr("name", name); 055 return this; 056 } 057 058 /** 059 * {@doc ExtHTML5.embedded-content-0#attr-param-value value} 060 * attribute. 061 * 062 * <p> 063 * Value of parameter. 064 * 065 * @param value 066 * The new value for this attribute. 067 * Typically a {@link Number} or {@link String}. 068 * @return This object (for method chaining). 069 */ 070 public final Param value(Object value) { 071 attr("value", value); 072 return this; 073 } 074 075 076 //----------------------------------------------------------------------------------------------------------------- 077 // Overridden methods 078 //----------------------------------------------------------------------------------------------------------------- 079 080 @Override /* HtmlElement */ 081 public final Param _class(String _class) { 082 super._class(_class); 083 return this; 084 } 085 086 @Override /* HtmlElement */ 087 public final Param id(String id) { 088 super.id(id); 089 return this; 090 } 091}