Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.grails.web.mapping
[Groovy] Class DefaultLinkGenerator

    java.lang.Object
      org.codehaus.groovy.grails.web.mapping.DefaultLinkGenerator

All Implemented Interfaces:
  LinkGenerator, PluginManagerAware

    @groovy.transform.CompileStatic
    class DefaultLinkGenerator
    extends java.lang.Object

A link generating service for applications to use when generating links.

Authors:
  Graeme Rocher

Since:
  2.0

Property Summary
`java.lang.String` | `configuredServerBaseURL`
`java.lang.String` | `contextPath`
`UrlConverter` | `grailsUrlConverter`
`org.grails.datastore.mapping.model.MappingContext` | `mappingContext`
`GrailsPluginManager` | `pluginManager`
`GrailsRequestStateLookupStrategy` | `requestStateLookupStrategy`
`UrlMappingsHolder` | `urlMappingsHolder`

Constructor Summary
`DefaultLinkGenerator(java.lang.String serverBaseURL, java.lang.String contextPath)`
`DefaultLinkGenerator(java.lang.String serverBaseURL)`

Method Summary
`java.lang.String` | `getContextPath()`
`protected java.lang.String` | `getResourceId(java.lang.Object resourceAttribute)`
`java.lang.String` | `getServerBaseURL()`
`protected boolean` | `isAbsolute(java.util.Map attrs)`
`java.lang.String` | `link(java.util.Map attrs, java.lang.String encoding = 'UTF-8')` {@inheritDoc}
`java.lang.String` | `makeServerURL()` Get the declared URL of the server from config, or guess at localhost for non-production.
`java.lang.String` | `resource(java.util.Map attrs)` {@inheritDoc }
`void` | `setPluginManager(GrailsPluginManager pluginManager)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### configuredServerBaseURL

    java.lang.String configuredServerBaseURL

### contextPath

    java.lang.String contextPath

### grailsUrlConverter

    @org.springframework.beans.factory.annotation.Autowired
    UrlConverter grailsUrlConverter

### mappingContext

    @org.springframework.beans.factory.annotation.Autowired(required=false)
    @org.springframework.beans.factory.annotation.Qualifier('grailsDomainClassMappingContext')
    org.grails.datastore.mapping.model.MappingContext mappingContext

### pluginManager

    GrailsPluginManager pluginManager

### requestStateLookupStrategy

    GrailsRequestStateLookupStrategy requestStateLookupStrategy

### urlMappingsHolder

    @org.springframework.beans.factory.annotation.Autowired
    @org.springframework.beans.factory.annotation.Qualifier("grailsUrlMappingsHolder")
    UrlMappingsHolder urlMappingsHolder

Constructor Detail

### DefaultLinkGenerator

    DefaultLinkGenerator(java.lang.String serverBaseURL, java.lang.String contextPath)

### DefaultLinkGenerator

    DefaultLinkGenerator(java.lang.String serverBaseURL)

Method Detail

### getContextPath

    java.lang.String getContextPath()

### getResourceId

    @groovy.transform.CompileStatic(TypeCheckingMode.SKIP)
    protected java.lang.String getResourceId(java.lang.Object resourceAttribute)

### getServerBaseURL

    java.lang.String getServerBaseURL()

### isAbsolute

    protected boolean isAbsolute(java.util.Map attrs)

### link

    java.lang.String link(java.util.Map attrs, java.lang.String encoding = 'UTF-8')

  {@inheritDoc}

### makeServerURL

    java.lang.String makeServerURL()

  Get the declared URL of the server from config, or guess at localhost for non-production.

### resource

    java.lang.String resource(java.util.Map attrs)

  {
  inheritDoc:
    }

### setPluginManager

    void setPluginManager(GrailsPluginManager pluginManager)

Groovy Documentation