public class CachingUserFormat extends Object implements UserFormat
Note: results of both format methods are cached in the same cache. But for example format("1", "2") and format("1", "2", null) are still considered as different invocations because there is no guarantee they will return the same results.
VIEW_TEMPLATE
Constructor and Description |
---|
CachingUserFormat(UserFormat delegate) |
Modifier and Type | Method and Description |
---|---|
String |
format(String userkey,
String id)
Renders the formatted user for a given section on the screen.
|
String |
format(String userkey,
String id,
Map<String,Object> params)
Renders the formatted user for a given section on the screen.
|
public CachingUserFormat(UserFormat delegate)
public String format(String userkey, String id)
UserFormat
Extra context can be passed to the renderer via the id attribute. Ideally an implementation might include this id in the rendered output such that it can be used for test assertions.
The result should always be ready to display in an HTML response i.e. it should be HTML encoded if necessary.
format
in interface UserFormat
userkey
- the user's userkey to format.id
- A value providing extra context to the rendering process.public String format(String userkey, String id, Map<String,Object> params)
UserFormat
Extra context can be passed to the renderer via the params attribute.
The result should always be ready to display in an HTML response i.e. it should be HTML encoded if necessary.
format
in interface UserFormat
userkey
- the user's userkey to format.id
- A value providing extra context to the rendering process.params
- Additional context to pass to the rendererCopyright © 2002-2019 Atlassian. All Rights Reserved.