|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.planet_ink.coffee_mud.WebMacros.StdWebMacro
com.planet_ink.coffee_mud.WebMacros.ImageVerificationImage
public class ImageVerificationImage
ImageVerification is a simple utility class for creating an image verification PNG file that will allow you to make sure that only a human can read the alphanumeric values and enter them into a text field during verification. Make sure that when you can getVerificationCode you don't encode the value in the URL or inside the HTML form - otherwise, this whole excerise is pointless (dummy!).
Nested Class Summary | |
---|---|
static class |
ImageVerificationImage.ImgCacheEntry
|
Field Summary | |
---|---|
static java.lang.Object |
sync
|
Constructor Summary | |
---|---|
ImageVerificationImage()
|
|
ImageVerificationImage(int height,
int width,
java.lang.String oldValue,
java.io.OutputStream out)
|
|
ImageVerificationImage(java.lang.String oldValue,
java.io.OutputStream out)
|
Method Summary | |
---|---|
java.lang.String |
getFilename(com.planet_ink.coffee_web.interfaces.HTTPRequest httpReq,
java.lang.String filename)
|
java.lang.String |
getVerificationValue()
return the value to check for when the user enters it in. |
static SLinkedList<ImageVerificationImage.ImgCacheEntry> |
getVerifyCache()
|
boolean |
isAWebPath()
Whether this macro substitutes as an aspect of the web path instead of a standard web macro. |
boolean |
preferBinary()
Whether the runMacro or runBinaryMacro executor should be called. |
byte[] |
runBinaryMacro(com.planet_ink.coffee_web.interfaces.HTTPRequest httpReq,
java.lang.String parm,
com.planet_ink.coffee_web.interfaces.HTTPResponse httpResp)
This method is executed only if this macro returns true for preferBinary(). |
java.lang.String |
runMacro(com.planet_ink.coffee_web.interfaces.HTTPRequest httpReq,
java.lang.String parm,
com.planet_ink.coffee_web.interfaces.HTTPResponse httpResp)
This method is executed only if this macro returns false for preferBinary(). |
Methods inherited from class com.planet_ink.coffee_mud.WebMacros.StdWebMacro |
---|
clearWebMacros, clearWebMacros, colorwebifyOnly, compareTo, copyOf, getHTTPFileData, grabFile, helpHelp, helpHelp, helpHelp, htmlIncomingFilter, htmlIncomingFilter, htmlOutgoingFilter, htmlOutgoingFilter, ID, initializeClass, isAdminMacro, L, name, newInstance, parseOrderedParms, parseParms, parseParms, safeIncomingfilter, webify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.Object sync
Constructor Detail |
---|
public ImageVerificationImage()
public ImageVerificationImage(java.lang.String oldValue, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public ImageVerificationImage(int height, int width, java.lang.String oldValue, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public boolean isAWebPath()
WebMacro
isAWebPath
in interface WebMacro
isAWebPath
in class StdWebMacro
public boolean preferBinary()
WebMacro
preferBinary
in interface WebMacro
preferBinary
in class StdWebMacro
WebMacro.runBinaryMacro(HTTPRequest, String, HTTPResponse)
,
WebMacro.runMacro(HTTPRequest, String, HTTPResponse)
public static SLinkedList<ImageVerificationImage.ImgCacheEntry> getVerifyCache()
public java.lang.String getFilename(com.planet_ink.coffee_web.interfaces.HTTPRequest httpReq, java.lang.String filename)
public byte[] runBinaryMacro(com.planet_ink.coffee_web.interfaces.HTTPRequest httpReq, java.lang.String parm, com.planet_ink.coffee_web.interfaces.HTTPResponse httpResp) throws HTTPServerException
WebMacro
runBinaryMacro
in interface WebMacro
runBinaryMacro
in class StdWebMacro
httpReq
- the external requests objectparm
- any parameter strings given to the macrohttpResp
- the response, with headers
HTTPServerException
- a http error to pass to the userWebMacro.preferBinary()
,
HTTPRequest
public java.lang.String runMacro(com.planet_ink.coffee_web.interfaces.HTTPRequest httpReq, java.lang.String parm, com.planet_ink.coffee_web.interfaces.HTTPResponse httpResp) throws HTTPServerException
WebMacro
runMacro
in interface WebMacro
runMacro
in class StdWebMacro
httpReq
- the external requests objectparm
- any parameter strings given to the macrohttpResp
- the response, with headers
HTTPServerException
- a http error to pass to the userWebMacro.preferBinary()
,
HTTPRequest
public java.lang.String getVerificationValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |