001 package railo.runtime.ext.tag; 002 003 004 public interface TagMetaData { 005 006 007 /** 008 * Body is not allowed for this tag 009 */ 010 public int BODY_CONTENT_EMPTY=0; 011 012 /** 013 * tag can have a body, but it is not required 014 */ 015 public int BODY_CONTENT_FREE=1; 016 017 /** 018 * body is required for this tag 019 */ 020 public int BODY_CONTENT_MUST=2; 021 022 /** 023 * tag has a fix defined group of attributes, only this attributes are allowed 024 */ 025 public int ATTRIBUTE_TYPE_FIX=4; 026 027 /** 028 * there is no restriction or rules for attributes, tag can have as many as whished 029 */ 030 public int ATTRIBUTE_TYPE_DYNAMIC=8; 031 032 /** 033 * tag has a fix set of attributes, but is also free in use additional tags 034 */ 035 public int ATTRIBUTE_TYPE_MIXED=16; 036 037 038 /** 039 * type of the body content 040 * @return TagMetaData.BODY_CONTENT_EMPTY,TagMetaData.BODY_CONTENT_FREE,TagMetaData.BODY_CONTENT_MUST 041 */ 042 public int getBodyContent(); 043 044 /** 045 * attribute type 046 * @return TagMetaData.ATTRIBUTE_TYPE_FIX,TagMetaData.ATTRIBUTE_TYPE_DYNAMIC,TagMetaData.ATTRIBUTE_TYPE_MIXED 047 */ 048 public int getAttributeType(); 049 050 /** 051 * minimal count of attributes needed for tag 052 * @return minimal count of attributes 053 */ 054 public int getAttributeMin(); 055 /** 056 * maximum count of attributes needed for tag 057 * @return maximum count of attributes or -1 for infinity attributes 058 */ 059 public int getAttributeMax(); 060 061 062 /** 063 * is the body of the tag parsed like inside a cfoutput 064 * @return parsed or not 065 */ 066 public boolean isBodyRuntimeExpressionValue(); 067 068 /** 069 * A description of the tag. 070 * @return description of the tag 071 */ 072 public String getDescription(); 073 074 /** 075 * fix attributes of the tag 076 */ 077 public TagMetaDataAttr[] getAttributes(); 078 079 /** 080 * has the tag a body 081 * @return has a body 082 */ 083 public boolean hasBody(); 084 085 /** 086 * can the tag handle exceptons 087 * @return can handle exceptions 088 */ 089 public boolean handleException(); 090 091 /** 092 * has the tag a appendix 093 * @return has appendix 094 */ 095 public boolean hasAppendix(); 096 097 098 }