|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.jsp.util.CmsJspLinkMacroResolver
public class CmsJspLinkMacroResolver
Resolves link macros for jsp pages.
The only supported macro is the 'link' macro.
Field Summary | |
---|---|
static char |
KEY_SEPARATOR
Identifier for the link macro separator. |
static java.lang.String |
MACRO_LINK
Identifier for the link macro name. |
static java.lang.String |
MACRO_LINK_STRONG
Identifier for the link macro name. |
static java.lang.String |
MACRO_LINK_WEAK
Identifier for the link macro name. |
static java.lang.String[] |
VALUE_NAME_ARRAY
Identifier for link commands. |
static java.util.List |
VALUE_NAMES
The link commands wrapped in a List. |
Fields inherited from interface org.opencms.util.I_CmsMacroResolver |
---|
MACRO_DELIMITER, MACRO_DELIMITER_OLD, MACRO_END, MACRO_END_OLD, MACRO_START, MACRO_START_OLD |
Constructor Summary | |
---|---|
CmsJspLinkMacroResolver(CmsObject cms,
java.lang.String jspRootPath,
boolean forRfs)
Default constructor. |
Method Summary | |
---|---|
java.util.List |
getLinks()
Returns the links. |
java.lang.String |
getMacroValue(java.lang.String macro)
Resolves a single macro to the macro value, returns null if the macro could not be resolved. |
boolean |
isKeepEmptyMacros()
Returns true if macros that could not be resolved are kept "as is" in the
input String, false if they are replaced by an empty String. |
java.lang.String |
resolveMacros(java.lang.String input)
Resolves the JSP link management macros in the given input. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char KEY_SEPARATOR
public static final java.lang.String MACRO_LINK
public static final java.lang.String MACRO_LINK_STRONG
public static final java.lang.String MACRO_LINK_WEAK
public static final java.lang.String[] VALUE_NAME_ARRAY
public static final java.util.List VALUE_NAMES
Constructor Detail |
---|
public CmsJspLinkMacroResolver(CmsObject cms, java.lang.String jspRootPath, boolean forRfs)
cms
- the cms contextjspRootPath
- the (optional) jsp root path, needed for saving from the editor to resolve relative linksforRfs
- Only if true
the macros get really resolved to valid vfs pathsMethod Detail |
---|
public java.util.List getLinks()
public java.lang.String getMacroValue(java.lang.String macro)
I_CmsMacroResolver
null
if the macro could not be resolved.
getMacroValue
in interface I_CmsMacroResolver
macro
- the macro to resolve
null
if the macro could not be resolvedI_CmsMacroResolver.getMacroValue(java.lang.String)
public boolean isKeepEmptyMacros()
I_CmsMacroResolver
true
if macros that could not be resolved are kept "as is" in the
input String, false
if they are replaced by an empty String.
isKeepEmptyMacros
in interface I_CmsMacroResolver
true
if macros that could not be resolved are kept "as is" in the
input String, false
if they are replaced by an empty StringI_CmsMacroResolver.isKeepEmptyMacros()
public java.lang.String resolveMacros(java.lang.String input)
Calls
once for each macro in the input.
This means "nested" macros are not supported in this implementation, which is fine since
it can't happen in JSP link management anyway.resolveMacros(String)
resolveMacros
in interface I_CmsMacroResolver
input
- the input to resolve the macros in
I_CmsMacroResolver.resolveMacros(java.lang.String)
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |