001: package org.gui4j.core;
002:
003: import java.util.Map;
004: import java.util.Set;
005:
006: import org.dom4j.LElement;
007:
008: /**
009: * Contains the Gui4jComponent instances for a given resource file resolved for a given
010: * controller class type
011: */
012: public interface Gui4jComponentContainer {
013: /**
014: * @param e
015: * @return Gui4QualifiedComponent the gui4jComponent represented by the element
016: */
017: public Gui4jQualifiedComponent extractGui4jComponent(LElement e);
018:
019: /**
020: * inserts additional attributes into the element correspondingly to defined styles
021: * @param e
022: */
023: public void autoExtend(LElement e);
024:
025: /**
026: * @param e
027: * @param field
028: * @return the attribute value of the field <code>field</code> where occuring
029: * macros are substituted by their definitions
030: */
031: public String getAttrValue(LElement e, String field);
032:
033: /**
034: * @param e
035: * @param field
036: * @param dflt
037: * @return the attribute value of the field <code>field</code> where occuring
038: * macros are substituted by their definitions
039: */
040: public boolean getBooleanAttrValue(LElement e, String field,
041: boolean dflt);
042:
043: /**
044: * @param e
045: * @param field
046: * @return the attribute value of the field <code>field</code> where occuring
047: * macros are substituted by their definitions (macros my also occur inside a string)
048: */
049: public String getAttrValueReplaceAll(LElement e, String field);
050:
051: /**
052: * @param field
053: * @return the attribute value of <code>field</code> of the
054: * topmost element of the resource.
055: */
056: String getToplevelAttrValue(String field);
057:
058: /**
059: * Throws an exception if the corresponding component is not defined
060: * @param id
061: * @return Gui4jQualifiedComponent
062: */
063: public Gui4jQualifiedComponent getGui4jQualifiedComponent(String id);
064:
065: /**
066: * @param id
067: * @return true if a component with the given id is defined, otherwise false
068: */
069: public boolean isDefined(String id);
070:
071: /**
072: * @return the controller class type used for this container
073: */
074: public Class getGui4jControllerClass();
075:
076: /**
077: * @param aliasName
078: * @return the class instance for a given alias name
079: */
080: public Class getClassForAliasName(String aliasName);
081:
082: public Gui4jInternal getGui4j();
083:
084: /**
085: * @return the name of the resource definition file
086: */
087: public String getConfigurationName();
088:
089: /**
090: * Liefert die Menge der zu setzenden Parameter beim Inlcudes des Containers
091: * @return Set(String)
092: */
093: Set getParamIds();
094:
095: /**
096: * Liefert die Menge der Ids zurück welche durch Parameterinstanziierung
097: * benötigt werden
098: * @return Set
099: */
100: Set getMappedIds();
101:
102: /**
103: * Method getParamInstantiation.
104: * @return Map(Gui4jQualifiedComponent -> Gui4jQualifiedComponent)
105: */
106: Map getParamInstantiation();
107:
108: // public List getGui4jComponentContainerIncludePath(Gui4jComponentContainer gui4jComponentContainer);
109:
110: Gui4jCall getTitleCall();
111:
112: Gui4jCall getWindowNameCall();
113:
114: }
|