Groovy Documentation

org.codehaus.groovy.grails.web.mapping
[Java] Class CachingLinkGenerator

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

@SuppressWarnings("rawtypes")
public class CachingLinkGenerator
extends DefaultLinkGenerator

A link generator that uses a LRU cache to cache generated links.

Authors:
Graeme Rocher
Since:
2.0


Field Summary
static java.lang.String EMPTY_MAP_STRING

static java.lang.String LINK_PREFIX

static java.lang.String RESOURCE_PREFIX

static java.lang.String USED_ATTRIBUTES_SUFFIX

 
Constructor Summary
CachingLinkGenerator(java.lang.String serverBaseURL, java.lang.String contextPath)

CachingLinkGenerator(java.lang.String serverBaseURL)

CachingLinkGenerator(java.lang.String serverBaseURL, java.util.Map linkCache)

CachingLinkGenerator(java.lang.String serverBaseURL, java.lang.String contextPath, java.util.Map linkCache)

 
Method Summary
void clearCache()

java.lang.String link(java.util.Map attrs, java.lang.String encoding)

protected java.lang.String makeKey(java.lang.String prefix, java.util.Map attrs)

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

 
Methods inherited from class DefaultLinkGenerator
getContextPath, getServerBaseURL, isAbsolute, link, makeServerURL, resource, setPluginManager
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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()
 

Field Detail

EMPTY_MAP_STRING

public static final java.lang.String EMPTY_MAP_STRING


LINK_PREFIX

public static final java.lang.String LINK_PREFIX


RESOURCE_PREFIX

public static final java.lang.String RESOURCE_PREFIX


USED_ATTRIBUTES_SUFFIX

public static final java.lang.String USED_ATTRIBUTES_SUFFIX


 
Constructor Detail

CachingLinkGenerator

public CachingLinkGenerator(java.lang.String serverBaseURL, java.lang.String contextPath)


CachingLinkGenerator

public CachingLinkGenerator(java.lang.String serverBaseURL)


CachingLinkGenerator

public CachingLinkGenerator(java.lang.String serverBaseURL, java.util.Map linkCache)


CachingLinkGenerator

public CachingLinkGenerator(java.lang.String serverBaseURL, java.lang.String contextPath, java.util.Map linkCache)


 
Method Detail

clearCache

public void clearCache()


link

@Override
public java.lang.String link(java.util.Map attrs, java.lang.String encoding)


makeKey

protected java.lang.String makeKey(java.lang.String prefix, java.util.Map attrs)


resource

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


 

Groovy Documentation