org.apache.struts2.components

## Class ComponentUrlProvider

- java.lang.Object
- - org.apache.struts2.components.ComponentUrlProvider

- All Implemented Interfaces:
    UrlProvider

      public class ComponentUrlProvider
      extends Object
      implements UrlProvider

  Default implementation of UrlProvider

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `action`
    `protected String` | `anchor`
    `protected Component` | `component`
    `protected boolean` | `encode`
    `protected boolean` | `escapeAmp`
    `protected ExtraParameterProvider` | `extraParameterProvider`
    `protected boolean` | `forceAddSchemeHostAndPort`
    `protected javax.servlet.http.HttpServletRequest` | `httpServletRequest`
    `protected javax.servlet.http.HttpServletResponse` | `httpServletResponse`
    `protected boolean` | `includeContext`
    `protected String` | `includeParams`
    `protected String` | `method`
    `protected String` | `namespace`
    `protected String` | `portletMode`
    `protected String` | `portletUrlType`
    `protected String` | `scheme`
    `protected String` | `urlIncludeParams`
    `protected UrlRenderer` | `urlRenderer`
    `protected String` | `value`
    `protected String` | `windowState`

    - ### Fields inherited from interface org.apache.struts2.components.UrlProvider

      `ALL, GET, NONE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ComponentUrlProvider(Component component, Map parameters)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `determineActionURL(String action, String namespace, String method, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort, boolean escapeAmp)`
    `String` | `determineNamespace(String namespace, ValueStack stack, javax.servlet.http.HttpServletRequest req)`
    `String` | `findString(String expr)`
    `String` | `getAction()`
    `String` | `getAnchor()`
    `ExtraParameterProvider` | `getExtraParameterProvider()`
    `javax.servlet.http.HttpServletRequest` | `getHttpServletRequest()`
    `javax.servlet.http.HttpServletResponse` | `getHttpServletResponse()`
    `String` | `getIncludeParams()`
    `String` | `getMethod()`
    `String` | `getNamespace()`
    `Map` | `getParameters()`
    `String` | `getPortletMode()`
    `String` | `getPortletUrlType()`
    `String` | `getScheme()`
    `ValueStack` | `getStack()`
    `String` | `getUrlIncludeParams()`
    `UrlRenderer` | `getUrlRenderer()`
    `String` | `getValue()`
    `String` | `getVar()`
    `String` | `getWindowState()`
    `boolean` | `isEncode()`
    `boolean` | `isEscapeAmp()`
    `boolean` | `isForceAddSchemeHostAndPort()`
    `boolean` | `isIncludeContext()`
    `boolean` | `isPutInContext()`
    `void` | `putInContext(String result)`
    `void` | `setAction(String action)`
    `void` | `setAnchor(String anchor)`
    `void` | `setEncode(boolean encode)`
    `void` | `setEscapeAmp(boolean escapeAmp)`
    `void` | `setExtraParameterProvider(ExtraParameterProvider extraParameterProvider)`
    `void` | `setForceAddSchemeHostAndPort(boolean forceAddSchemeHostAndPort)`
    `void` | `setHttpServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest)`
    `void` | `setHttpServletResponse(javax.servlet.http.HttpServletResponse httpServletResponse)`
    `void` | `setIncludeContext(boolean includeContext)`
    `void` | `setIncludeParams(String includeParams)`
    `void` | `setMethod(String method)`
    `void` | `setNamespace(String namespace)`
    `void` | `setPortletMode(String portletMode)`
    `void` | `setPortletUrlType(String portletUrlType)`
    `void` | `setScheme(String scheme)`
    `void` | `setUrlIncludeParams(String urlIncludeParams)`
    `void` | `setUrlRenderer(UrlRenderer urlRenderer)`
    `void` | `setValue(String value)`
    `void` | `setWindowState(String windowState)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### httpServletRequest

          protected javax.servlet.http.HttpServletRequest httpServletRequest

    - #### httpServletResponse

          protected javax.servlet.http.HttpServletResponse httpServletResponse

    - #### includeParams

          protected String includeParams

    - #### scheme

          protected String scheme

    - #### value

          protected String value

    - #### action

          protected String action

    - #### namespace

          protected String namespace

    - #### method

          protected String method

    - #### encode

          protected boolean encode

    - #### includeContext

          protected boolean includeContext

    - #### escapeAmp

          protected boolean escapeAmp

    - #### portletMode

          protected String portletMode

    - #### windowState

          protected String windowState

    - #### portletUrlType

          protected String portletUrlType

    - #### anchor

          protected String anchor

    - #### forceAddSchemeHostAndPort

          protected boolean forceAddSchemeHostAndPort

    - #### urlIncludeParams

          protected String urlIncludeParams

    - #### extraParameterProvider

          protected ExtraParameterProvider extraParameterProvider

    - #### urlRenderer

          protected UrlRenderer urlRenderer

    - #### component

          protected Component component

  - ### Constructor Detail

    - #### ComponentUrlProvider

          public ComponentUrlProvider(Component component,
                              Map parameters)

      Parameters:
        `component` - The component used to delegate some calls to
        `parameters` - parameters passed from <param...>

  - ### Method Detail

    - #### determineActionURL

          public String determineActionURL(String action,
                                  String namespace,
                                  String method,
                                  javax.servlet.http.HttpServletRequest req,
                                  javax.servlet.http.HttpServletResponse res,
                                  Map parameters,
                                  String scheme,
                                  boolean includeContext,
                                  boolean encodeResult,
                                  boolean forceAddSchemeHostAndPort,
                                  boolean escapeAmp)

      Specified by:
        `determineActionURL` in interface `UrlProvider`

    - #### determineNamespace

          public String determineNamespace(String namespace,
                                  ValueStack stack,
                                  javax.servlet.http.HttpServletRequest req)

      Specified by:
        `determineNamespace` in interface `UrlProvider`

    - #### findString

          public String findString(String expr)

      Specified by:
        `findString` in interface `UrlProvider`

    - #### getParameters

          public Map getParameters()

      Specified by:
        `getParameters` in interface `UrlProvider`

    - #### getHttpServletRequest

          public javax.servlet.http.HttpServletRequest getHttpServletRequest()

      Specified by:
        `getHttpServletRequest` in interface `UrlProvider`

    - #### setHttpServletRequest

          public void setHttpServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest)

      Specified by:
        `setHttpServletRequest` in interface `UrlProvider`

    - #### getHttpServletResponse

          public javax.servlet.http.HttpServletResponse getHttpServletResponse()

      Specified by:
        `getHttpServletResponse` in interface `UrlProvider`

    - #### setHttpServletResponse

          public void setHttpServletResponse(javax.servlet.http.HttpServletResponse httpServletResponse)

      Specified by:
        `setHttpServletResponse` in interface `UrlProvider`

    - #### getIncludeParams

          public String getIncludeParams()

      Specified by:
        `getIncludeParams` in interface `UrlProvider`

    - #### setIncludeParams

          public void setIncludeParams(String includeParams)

      Specified by:
        `setIncludeParams` in interface `UrlProvider`

    - #### getScheme

          public String getScheme()

      Specified by:
        `getScheme` in interface `UrlProvider`

    - #### setScheme

          public void setScheme(String scheme)

      Specified by:
        `setScheme` in interface `UrlProvider`

    - #### isPutInContext

          public boolean isPutInContext()

      Specified by:
        `isPutInContext` in interface `UrlProvider`

    - #### getVar

          public String getVar()

      Specified by:
        `getVar` in interface `UrlProvider`

    - #### getValue

          public String getValue()

      Specified by:
        `getValue` in interface `UrlProvider`

    - #### setValue

          public void setValue(String value)

      Specified by:
        `setValue` in interface `UrlProvider`

    - #### getAction

          public String getAction()

      Specified by:
        `getAction` in interface `UrlProvider`

    - #### setAction

          public void setAction(String action)

      Specified by:
        `setAction` in interface `UrlProvider`

    - #### getNamespace

          public String getNamespace()

      Specified by:
        `getNamespace` in interface `UrlProvider`

    - #### setNamespace

          public void setNamespace(String namespace)

      Specified by:
        `setNamespace` in interface `UrlProvider`

    - #### getMethod

          public String getMethod()

      Specified by:
        `getMethod` in interface `UrlProvider`

    - #### setMethod

          public void setMethod(String method)

      Specified by:
        `setMethod` in interface `UrlProvider`

    - #### isEncode

          public boolean isEncode()

      Specified by:
        `isEncode` in interface `UrlProvider`

    - #### setEncode

          public void setEncode(boolean encode)

      Specified by:
        `setEncode` in interface `UrlProvider`

    - #### isIncludeContext

          public boolean isIncludeContext()

      Specified by:
        `isIncludeContext` in interface `UrlProvider`

    - #### setIncludeContext

          public void setIncludeContext(boolean includeContext)

      Specified by:
        `setIncludeContext` in interface `UrlProvider`

    - #### isEscapeAmp

          public boolean isEscapeAmp()

      Specified by:
        `isEscapeAmp` in interface `UrlProvider`

    - #### setEscapeAmp

          public void setEscapeAmp(boolean escapeAmp)

      Specified by:
        `setEscapeAmp` in interface `UrlProvider`

    - #### getPortletMode

          public String getPortletMode()

      Specified by:
        `getPortletMode` in interface `UrlProvider`

    - #### setPortletMode

          public void setPortletMode(String portletMode)

      Specified by:
        `setPortletMode` in interface `UrlProvider`

    - #### getWindowState

          public String getWindowState()

      Specified by:
        `getWindowState` in interface `UrlProvider`

    - #### setWindowState

          public void setWindowState(String windowState)

      Specified by:
        `setWindowState` in interface `UrlProvider`

    - #### getPortletUrlType

          public String getPortletUrlType()

      Specified by:
        `getPortletUrlType` in interface `UrlProvider`

    - #### getStack

          public ValueStack getStack()

      Specified by:
        `getStack` in interface `UrlProvider`

    - #### setPortletUrlType

          public void setPortletUrlType(String portletUrlType)

      Specified by:
        `setPortletUrlType` in interface `UrlProvider`

    - #### getAnchor

          public String getAnchor()

      Specified by:
        `getAnchor` in interface `UrlProvider`

    - #### setAnchor

          public void setAnchor(String anchor)

      Specified by:
        `setAnchor` in interface `UrlProvider`

    - #### isForceAddSchemeHostAndPort

          public boolean isForceAddSchemeHostAndPort()

      Specified by:
        `isForceAddSchemeHostAndPort` in interface `UrlProvider`

    - #### setForceAddSchemeHostAndPort

          public void setForceAddSchemeHostAndPort(boolean forceAddSchemeHostAndPort)

      Specified by:
        `setForceAddSchemeHostAndPort` in interface `UrlProvider`

    - #### putInContext

          public void putInContext(String result)

      Specified by:
        `putInContext` in interface `UrlProvider`

    - #### getUrlIncludeParams

          public String getUrlIncludeParams()

      Specified by:
        `getUrlIncludeParams` in interface `UrlProvider`

    - #### setUrlIncludeParams

          public void setUrlIncludeParams(String urlIncludeParams)

      Specified by:
        `setUrlIncludeParams` in interface `UrlProvider`

    - #### getExtraParameterProvider

          public ExtraParameterProvider getExtraParameterProvider()

      Specified by:
        `getExtraParameterProvider` in interface `UrlProvider`

    - #### setExtraParameterProvider

          public void setExtraParameterProvider(ExtraParameterProvider extraParameterProvider)

      Specified by:
        `setExtraParameterProvider` in interface `UrlProvider`

    - #### getUrlRenderer

          public UrlRenderer getUrlRenderer()

    - #### setUrlRenderer

          public void setUrlRenderer(UrlRenderer urlRenderer)

      Specified by:
        `setUrlRenderer` in interface `UrlProvider`

Copyright © 2000–2021 Apache Software Foundation. All rights reserved.