001    package org.tynamo.descriptor.annotation;
002    
003    import org.tynamo.descriptor.TynamoPropertyDescriptor;
004    
005    import java.lang.annotation.ElementType;
006    import java.lang.annotation.Retention;
007    import java.lang.annotation.RetentionPolicy;
008    import java.lang.annotation.Target;
009    
010    @Retention(RetentionPolicy.RUNTIME)
011    @Target({ElementType.FIELD, ElementType.METHOD})
012    @DescriptorAnnotation(PropertyDescriptorAnnotationHandler.class)
013    public @interface PropertyDescriptor
014    {
015    
016            public static final int DEFAULT_index = TynamoPropertyDescriptor.UNDEFINED_INDEX;
017            public static final String DEFAULT_format = "no_format";
018    
019            /**
020             * Specifies if a property should appear on the list page.
021             *
022             * @return
023             */
024            boolean summary() default true;
025    
026            /**
027             * Specifies if a property should appear on both edit and list pages
028             *
029             * @return
030             * @see org.tynamo.descriptor.Descriptor#isHidden()
031             */
032            boolean hidden() default false;
033    
034    
035            boolean readOnly() default false;
036    
037            /**
038             * Specifies if property should appear on search pages
039             *
040             * @return
041             */
042            boolean searchable() default true;
043    
044            /**
045             * Specifies if property can contain html.
046             *
047             * @return
048             */
049            boolean richText() default false;
050    
051            /**
052             * A format pattern string
053             *
054             * @return
055             * @see java.text.SimpleDateFormat
056             * @see java.text.NumberFormat
057             */
058            String format() default "no_format";
059    
060            int index() default TynamoPropertyDescriptor.UNDEFINED_INDEX;
061    }