lumis.portal.page
Class PageWebResourceFunctionMapper

Package class diagram package PageWebResourceFunctionMapper
java.lang.Object
  extended by lumis.portal.el.PortalFunctionMapper
      extended by lumis.portal.page.PageWebResourceFunctionMapper
All Implemented Interfaces:
FunctionMapper, IExtendedFunctionMapper
Direct Known Subclasses:
ServiceContainerRequestFunctionMapper

public class PageWebResourceFunctionMapper
extends PortalFunctionMapper

FunctionMapper that resolves the functions in PageWebResource context.

Since:
7.0.0

Field Summary
protected static String BEFORE_WRITE_FUNCTION_NAME
          Define the before write function name.
 
Constructor Summary
PageWebResourceFunctionMapper(PageWebResource pageWebResource, HttpServletRequest request)
          Creates a new instance with the given parameters.
 
Method Summary
 void afterEvaluation()
          Performs any needed operations after the evaluation happens.
 void beforeEvaluation()
          Performs any initialization needed before the evaluation is performed.
 Method resolveFunction(String prefix, String localName)
           
static String resolveURL(String url)
          Resolves the given URL.
The URL will only be resolved against the applied themes if the requested page was previously set within beforeEvaluation().
static String writeIfNotYetWritten(String fragment, String key)
          Returns the given fragment if the given key was not used yet.
 
Methods inherited from class lumis.portal.el.PortalFunctionMapper
localize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEFORE_WRITE_FUNCTION_NAME

protected static final String BEFORE_WRITE_FUNCTION_NAME
Define the before write function name.

Since:
7.0.0
See Also:
Constant Field Values
Constructor Detail

PageWebResourceFunctionMapper

public PageWebResourceFunctionMapper(PageWebResource pageWebResource,
                                     HttpServletRequest request)
Creates a new instance with the given parameters.

Parameters:
pageWebResource - the page web resource.
Since:
7.0.0
Method Detail

beforeEvaluation

public void beforeEvaluation()
Description copied from class: PortalFunctionMapper
Performs any initialization needed before the evaluation is performed.

Overrides:
beforeEvaluation in class PortalFunctionMapper

afterEvaluation

public void afterEvaluation()
Description copied from class: PortalFunctionMapper
Performs any needed operations after the evaluation happens. It should be called in finally.

Overrides:
afterEvaluation in class PortalFunctionMapper

resolveFunction

public Method resolveFunction(String prefix,
                              String localName)
Specified by:
resolveFunction in interface FunctionMapper
Overrides:
resolveFunction in class PortalFunctionMapper

resolveURL

public static String resolveURL(String url)
                         throws PortalException
Resolves the given URL.
The URL will only be resolved against the applied themes if the requested page was previously set within beforeEvaluation().

Parameters:
url - the URL to be resolved.
Returns:
the resolved URL.
Throws:
PortalException
Since:
7.0.0

writeIfNotYetWritten

public static String writeIfNotYetWritten(String fragment,
                                          String key)
                                   throws IOException
Returns the given fragment if the given key was not used yet. Otherwise returns null.

Parameters:
fragment - the fragment to be rendered in before writer.
key - the unique key to use.
Throws:
IOException
Since:
7.0.0


Lumisportal  7.0.0.121130 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.