Package pl.edu.icm.unity.stdext.attr
Class StringAttributeSyntax
- java.lang.Object
-
- pl.edu.icm.unity.stdext.attr.AbstractStringAttributeSyntax
-
- pl.edu.icm.unity.stdext.attr.StringAttributeSyntax
-
- All Implemented Interfaces:
pl.edu.icm.unity.engine.api.attributes.AttributeValueSyntax<String>
public class StringAttributeSyntax extends AbstractStringAttributeSyntax
String attribute value syntax. Can have regular expression defined to limit contents. Also can have min and max length defined.- Author:
- K. Benedyczak
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStringAttributeSyntax.Factory
-
Constructor Summary
Constructors Constructor Description StringAttributeSyntax()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMaxLength()intgetMaxSize()intgetMinLength()StringgetRegexp()com.fasterxml.jackson.databind.JsonNodegetSerializedConfiguration()StringgetValueSyntaxId()booleanisEditWithTextArea()voidsetEditWithTextArea(boolean editWithTextArea)voidsetMaxLength(int maxLength)voidsetMinLength(int minLength)voidsetRegexp(String regexp)voidsetSerializedConfiguration(com.fasterxml.jackson.databind.JsonNode jsonN)voidvalidate(String value)-
Methods inherited from class pl.edu.icm.unity.stdext.attr.AbstractStringAttributeSyntax
areEqual, convertFromString, convertToString, hashCode, isEmailVerifiable, isUserVerifiable, serializeSimple
-
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getValueSyntaxId
public String getValueSyntaxId()
-
getSerializedConfiguration
public com.fasterxml.jackson.databind.JsonNode getSerializedConfiguration()
- Throws:
pl.edu.icm.unity.exceptions.InternalException
-
setSerializedConfiguration
public void setSerializedConfiguration(com.fasterxml.jackson.databind.JsonNode jsonN)
- Throws:
pl.edu.icm.unity.exceptions.InternalException
-
validate
public void validate(String value) throws pl.edu.icm.unity.exceptions.IllegalAttributeValueException
- Throws:
pl.edu.icm.unity.exceptions.IllegalAttributeValueException
-
getRegexp
public String getRegexp()
- Returns:
- the regexp
-
setRegexp
public void setRegexp(String regexp)
- Parameters:
regexp- the regexp to set
-
getMinLength
public int getMinLength()
- Returns:
- the minLength
-
setMinLength
public void setMinLength(int minLength) throws pl.edu.icm.unity.exceptions.WrongArgumentException- Parameters:
minLength- the minLength to set- Throws:
IllegalArgumentExceptionpl.edu.icm.unity.exceptions.WrongArgumentException
-
getMaxLength
public int getMaxLength()
- Returns:
- the maxLength
-
getMaxSize
public int getMaxSize()
-
setMaxLength
public void setMaxLength(int maxLength) throws pl.edu.icm.unity.exceptions.WrongArgumentException- Parameters:
maxLength- the maxLength to set- Throws:
IllegalArgumentExceptionpl.edu.icm.unity.exceptions.WrongArgumentException
-
isEditWithTextArea
public boolean isEditWithTextArea()
-
setEditWithTextArea
public void setEditWithTextArea(boolean editWithTextArea)
-
-