/*
 * Copyright 2013 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Eclipse Public License version 1.0, available at
 * http://www.eclipse.org/legal/epl-v10.html
 */

package org.jboss.forge.addon.ui.metadata;

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

import org.jboss.forge.addon.ui.hints.InputType;
import org.jboss.forge.addon.ui.input.InputComponent;
import org.jboss.forge.addon.ui.util.InputComponents;

/**
 * Allows configuration of {@link InputComponent} injected fields
 * 
 * @author <a href="mailto:ggastald@redhat.com">George Gastaldi</a>
 * 
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.PARAMETER })
public @interface WithAttributes
{
   /**
    * The label of this input
    */
   String label();

   char shortName() default InputComponents.DEFAULT_SHORT_NAME;

   /**
    * Is this input required?
    */
   boolean required() default false;

   /**
    * The required message for this input
    */
   String requiredMessage() default "";

   /**
    * The description for this input
    */
   String description() default "";

   /**
    * Is this input enabled?
    */
   boolean enabled() default true;

   /**
    * The InputType for this {@link InputComponent}
    */
   InputType type() default InputType.DEFAULT;

   /**
    * The default value for this {@link InputComponent}
    */
   String defaultValue() default "";
}
