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