public class

StringVerifier

extends Object
implements PropertyVerifier
java.lang.Object
   ↳ com.opensymphony.module.propertyset.verifiers.StringVerifier

Class Overview

Handles verification of Strings. Can be configured to only accept only strings within a given length range. Omitted values are assumed to be unconstrained. For example:
StringVerifier sv = new StringVerifier(); sv.setMaxLength(50);
Will accept any string that is less than 50 characters in length.

Note though that the default max length of a string is 255 chars.

Summary

Public Constructors
StringVerifier()
StringVerifier(int min, int max)
Create a StringVerifier with the specified min and max lengths.
StringVerifier(String[] allowable)
Public Methods
String getContains()
int getMaxLength()
int getMinLength()
String getPrefix()
String getSuffix()
void setAllowableValues(String[] vals)
void setContains(String s)
void setMaxLength(int max)
void setMinLength(int min)
void setPrefix(String s)
void setSuffix(String s)
void verify(Object o)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.opensymphony.module.propertyset.verifiers.PropertyVerifier

Public Constructors

public StringVerifier ()

public StringVerifier (int min, int max)

Create a StringVerifier with the specified min and max lengths.

Parameters
min The minimum allowable string length.
max The maximum allowable string length.

public StringVerifier (String[] allowable)

Public Methods

public String getContains ()

public int getMaxLength ()

public int getMinLength ()

public String getPrefix ()

public String getSuffix ()

public void setAllowableValues (String[] vals)

public void setContains (String s)

public void setMaxLength (int max)

public void setMinLength (int min)

public void setPrefix (String s)

public void setSuffix (String s)

public void verify (Object o)