|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opencms.frontend.templateone.form.CmsCaptchaSettings
public final class CmsCaptchaSettings
Stores the settings to render captcha images.
| Field Summary | |
|---|---|
static java.lang.String |
C_PARAM_BACKGROUND_COLOR
Request parameter for the background color. |
static java.lang.String |
C_PARAM_CHARACTERS
Request parameter for the min phrase length. |
static java.lang.String |
C_PARAM_FILTER_AMPLITUDE
Request parameter for the filter amplitude. |
static java.lang.String |
C_PARAM_FILTER_WAVE_LENGTH
Request parameter for the filter amplitude. |
static java.lang.String |
C_PARAM_FONT_COLOR
Request parameter for the font color. |
static java.lang.String |
C_PARAM_HOLES_PER_GLYPH
Request parameter for the font color. |
static java.lang.String |
C_PARAM_IMAGE_HEIGHT
Request parameter for the image height. |
static java.lang.String |
C_PARAM_IMAGE_WIDTH
Request parameter for the image width. |
static java.lang.String |
C_PARAM_MAX_FONT_SIZE
Request parameter for the max. font size. |
static java.lang.String |
C_PARAM_MAX_PHRASE_LENGTH
Request parameter for the max phrase length. |
static java.lang.String |
C_PARAM_MIN_FONT_SIZE
Request parameter for the min. font size. |
static java.lang.String |
C_PARAM_MIN_PHRASE_LENGTH
Request parameter for the min phrase length. |
static java.lang.String |
C_PARAM_PRESET
Request parameter for the min phrase length. |
static java.lang.String |
C_PARAM_USE_BACKGROUND_IMAGE
Request parameter for the min phrase length. |
static java.lang.String |
NODE_CAPTCHAPRESET_BACKGROUNDCOLOR
Configuration node name for the optional captcha background color. |
static java.lang.String |
NODE_CAPTCHAPRESET_FILTER_AMPLITUDE
Configuration node name for the field value node. |
static java.lang.String |
NODE_CAPTCHAPRESET_FILTER_WAVELENGTH
Configuration node name for the optional captcha image holes per glyph. |
static java.lang.String |
NODE_CAPTCHAPRESET_FONTCOLOR
Configuration node name for the optional captcha font color. |
static java.lang.String |
NODE_CAPTCHAPRESET_HOLESPERGLYPH
Configuration node name for the optional captcha image holes per glyph. |
static java.lang.String |
NODE_CAPTCHAPRESET_IMAGEHEIGHT
Configuration node name for the optional captcha image height. |
static java.lang.String |
NODE_CAPTCHAPRESET_IMAGEWIDTH
Configuration node name for the optional captcha image width. |
static java.lang.String |
NODE_CAPTCHAPRESET_MAX_FONT_SIZE
Configuration node name for the optional captcha max. font size. |
static java.lang.String |
NODE_CAPTCHAPRESET_MAX_PHRASE_LENGTH
Configuration node name for the optional captcha max. phrase length. |
static java.lang.String |
NODE_CAPTCHAPRESET_MIN_FONT_SIZE
Configuration node name for the optional captcha min. font size. |
static java.lang.String |
NODE_CAPTCHAPRESET_MIN_PHRASE_LENGTH
Configuration node name for the optional captcha min. phrase length. |
| Method Summary | |
|---|---|
protected java.lang.Object |
clone()
|
java.awt.Color |
getBackgroundColor()
Returns the background color. |
java.lang.String |
getBackgroundColorString()
Returns the background color as a hex string. |
int |
getFilterAmplitude()
Returns the filter amplitude for the water filter that bends the text. |
int |
getFilterWaveLength()
Returns the filter wave length for the water filter that bends the text. |
java.awt.Color |
getFontColor()
Returns the font color. |
java.lang.String |
getFontColorString()
Returns the font color as a hex string. |
java.lang.Integer |
getHolesPerGlyph()
Returns the holes per glyph for a captcha image text (distortion). |
int |
getImageHeight()
Returns the image height. |
int |
getImageWidth()
Returns the image width. |
static CmsCaptchaSettings |
getInstance(org.opencms.jsp.CmsJspActionElement jsp)
Returns a clone of the singleton instance of the "master" CmsCaptchaSettings and potential overridden values from
the request context. |
int |
getMaxFontSize()
Returns the max. font size. |
int |
getMaxPhraseLength()
Returns the max. phrase length. |
int |
getMinFontSize()
Returns the min. font size. |
int |
getMinPhraseLength()
Returns the min. phrase length. |
void |
init(org.opencms.jsp.CmsJspActionElement jsp)
Configures the instance with values overridden from the the request parameters. |
void |
init(org.opencms.file.CmsObject cms,
org.opencms.xml.content.CmsXmlContent content,
java.util.Locale locale)
Configures the instance with overridden values from the given XML content. |
boolean |
isUseBackgroundImage()
Returns the flag that decides wethter a background image or a background color is used. |
void |
setBackgroundColor(java.awt.Color backgroundColor)
Sets the background color. |
void |
setBackgroundColor(java.lang.String backgroundColor)
Sets the background color as a hex string. |
void |
setFilterAmplitude(int i)
Sets the filter amplitude for the water filter that will bend the text. |
void |
setFilterWaveLength(int filterWaveLength)
Sets the filter wave length for the water filter that bends the text. |
void |
setFontColor(java.awt.Color fontColor)
Sets the font color. |
void |
setFontColor(java.lang.String fontColor)
Sets the font color as a hex string. |
void |
setHolesPerGlyph(int holes)
Sets the holes per glyph for a captcha image text (distortion). |
void |
setImageHeight(int imageHeight)
Sets the image height. |
void |
setImageWidth(int imageWidth)
Sets the image width. |
void |
setMaxFontSize(int maxFontSize)
Sets the max. font size. |
void |
setMaxPhraseLength(int maxPhraseLength)
Sets the max. phrase length. |
void |
setMinFontSize(int minFontSize)
Sets the min. font size. |
void |
setMinPhraseLength(int minPhraseLength)
Sets the min. phrase length. |
void |
setUseBackgroundImage(boolean useBackgroundImage)
Returns the flag that decides wethter a background image or a background color is used. |
java.lang.String |
toRequestParams(org.opencms.file.CmsObject cms)
Creates a request parameter string from including all captcha settings. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String C_PARAM_BACKGROUND_COLOR
public static final java.lang.String C_PARAM_CHARACTERS
public static final java.lang.String C_PARAM_FILTER_AMPLITUDE
public static final java.lang.String C_PARAM_FILTER_WAVE_LENGTH
public static final java.lang.String C_PARAM_FONT_COLOR
public static final java.lang.String C_PARAM_HOLES_PER_GLYPH
public static final java.lang.String C_PARAM_IMAGE_HEIGHT
public static final java.lang.String C_PARAM_IMAGE_WIDTH
public static final java.lang.String C_PARAM_MAX_FONT_SIZE
public static final java.lang.String C_PARAM_MAX_PHRASE_LENGTH
public static final java.lang.String C_PARAM_MIN_FONT_SIZE
public static final java.lang.String C_PARAM_MIN_PHRASE_LENGTH
public static final java.lang.String C_PARAM_PRESET
public static final java.lang.String C_PARAM_USE_BACKGROUND_IMAGE
public static final java.lang.String NODE_CAPTCHAPRESET_BACKGROUNDCOLOR
public static final java.lang.String NODE_CAPTCHAPRESET_FILTER_AMPLITUDE
public static final java.lang.String NODE_CAPTCHAPRESET_FILTER_WAVELENGTH
public static final java.lang.String NODE_CAPTCHAPRESET_FONTCOLOR
public static final java.lang.String NODE_CAPTCHAPRESET_HOLESPERGLYPH
public static final java.lang.String NODE_CAPTCHAPRESET_IMAGEHEIGHT
public static final java.lang.String NODE_CAPTCHAPRESET_IMAGEWIDTH
public static final java.lang.String NODE_CAPTCHAPRESET_MAX_FONT_SIZE
public static final java.lang.String NODE_CAPTCHAPRESET_MAX_PHRASE_LENGTH
public static final java.lang.String NODE_CAPTCHAPRESET_MIN_FONT_SIZE
public static final java.lang.String NODE_CAPTCHAPRESET_MIN_PHRASE_LENGTH
| Method Detail |
|---|
public static CmsCaptchaSettings getInstance(org.opencms.jsp.CmsJspActionElement jsp)
CmsCaptchaSettings and potential overridden values from
the request context.
The "master" CmsCaptchaSettings are read from an XML content that
contains the global defaults.
jsp - used to potentially access the XML content with the default captcha settings and
to read overriden values from the request parameters.
CmsCaptchaSettings.public java.awt.Color getBackgroundColor()
public java.lang.String getBackgroundColorString()
public int getFilterAmplitude()
public int getFilterWaveLength()
public java.awt.Color getFontColor()
public java.lang.String getFontColorString()
public java.lang.Integer getHolesPerGlyph()
public int getImageHeight()
public int getImageWidth()
public int getMaxFontSize()
public int getMaxPhraseLength()
public int getMinFontSize()
public int getMinPhraseLength()
public void init(org.opencms.jsp.CmsJspActionElement jsp)
jsp - a Cms JSP pageC_PARAM_BACKGROUND_COLOR,
C_PARAM_FILTER_AMPLITUDE
public void init(org.opencms.file.CmsObject cms,
org.opencms.xml.content.CmsXmlContent content,
java.util.Locale locale)
NODE_CAPTCHAPRESET_BACKGROUNDCOLOR),
a background image will be used. Color.WHITE) will be used as background.
cms - the current user's Cms objectcontent - the XML content of the formlocale - the current localepublic boolean isUseBackgroundImage()
public void setBackgroundColor(java.awt.Color backgroundColor)
backgroundColor - the background color to setpublic void setBackgroundColor(java.lang.String backgroundColor)
backgroundColor - the background color to set as a hex stringpublic void setFilterAmplitude(int i)
i - the filter amplitude for the water filter that will bend the text to set.public void setFilterWaveLength(int filterWaveLength)
filterWaveLength - the filter wave length for the water filter that bends the text to setpublic void setFontColor(java.awt.Color fontColor)
fontColor - the font color to setpublic void setFontColor(java.lang.String fontColor)
fontColor - the font color to set as a hex stringpublic void setHolesPerGlyph(int holes)
holes - the holes per glyph for a captcha image text to set.public void setImageHeight(int imageHeight)
imageHeight - the image height to setpublic void setImageWidth(int imageWidth)
imageWidth - the image width to setpublic void setMaxFontSize(int maxFontSize)
maxFontSize - the max. font size to setpublic void setMaxPhraseLength(int maxPhraseLength)
maxPhraseLength - the max. phrase length to setpublic void setMinFontSize(int minFontSize)
minFontSize - the min. font size to setpublic void setMinPhraseLength(int minPhraseLength)
minPhraseLength - the min. phrase length to setpublic void setUseBackgroundImage(boolean useBackgroundImage)
useBackgroundImage - the flag that decides wethter a background image or a background
color is used.public java.lang.String toRequestParams(org.opencms.file.CmsObject cms)
cms - needed for the context / encoding
protected java.lang.Object clone()
clone in class java.lang.ObjectObject.clone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||