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 HTML5.forms#the-keygen-element <keygen>} 019 * element. 020 * 021 * <ul class='seealso'> 022 * <li class='link'>{@doc juneau-dto.HTML5} 023 * </ul> 024 */ 025@Bean(typeName="keygen") 026public class Keygen extends HtmlElementVoid { 027 028 /** 029 * {@doc HTML5.forms#attr-fe-autofocus autofocus} attribute. 030 * 031 * <p> 032 * Automatically focus the form control when the page is loaded. 033 * 034 * @param autofocus 035 * The new value for this attribute. 036 * Typically a {@link Boolean} or {@link String}. 037 * @return This object (for method chaining). 038 */ 039 public final Keygen autofocus(Object autofocus) { 040 attr("autofocus", autofocus); 041 return this; 042 } 043 044 /** 045 * {@doc HTML5.forms#attr-keygen-challenge challenge} attribute. 046 * 047 * <p> 048 * String to package with the generated and signed public key. 049 * 050 * @param challenge The new value for this attribute. 051 * @return This object (for method chaining). 052 */ 053 public final Keygen challenge(String challenge) { 054 attr("challenge", challenge); 055 return this; 056 } 057 058 /** 059 * {@doc HTML5.forms#attr-fe-disabled disabled} attribute. 060 * 061 * <p> 062 * Whether the form control is disabled. 063 * 064 * @param disabled 065 * The new value for this attribute. 066 * Typically a {@link Boolean} or {@link String}. 067 * @return This object (for method chaining). 068 */ 069 public final Keygen disabled(Object disabled) { 070 attr("disabled", deminimize(disabled, "disabled")); 071 return this; 072 } 073 074 /** 075 * {@doc HTML5.forms#attr-fae-form form} attribute. 076 * 077 * <p> 078 * Associates the control with a form element. 079 * 080 * @param form The new value for this attribute. 081 * @return This object (for method chaining). 082 */ 083 public final Keygen form(String form) { 084 attr("form", form); 085 return this; 086 } 087 088 /** 089 * {@doc HTML5.forms#attr-keygen-keytype keytype} attribute. 090 * 091 * <p> 092 * The type of cryptographic key to generate. 093 * 094 * @param keytype The new value for this attribute. 095 * @return This object (for method chaining). 096 */ 097 public final Keygen keytype(String keytype) { 098 attr("keytype", keytype); 099 return this; 100 } 101 102 /** 103 * {@doc HTML5.forms#attr-fe-name name} attribute. 104 * 105 * <p> 106 * Name of form control to use for form submission and in the form.elements API. 107 * 108 * @param name The new value for this attribute. 109 * @return This object (for method chaining). 110 */ 111 public final Keygen name(String name) { 112 attr("name", name); 113 return this; 114 } 115 116 117 //----------------------------------------------------------------------------------------------------------------- 118 // Overridden methods 119 //----------------------------------------------------------------------------------------------------------------- 120 121 @Override /* HtmlElement */ 122 public final Keygen _class(String _class) { 123 super._class(_class); 124 return this; 125 } 126 127 @Override /* HtmlElement */ 128 public final Keygen id(String id) { 129 super.id(id); 130 return this; 131 } 132 133 @Override /* HtmlElement */ 134 public final Keygen style(String style) { 135 super.style(style); 136 return this; 137 } 138}