org.apache.myfaces.view.facelets.impl
Class TemplateContextImpl

java.lang.Object
  extended by org.apache.myfaces.view.facelets.TemplateContext
      extended by org.apache.myfaces.view.facelets.impl.TemplateContextImpl

public class TemplateContextImpl
extends TemplateContext

Since:
2.0.1
Version:
$Revision: 1470662 $ $Date: 2013-04-22 14:04:45 -0500 (Mon, 22 Apr 2013) $
Author:
Leonardo Uribe (latest modification by $Author: lu4242 $)

Nested Class Summary
static class TemplateContextImpl.InitialPageContext
           
static class TemplateContextImpl.InitialTemplateClient
          This is just a dummy template client that does nothing that is added by default for each template context
 
Constructor Summary
TemplateContextImpl()
           
 
Method Summary
 void addKnownParameters(String key)
           
 boolean containsKnownParameter(String key)
           
 boolean containsParameter(String key)
           
 void extendClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client)
           
 TemplateManager getCompositeComponentClient()
           
 Set<String> getKnownParameters()
          Return a set of the parameters known associated to this template context and/or template.
 javax.el.ValueExpression getParameter(String key)
          Return the param value expression associated to the key passed, preserving the precedence of each template client.
 Map<String,javax.el.ValueExpression> getParameterMap()
           
 boolean includeDefinition(FaceletContext ctx, Facelet owner, UIComponent parent, String name)
          This method will walk through the TemplateClient stack to resolve and apply the definition for the passed name.
 boolean isAllowCacheELExpressions()
           
 boolean isKnownParametersEmpty()
           
 boolean isParameterEmpty()
          Check if no parameters are set.
 TemplateManager popClient(AbstractFaceletContext actx)
          Pop the last added pushed TemplateClient
 TemplateManager popExtendedClient(AbstractFaceletContext actx)
          Pop the last added extended TemplateClient
 void pushClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client)
          Push the passed TemplateClient onto the stack for Definition Resolution
 void setAllowCacheELExpressions(boolean cacheELExpressions)
           
 void setCompositeComponentClient(TemplateManager compositeComponentClient)
          Set the composite component TemplateManager instance, used to resolve cc:insertChildred or cc:insertFacet usages for the current template context
 void setParameter(String key, javax.el.ValueExpression value)
          Associate the param to the latest template client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateContextImpl

public TemplateContextImpl()
Method Detail

popClient

public TemplateManager popClient(AbstractFaceletContext actx)
Description copied from class: TemplateContext
Pop the last added pushed TemplateClient

Specified by:
popClient in class TemplateContext
See Also:
TemplateClient

pushClient

public void pushClient(AbstractFaceletContext actx,
                       AbstractFacelet owner,
                       TemplateClient client)
Description copied from class: TemplateContext
Push the passed TemplateClient onto the stack for Definition Resolution

Specified by:
pushClient in class TemplateContext
See Also:
TemplateClient

popExtendedClient

public TemplateManager popExtendedClient(AbstractFaceletContext actx)
Description copied from class: TemplateContext
Pop the last added extended TemplateClient

Specified by:
popExtendedClient in class TemplateContext

extendClient

public void extendClient(AbstractFaceletContext actx,
                         AbstractFacelet owner,
                         TemplateClient client)
Specified by:
extendClient in class TemplateContext

includeDefinition

public boolean includeDefinition(FaceletContext ctx,
                                 Facelet owner,
                                 UIComponent parent,
                                 String name)
                          throws IOException,
                                 FaceletException,
                                 FacesException,
                                 javax.el.ELException
Description copied from class: TemplateContext
This method will walk through the TemplateClient stack to resolve and apply the definition for the passed name. If it's been resolved and applied, this method will return true.

Specified by:
includeDefinition in class TemplateContext
parent - the UIComponent to apply to
name - name or null of the definition you want to apply
Returns:
true if successfully applied, otherwise false
Throws:
IOException
FaceletException
FacesException
javax.el.ELException

getCompositeComponentClient

public TemplateManager getCompositeComponentClient()
Specified by:
getCompositeComponentClient in class TemplateContext

setCompositeComponentClient

public void setCompositeComponentClient(TemplateManager compositeComponentClient)
Description copied from class: TemplateContext
Set the composite component TemplateManager instance, used to resolve cc:insertChildred or cc:insertFacet usages for the current template context

Specified by:
setCompositeComponentClient in class TemplateContext

getParameter

public javax.el.ValueExpression getParameter(String key)
Description copied from class: TemplateContext
Return the param value expression associated to the key passed, preserving the precedence of each template client.

Specified by:
getParameter in class TemplateContext
Returns:

containsParameter

public boolean containsParameter(String key)
Specified by:
containsParameter in class TemplateContext
Returns:

setParameter

public void setParameter(String key,
                         javax.el.ValueExpression value)
Description copied from class: TemplateContext
Associate the param to the latest template client.

Specified by:
setParameter in class TemplateContext

isParameterEmpty

public boolean isParameterEmpty()
Description copied from class: TemplateContext
Check if no parameters are set.

Specified by:
isParameterEmpty in class TemplateContext
Returns:

getParameterMap

public Map<String,javax.el.ValueExpression> getParameterMap()
Specified by:
getParameterMap in class TemplateContext
Returns:

isKnownParametersEmpty

public boolean isKnownParametersEmpty()
Specified by:
isKnownParametersEmpty in class TemplateContext
Returns:

getKnownParameters

public Set<String> getKnownParameters()
Description copied from class: TemplateContext
Return a set of the parameters known associated to this template context and/or template. This logic is used to detect which EL Expressions can be cached or not.

Specified by:
getKnownParameters in class TemplateContext
Returns:

containsKnownParameter

public boolean containsKnownParameter(String key)
Specified by:
containsKnownParameter in class TemplateContext
Returns:

addKnownParameters

public void addKnownParameters(String key)
Specified by:
addKnownParameters in class TemplateContext

isAllowCacheELExpressions

public boolean isAllowCacheELExpressions()
Specified by:
isAllowCacheELExpressions in class TemplateContext
Returns:

setAllowCacheELExpressions

public void setAllowCacheELExpressions(boolean cacheELExpressions)
Specified by:
setAllowCacheELExpressions in class TemplateContext


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.