01: package com.bostechcorp.cbesb.common.util.macro;
02:
03: import java.io.InputStream;
04:
05: public interface IMacroResolver {
06:
07: /**
08: * Load a macro file.
09: * @param macroFile
10: */
11: public void loadMacro(InputStream macroFile);
12:
13: /**
14: * Add a build-in macro or user-defined macro.
15: * @return False if the macro already existed
16: */
17: public boolean addMacro(String name, String value);
18:
19: /**
20: * Analyze the In String and resolve any macro appeared in the string.
21: * @param macroStr the macro which is in the originalStr
22: * @param originalStr the original string.
23: * @return the result with macro(s) resolved
24: */
25: public String resolveMacro(String macroStr, String originalStr);
26:
27: public void clearMacro();
28:
29: }
|