Package org.grails.web.pages
Class GroovyPagesUriSupport
- java.lang.Object
-
- org.grails.web.pages.GroovyPagesUriSupport
-
- All Implemented Interfaces:
GroovyPagesUriService
- Direct Known Subclasses:
DefaultGroovyPagesUriService
public class GroovyPagesUriSupport extends java.lang.Object implements GroovyPagesUriService
Methods to establish template names, paths and so on.- Since:
- 1.2
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringEXTENSIONstatic java.lang.StringPATH_TO_VIEWSstatic java.lang.StringRELATIVE_STRINGprotected static java.lang.StringSUFFIX-
Fields inherited from interface grails.web.pages.GroovyPagesUriService
BEAN_ID
-
-
Constructor Summary
Constructors Constructor Description GroovyPagesUriSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()java.lang.StringgetAbsoluteTemplateURI(java.lang.String templateName, boolean includeExtension)Used to resolve template names that are not relative to a controller.java.lang.StringgetAbsoluteViewURI(java.lang.String viewName)Obtains a view URI that is not relative to any given controllerjava.lang.StringgetDeployedAbsoluteViewURI(java.lang.String viewName)Obtains a view URI when deployed within the /WEB-INF/grails-app/views contextjava.lang.StringgetDeployedViewURI(java.lang.String controllerName, java.lang.String viewName)Obtains a view URI when deployed within the /WEB-INF/grails-app/views contextjava.lang.StringgetLogicalControllerName(groovy.lang.GroovyObject controller)java.lang.StringgetNoSuffixViewURI(groovy.lang.GroovyObject controller, java.lang.String viewName)Obtains a view URI of the given controller and view name without the suffixjava.lang.StringgetNoSuffixViewURI(java.lang.String controllerName, java.lang.String viewName)Obtains a view URI of the given controller name and view name without the suffixjava.lang.StringgetTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName)Obtains a template URI for the given controller instance and template namejava.lang.StringgetTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName, boolean includeExtension)java.lang.StringgetTemplateURI(java.lang.String controllerName, java.lang.String templateName)Obtains the URI to a template using the controller name and template namejava.lang.StringgetTemplateURI(java.lang.String controllerName, java.lang.String templateName, boolean includeExtension)Obtains the URI to a template using the controller name and template namejava.lang.StringgetViewURI(groovy.lang.GroovyObject controller, java.lang.String viewName)Obtains a view URI of the given controller and view namejava.lang.StringgetViewURI(java.lang.String controllerName, java.lang.String viewName)Obtains a view URI of the given controller name and view name
-
-
-
Field Detail
-
PATH_TO_VIEWS
public static final java.lang.String PATH_TO_VIEWS
- See Also:
- Constant Field Values
-
EXTENSION
protected static final java.lang.String EXTENSION
- See Also:
- Constant Field Values
-
SUFFIX
protected static final java.lang.String SUFFIX
- See Also:
- Constant Field Values
-
RELATIVE_STRING
public static final java.lang.String RELATIVE_STRING
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTemplateURI
public java.lang.String getTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName)Obtains a template URI for the given controller instance and template name- Specified by:
getTemplateURIin interfaceGroovyPagesUriService- Parameters:
controller- The controller instancetemplateName- The template name- Returns:
- The template URI
-
getTemplateURI
public java.lang.String getTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName, boolean includeExtension)- Specified by:
getTemplateURIin interfaceGroovyPagesUriService
-
clear
public void clear()
- Specified by:
clearin interfaceGroovyPagesUriService
-
getViewURI
public java.lang.String getViewURI(groovy.lang.GroovyObject controller, java.lang.String viewName)Obtains a view URI of the given controller and view name- Parameters:
controller- The name of the controllerviewName- The name of the view- Returns:
- The view URI
-
getNoSuffixViewURI
public java.lang.String getNoSuffixViewURI(groovy.lang.GroovyObject controller, java.lang.String viewName)Obtains a view URI of the given controller and view name without the suffix- Specified by:
getNoSuffixViewURIin interfaceGroovyPagesUriService- Parameters:
controller- The name of the controllerviewName- The name of the view- Returns:
- The view URI
-
getLogicalControllerName
public java.lang.String getLogicalControllerName(groovy.lang.GroovyObject controller)
-
getTemplateURI
public java.lang.String getTemplateURI(java.lang.String controllerName, java.lang.String templateName)Obtains the URI to a template using the controller name and template name- Specified by:
getTemplateURIin interfaceGroovyPagesUriService- Parameters:
controllerName- The controller nametemplateName- The template name- Returns:
- The template URI
-
getTemplateURI
public java.lang.String getTemplateURI(java.lang.String controllerName, java.lang.String templateName, boolean includeExtension)Obtains the URI to a template using the controller name and template name- Specified by:
getTemplateURIin interfaceGroovyPagesUriService- Parameters:
controllerName- The controller nametemplateName- The template nameincludeExtension- The flag to include the template extension- Returns:
- The template URI
-
getAbsoluteTemplateURI
public java.lang.String getAbsoluteTemplateURI(java.lang.String templateName, boolean includeExtension)Used to resolve template names that are not relative to a controller.- Specified by:
getAbsoluteTemplateURIin interfaceGroovyPagesUriService- Parameters:
templateName- The template name normally beginning with /includeExtension- The flag to include the template extension- Returns:
- The template URI
-
getViewURI
public java.lang.String getViewURI(java.lang.String controllerName, java.lang.String viewName)Obtains a view URI of the given controller name and view name- Specified by:
getViewURIin interfaceGroovyPagesUriService- Parameters:
controllerName- The name of the controllerviewName- The name of the view- Returns:
- The view URI
-
getAbsoluteViewURI
public java.lang.String getAbsoluteViewURI(java.lang.String viewName)
Obtains a view URI that is not relative to any given controller- Specified by:
getAbsoluteViewURIin interfaceGroovyPagesUriService- Parameters:
viewName- The name of the view- Returns:
- The view URI
-
getNoSuffixViewURI
public java.lang.String getNoSuffixViewURI(java.lang.String controllerName, java.lang.String viewName)Obtains a view URI of the given controller name and view name without the suffix- Specified by:
getNoSuffixViewURIin interfaceGroovyPagesUriService- Parameters:
controllerName- The name of the controllerviewName- The name of the view- Returns:
- The view URI
-
getDeployedViewURI
public java.lang.String getDeployedViewURI(java.lang.String controllerName, java.lang.String viewName)Obtains a view URI when deployed within the /WEB-INF/grails-app/views context- Specified by:
getDeployedViewURIin interfaceGroovyPagesUriService- Parameters:
controllerName- The name of the controllerviewName- The name of the view- Returns:
- The view URI
-
getDeployedAbsoluteViewURI
public java.lang.String getDeployedAbsoluteViewURI(java.lang.String viewName)
Obtains a view URI when deployed within the /WEB-INF/grails-app/views context- Specified by:
getDeployedAbsoluteViewURIin interfaceGroovyPagesUriService- Parameters:
viewName- The name of the view- Returns:
- The view URI
-
-