001: /*
002: * JFolder, Copyright 2001-2006 Gary Steinmetz
003: *
004: * Distributable under LGPL license.
005: * See terms of license at gnu.org.
006: */
007:
008: package org.jfolder.console.macro.v1;
009:
010: //base classes
011: import java.util.HashMap;
012:
013: //project specific classes
014: import org.jfolder.common.UnexpectedSystemException;
015: import org.jfolder.common.tagging.AppraiseConceptTagContext;
016: import org.jfolder.common.tagging.CompoundConceptTagConstraintContext;
017: import org.jfolder.common.tagging.ConceptTagCharacteristic;
018: import org.jfolder.common.tagging.ConceptTagConstraint;
019: import org.jfolder.common.tagging.ConceptTagConstraintHolder;
020: import org.jfolder.common.tagging.ConceptTagConstraintTemplate;
021: import org.jfolder.common.tagging.DynamicConceptTagConstraintContext;
022: import org.jfolder.common.tagging.InitializeConceptTagContext;
023: import org.jfolder.common.tagging.RootConceptTagHolder;
024: import org.jfolder.common.tagging.StaticConceptTagConstraintContext;
025: import org.jfolder.common.tagging.StudioConceptTagInstanceInfoContext;
026: import org.jfolder.common.tagging.StudioConceptTagTypeInfoContext;
027: import org.jfolder.common.web.template.ConsoleTemplateSession;
028: import org.jfolder.common.web.template.PageSetupContext;
029: import org.jfolder.common.web.template.SubmitActionContext;
030: import org.jfolder.console.macro.ConsoleMacro;
031: import org.jfolder.console.macro.ConsoleMacroTag;
032:
033: //other classes
034:
035: public class BroadcastMessageConsoleMacroTag implements ConsoleMacroTag {
036:
037: ////characteristics
038: ////private ConceptTagCharacteristic conceptTagRegistryCtchar = null;
039: //
040: ////pane details
041: //private final static String PANE_CTCON = "pane";
042: //private final static String PANE_TITLE = "Pane";
043: //private final static String PANE_SHORT_DESCRIPTION = "Pane";
044: //
045: ////property details
046: //private final static String PROPERTY_CTCON = "property";
047: //private final static String PROPERTY_TITLE = "Property";
048: //private final static String PROPERTY_SHORT_DESCRIPTION = "Property";
049: //
050: ////name of property details
051: //private final static String PROPERTY_CTCON_NAME_CTCTEMP = "name";
052: //private final static String PROPERTY_CTCON_NAME_TITLE = "Name";
053: //private final static String PROPERTY_CTCON_NAME_SHORT_DESCRIPTION =
054: //"Name";
055: //
056: ////value of property details
057: //private final static String PROPERTY_CTCON_VALUE_CTCTEMP = "value";
058: //private final static String PROPERTY_CTCON_VALUE_TITLE = "Value";
059: //private final static String PROPERTY_CTCON_VALUE_SHORT_DESCRIPTION =
060: // "Value";
061:
062: ///////////////////////////////////
063:
064: public void initialize(InitializeConceptTagContext inIctc) {
065:
066: //
067: ConceptTagConstraintHolder rootCtconh = ConceptTagConstraintHolder
068: .newInstance(inIctc);
069:
070: ////constrain "pane"
071: //ConceptTagConstraint paneCtcon =
072: // ConceptTagConstraint.newInstance(PANE_CTCON, rootCtconh);
073: //paneCtcon.setTitle(PANE_TITLE);
074: //paneCtcon.setShortDescription(PANE_SHORT_DESCRIPTION);
075: ////
076: //DynamicConceptTagConstraintContext paneDctcc =
077: // DynamicConceptTagConstraintContext.newInstance(paneCtcon);
078: ////
079: //paneDctcc.addDefaultValue(UpDownConsoleConfigTag.class);
080: //
081: ////constrain "property"
082: //ConceptTagConstraint propertyCtcon =
083: // ConceptTagConstraint.newInstance(PROPERTY_CTCON, rootCtconh);
084: //propertyCtcon.setTitle(PROPERTY_TITLE);
085: //propertyCtcon.setShortDescription(PROPERTY_SHORT_DESCRIPTION);
086: ////
087: //CompoundConceptTagConstraintContext propertyCctcc =
088: // CompoundConceptTagConstraintContext.newInstance(propertyCtcon);
089: //
090: ////constrain "name" of "property"
091: //ConceptTagConstraintTemplate propertyCtconNameCtctemp =
092: // ConceptTagConstraintTemplate.newInstance(
093: // PROPERTY_CTCON_NAME_CTCTEMP, propertyCctcc);
094: ////
095: //StaticConceptTagConstraintContext propertyCtconNameSctcc =
096: // StaticConceptTagConstraintContext.newInstance(
097: // propertyCtconNameCtctemp);
098: //
099: ////constrain "value" of "property"
100: //ConceptTagConstraintTemplate propertyCtconValueCtctemp =
101: // ConceptTagConstraintTemplate.newInstance(
102: // PROPERTY_CTCON_VALUE_CTCTEMP, propertyCctcc);
103: ////
104: //StaticConceptTagConstraintContext propertyCtconValueSctcc =
105: // StaticConceptTagConstraintContext.newInstance(
106: // propertyCtconValueCtctemp);
107:
108: //
109: inIctc.initialize();
110:
111: //
112: //this.conceptTagRegistryCtchar =
113: // conceptTagRegistryCtcon.getCharacteristic();
114:
115: }
116:
117: //
118: public void appraise(AppraiseConceptTagContext inCtic) {
119: if (inCtic instanceof StudioConceptTagInstanceInfoContext) {
120: StudioConceptTagInstanceInfoContext sctiic = (StudioConceptTagInstanceInfoContext) inCtic;
121: sctiic.setInstanceTitle("Broadcast Message");
122: sctiic.setInstanceDescription("Broadcast Message");
123: } else if (inCtic instanceof StudioConceptTagTypeInfoContext) {
124: StudioConceptTagTypeInfoContext scttic = (StudioConceptTagTypeInfoContext) inCtic;
125: scttic.setTypeTitle("Broadcast Message");
126: scttic.setTypeDescription("Broadcast Message");
127: }
128: }
129:
130: //
131: public void generateMacroCommands(PageSetupContext inPsc,
132: ConsoleTemplateSession inCts, RootConceptTagHolder inRcth,
133: HashMap inVars, String inFromHandle,
134: String inAliasFromHandle, String inSourcePage,
135: String inDestinationPage) {
136: //
137: throw UnexpectedSystemException.notImplemented();
138: }
139: }
|