Class XLinkProcessor
- java.lang.Object
-
- net.anotheria.anosite.content.variables.XLinkProcessor
-
- All Implemented Interfaces:
VariablesProcessor
- Direct Known Subclasses:
FileLinkProcessor,ImageLinkProcessor
public abstract class XLinkProcessor extends Object implements VariablesProcessor
Basic processor for links to external resources like files or images.- Author:
- lrosenberg
-
-
Constructor Summary
Constructors Constructor Description XLinkProcessor()Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringgetFileName(String variable)Returns the filename corresponding with the variable.protected org.slf4j.LoggergetLog()protected abstract StringgetResourcePath(String contextPath)Returns URL part with context path and mapping to proper servlet.ResourceServletMappingConfiggetResourceServletMappingConfiguration()Stringreplace(String prefix, String variable, String defValue, jakarta.servlet.http.HttpServletRequest req)Replace method.
-
-
-
Field Detail
-
SEPARATOR
protected static final String SEPARATOR
URL separator.- See Also:
- Constant Field Values
-
-
Method Detail
-
getLog
protected org.slf4j.Logger getLog()
-
getResourceServletMappingConfiguration
public ResourceServletMappingConfig getResourceServletMappingConfiguration()
-
replace
public String replace(String prefix, String variable, String defValue, jakarta.servlet.http.HttpServletRequest req)
Description copied from interface:VariablesProcessorReplace method.- Specified by:
replacein interfaceVariablesProcessor- Parameters:
prefix- processor prefixvariable- variable to replacedefValue- default valuereq- request- Returns:
- replaced text
-
getResourcePath
protected abstract String getResourcePath(String contextPath)
Returns URL part with context path and mapping to proper servlet. Path will contains all required parts - for resource reach viaResourceServlet.- Parameters:
contextPath- request context path- Returns:
- string
-
-