View Javadoc
1   /*
2    * Copyright (C) 2013 4th Line GmbH, Switzerland
3    *
4    * The contents of this file are subject to the terms of either the GNU
5    * Lesser General Public License Version 2 or later ("LGPL") or the
6    * Common Development and Distribution License Version 1 or later
7    * ("CDDL") (collectively, the "License"). You may not use this file
8    * except in compliance with the License. See LICENSE.txt for more
9    * information.
10   *
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14   */
15  
16  package org.fourthline.cling.binding.annotations;
17  
18  import java.lang.annotation.ElementType;
19  import java.lang.annotation.Retention;
20  import java.lang.annotation.RetentionPolicy;
21  import java.lang.annotation.Target;
22  
23  
24  @Target({ElementType.FIELD})
25  @Retention(RetentionPolicy.RUNTIME)
26  public @interface UpnpStateVariable {
27  
28      String name() default "";
29      String datatype() default "";
30  
31      String defaultValue() default "";
32  
33      // String types
34      String[] allowedValues() default {};
35      Class allowedValuesEnum() default void.class;
36  
37      // Numeric types
38      long allowedValueMinimum() default 0;
39      long allowedValueMaximum() default 0;
40      long allowedValueStep() default 1;
41  
42      // Dynamic
43      Class allowedValueProvider() default void.class;
44      Class allowedValueRangeProvider() default void.class;
45  
46      boolean sendEvents() default true;
47      int eventMaximumRateMilliseconds() default 0;
48      int eventMinimumDelta() default 0;
49  
50  }