001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.transformer.bytecode.statement.tag; 020 021import java.util.Map; 022 023import lucee.transformer.bytecode.Body; 024import lucee.transformer.bytecode.Statement; 025import lucee.transformer.bytecode.statement.HasBody; 026import lucee.transformer.library.tag.TagLibTag; 027import lucee.transformer.library.tag.TagLibTagAttr; 028 029public interface Tag extends Statement,HasBody { 030 031 /** 032 * appendix of the tag 033 * @return appendix 034 */ 035 public abstract String getAppendix(); 036 037 /** 038 * return all Attributes as a map 039 * @return attributes 040 */ 041 public abstract Map<String,Attribute> getAttributes(); 042 043 /** 044 * returns the fullname of the tag 045 * @return fullname 046 */ 047 public abstract String getFullname(); 048 049 /** 050 * return the TagLibTag to this tag 051 * @return taglibtag 052 */ 053 public abstract TagLibTag getTagLibTag(); 054 055 /** 056 * sets the appendix of the tag 057 * @param appendix 058 */ 059 public abstract void setAppendix(String appendix); 060 061 /** 062 * sets the fullanem of the tag 063 * @param fullname 064 */ 065 public abstract void setFullname(String fullname); 066 067 /** 068 * sets the tagLibTag of this tag 069 * @param tagLibTag 070 */ 071 public abstract void setTagLibTag(TagLibTag tagLibTag); 072 073 /** 074 * adds a attribute to the tag 075 * @param attribute 076 */ 077 public abstract void addAttribute(Attribute attribute); 078 079 /** 080 * check if tag has a tag with given name 081 * @param name 082 * @return contains attribute 083 */ 084 public abstract boolean containsAttribute(String name); 085 086 /** 087 * returns the body of the tag 088 * @return body of the tag 089 */ 090 public Body getBody(); 091 092 /** 093 * sets the body of the tag 094 * @param body 095 */ 096 public abstract void setBody(Body body); 097 098 /** 099 * returns a specified attribute from the tag 100 * @param name 101 * @return 102 */ 103 public abstract Attribute getAttribute(String name); 104 105 /** 106 * returns a specified attribute from the tag 107 * @param name 108 * @return 109 */ 110 public abstract Attribute removeAttribute(String name); 111 112 public abstract void addMissingAttribute(TagLibTagAttr attr); 113 114 public abstract TagLibTagAttr[] getMissingAttributes(); 115 116 117 public abstract void setScriptBase(boolean scriptBase); 118 public abstract boolean isScriptBase(); 119 120 //public abstract void setHint(String hint); 121 public abstract void addMetaData(Attribute metadata); 122 //public abstract String getHint(); 123 public abstract Map<String, Attribute> getMetaData(); 124}