Package org.nuiton.validator.xwork2
Class XWork2ValidatorUtil
- java.lang.Object
-
- org.nuiton.validator.xwork2.XWork2ValidatorUtil
-
public class XWork2ValidatorUtil extends Object
Usefull methods to works with work2 validator api.- Since:
- 2.0
- Author:
- Tony Chemit - chemit@codelutin.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XWork2ValidatorUtil.NuitonDefaultUnknownHandler
A dummy unknown handler when we want to use for example visitor validators which need a invocation handler.
-
Constructor Summary
Constructors Constructor Description XWork2ValidatorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.opensymphony.xwork2.util.ValueStack
createValuestack()
static <O> Map<NuitonValidatorScope,String[]>
detectFields(Class<O> type, String context, NuitonValidatorScope[] scopeUniverse)
protected static Set<String>
detectFieldsForScope(com.opensymphony.xwork2.validator.ActionValidatorManager validator, Class<?> type, NuitonValidatorScope scope, String context, Set<String> availableFields, boolean includeDefaultContext)
static String
getContextForScope(String context, NuitonValidatorScope scope)
static com.opensymphony.xwork2.util.ValueStack
getSharedValueStack()
protected static com.opensymphony.xwork2.validator.ActionValidatorManager
newValidationManager(com.opensymphony.xwork2.util.ValueStack vs)
static <O> XWork2ScopeValidator<O>
newXWorkScopeValidator(Class<O> beanClass, String contextName, Set<String> fields)
static <O> XWork2ScopeValidator<O>
newXWorkScopeValidator(Class<O> beanClass, String contextName, Set<String> fields, com.opensymphony.xwork2.util.ValueStack vs)
static void
setSharedValueStack(com.opensymphony.xwork2.util.ValueStack sharedValueStack)
Sets the given value stack as shared (can be null).
-
-
-
Method Detail
-
getSharedValueStack
public static com.opensymphony.xwork2.util.ValueStack getSharedValueStack()
-
setSharedValueStack
public static void setSharedValueStack(com.opensymphony.xwork2.util.ValueStack sharedValueStack)
Sets the given value stack as shared (can be null).- Parameters:
sharedValueStack
- the new shared value stack to use (can be null).- Since:
- 3.0
-
createValuestack
public static com.opensymphony.xwork2.util.ValueStack createValuestack()
-
newXWorkScopeValidator
public static <O> XWork2ScopeValidator<O> newXWorkScopeValidator(Class<O> beanClass, String contextName, Set<String> fields)
-
newXWorkScopeValidator
public static <O> XWork2ScopeValidator<O> newXWorkScopeValidator(Class<O> beanClass, String contextName, Set<String> fields, com.opensymphony.xwork2.util.ValueStack vs)
-
getContextForScope
public static String getContextForScope(String context, NuitonValidatorScope scope)
-
newValidationManager
protected static com.opensymphony.xwork2.validator.ActionValidatorManager newValidationManager(com.opensymphony.xwork2.util.ValueStack vs)
-
detectFields
public static <O> Map<NuitonValidatorScope,String[]> detectFields(Class<O> type, String context, NuitonValidatorScope[] scopeUniverse)
-
-