Uses of Interface
name.matthewgreet.strutscommons.util.PolicyLookup
Packages that use PolicyLookup
Package
Description
Various Struts 2 Interceptors.
Various helper classes, especially for session-based data, and libraries.
-
Uses of PolicyLookup in name.matthewgreet.strutscommons.interceptor
Methods in name.matthewgreet.strutscommons.interceptor that return PolicyLookupModifier and TypeMethodDescriptionprotected PolicyLookupAnnotationValidationInterceptor2.makePolicyLookup()Creates and returns helper that finds a policy implementation from a form field adjuster, converter, or validator annotation.protected PolicyLookupFormFormatterInterceptor.makePolicyLookup()Creates and returns helper that finds a policy implementation from a form field adjuster, converter, or validator annotation. -
Uses of PolicyLookup in name.matthewgreet.strutscommons.util
Classes in name.matthewgreet.strutscommons.util that implement PolicyLookupModifier and TypeClassDescriptionclassStandard implementation ofPolicyLookupthat creates a Singleton instance from an initial configuration that returns the built-in form field policies and, if classpath scanning is enabled, automatically finds and adds bespoke ones.Methods in name.matthewgreet.strutscommons.util that return PolicyLookupModifier and TypeMethodDescriptionDefaultAnnotationValidatior.getPolicyLookup()Returns policy lookup by annotation helper used in validation.DefaultDisplayFormatter.getPolicyLookup()Returns policy lookup by annotation helper used in validation.DefaultFormFormatter.InterceptorContext.getPolicyLookup()Methods in name.matthewgreet.strutscommons.util with parameters of type PolicyLookupModifier and TypeMethodDescriptionInterceptorCommonLibrary.categoriseFormFields(Collection<Field> formFields, PolicyLookup policyLookup) Sets how each form field should be converted.voidDefaultFormFormatter.formatForms(PolicyLookup policyLookup) Entry point called byFormFormatterInterceptor.voidFormFormatter.formatForms(PolicyLookup policyLookup) Same asFormFormatter.formatForms()but can use a different set of converters.protected <T> InterceptorCommonLibrary.AnnotationEntries<T> DefaultDisplayFormatter.getAnnotationEntries(Field displayField, PolicyLookup policyLookup) Returns all recognised annotations and their linked policies.static <T> InterceptorCommonLibrary.AnnotationEntries<T> InterceptorCommonLibrary.getAnnotationEntries(Field formField, PolicyLookup policyLookup) Returns all recognised annotations and their linked policies.static <T> InterceptorCommonLibrary.ConfiguredPolicy<T> InterceptorCommonLibrary.getConfiguredPolicy(Annotation annotation, PolicyLookup policyLookup) Returns configured policy instance that processes an annotated form field, or result of NA type if not recognised.static CollectionConverter<?, ?> InterceptorCommonLibrary.getDefaultCollectionConverter(Field field, PolicyLookup policyLookup) Returns default collection converter for a collection form field or display field, or null if none available.static Converter<?, ?> InterceptorCommonLibrary.getDefaultConverter(Field field, PolicyLookup policyLookup) Returns default converter for a single value form field or display field, or null if none available.static Converter<?, ?> InterceptorCommonLibrary.getDefaultConverterFromArray(Field field, PolicyLookup policyLookup) Returns default converter for each item of an array display field, or null if none available.static Converter<?, ?> InterceptorCommonLibrary.getDefaultConverterFromCollection(Field field, PolicyLookup policyLookup) Returns default converter for each item of a collection display field, or null if none available.protected <T> DefaultDisplayFormatter.DisplayFieldUsage<T> DefaultDisplayFormatter.getDisplayFieldUsage(Field recordField, Field displayField, PolicyLookup policyLookup) Analyses converter annotations on display field and returns configured formatter to formatted from source field display field, or null if not applicable.static <T> InterceptorCommonLibrary.FieldUsage<T> InterceptorCommonLibrary.getFormFieldUsage(Field formField, PolicyLookup policyLookup) Returns what policies should apply to a form field, such as conversion and validation, or throwsFormFieldAnnotationTypeMismatchExceptionif any annotation does not match the field's type.voidDefaultAnnotationValidatior.setPolicyLookup(PolicyLookup policyLookup) voidDefaultDisplayFormatter.setPolicyLookup(PolicyLookup policyLookup) voidDefaultFormFormatter.InterceptorContext.setPolicyLookup(PolicyLookup policyLookup) protected voidDefaultFormFormatter.startInterceptorContext(ActionInvocation invocation, PolicyLookup policyLookup) static voidStrutsMiscellaneousLibrary.updateDisplayWithPolicyLookup(Class<?> recordClass, Object record, Object display, PolicyLookup policyLookup) Same as#updateDisplaybut can use a different set of formatters.