public class CaptchaImageResource extends DynamicImageResource
AbstractResource.ResourceResponse, AbstractResource.WriteCallbackIResource.AttributesINTERNAL_HEADERS| Constructor and Description |
|---|
CaptchaImageResource()
Construct.
|
CaptchaImageResource(IModel<String> challengeId)
Construct.
|
CaptchaImageResource(IModel<String> challengeId,
int fontSize,
int margin)
Construct.
|
CaptchaImageResource(String challengeId)
Construct.
|
CaptchaImageResource(String challengeId,
int fontSize,
int margin)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getChallengeId()
Gets the id for the challenge.
|
IModel<String> |
getChallengeIdModel()
Gets the id for the challenge
|
protected byte[] |
getImageData(IResource.Attributes attributes) |
void |
invalidate()
Causes the image to be redrawn the next time its requested.
|
protected Random |
newRandomNumberGenerator() |
protected byte[] |
render()
Renders this image
|
configureResponse, getFormat, newResourceResponse, setFormat, setLastModifiedTime, toImageDataconfigureCache, getCachingStrategy, respond, setResponseHeaderspublic CaptchaImageResource()
public CaptchaImageResource(String challengeId)
challengeId - The id of the challengepublic CaptchaImageResource(IModel<String> challengeId)
challengeId - The id of the challengepublic CaptchaImageResource(IModel<String> challengeId, int fontSize, int margin)
challengeId - The id of the challengefontSize - The font sizemargin - The image's marginpublic CaptchaImageResource(String challengeId, int fontSize, int margin)
challengeId - The id of the challengefontSize - The font sizemargin - The image's marginprotected Random newRandomNumberGenerator()
public final String getChallengeId()
public final IModel<String> getChallengeIdModel()
public final void invalidate()
protected final byte[] getImageData(IResource.Attributes attributes)
getImageData in class DynamicImageResourceprotected byte[] render()
Copyright © 2006–2015 Apache Software Foundation. All rights reserved.