org.springframework.extensions.surf.render
Class TagService

java.lang.Object
  extended by org.springframework.extensions.surf.render.TagService
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware

public class TagService
extends Object
implements org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware

Service for running JSP tags

Author:
muzquiano

Constructor Summary
TagService()
           
 
Method Summary
 String execute(javax.servlet.jsp.tagext.Tag tag, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse realResponse)
          Executes the given tag within the context of the given servlet request.
 String execute(javax.servlet.jsp.tagext.Tag tag, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse realResponse, String bodyContentString)
          Executes the given tag within the context of the given servlet request.
 String execute(javax.servlet.jsp.tagext.Tag tag, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse realResponse)
          Executes the given tag within the context of the given servlet context and request.
 String execute(javax.servlet.jsp.tagext.Tag tag, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse realResponse, String bodyContentString)
          Executes the given tag within the context of the given servlet context and request.
 org.springframework.context.ApplicationContext getApplicationContext()
          Gets the application context.
 WebFrameworkServiceRegistry getServiceRegistry()
          Gets the service registry.
 javax.servlet.ServletContext getServletContext()
          Gets the servlet context.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setServiceRegistry(WebFrameworkServiceRegistry webFrameworkServiceRegistry)
          Sets the service registry.
 void setServletContext(javax.servlet.ServletContext servletContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagService

public TagService()
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

getApplicationContext

public org.springframework.context.ApplicationContext getApplicationContext()
Gets the application context.

Returns:
the application context

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Specified by:
setServletContext in interface org.springframework.web.context.ServletContextAware

getServletContext

public javax.servlet.ServletContext getServletContext()
Gets the servlet context.

Returns:
the servlet context

setServiceRegistry

public void setServiceRegistry(WebFrameworkServiceRegistry webFrameworkServiceRegistry)
Sets the service registry.

Parameters:
webFrameworkServiceRegistry - the new service registry

getServiceRegistry

public WebFrameworkServiceRegistry getServiceRegistry()
Gets the service registry.

Returns:
the service registry

execute

public String execute(javax.servlet.jsp.tagext.Tag tag,
                      javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse realResponse)
               throws TagExecutionException
Executes the given tag within the context of the given servlet request.

Parameters:
tag - the tag
request - the request
realResponse - the response
Returns:
the string
Throws:
TagExecutionException

execute

public String execute(javax.servlet.jsp.tagext.Tag tag,
                      javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse realResponse,
                      String bodyContentString)
               throws TagExecutionException
Executes the given tag within the context of the given servlet request. The supplied body content is taken to be the body tag. Body content cannot contain additional tags for processing. This method will not parse the contents of the body and process those tags. Rather, it will insert the contents of the body into the output stream at the appropriate point.

Parameters:
tag - the tag
request - the request
realResponse - the response
bodyContentString - the body content string
Returns:
the string
Throws:
TagExecutionException

execute

public String execute(javax.servlet.jsp.tagext.Tag tag,
                      javax.servlet.ServletContext context,
                      javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse realResponse)
               throws TagExecutionException
Executes the given tag within the context of the given servlet context and request.

Parameters:
tag - the tag
context - the context
request - the request
realResponse - the response
Returns:
the string
Throws:
TagExecutionException

execute

public String execute(javax.servlet.jsp.tagext.Tag tag,
                      javax.servlet.ServletContext context,
                      javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse realResponse,
                      String bodyContentString)
               throws TagExecutionException
Executes the given tag within the context of the given servlet context and request. The supplied body content is taken to be the body tag. Body content cannot contain additional tags for processing. This method will not parse the contents of the body and process those tags. Rather, it will insert the contents of the body into the output stream at the appropriate point. This is the main workhorse method and is a lightweight implementation of a tag runner.

Parameters:
tag - the tag
context - the context
request - the request
realResponse - the response
bodyContentString - the body content string
Returns:
the string
Throws:
TagExecutionException


Copyright © 2009 SpringSource, Inc. All Rights Reserved.