Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-3679

Required fields validation

    XMLWordPrintableJSON

Details

    Description

      Currently if some field cannot be injected (and it is not annotated with @Optional), model adapter factory returns null. However fact that some field has null and all other are properly injected is acceptable in my context.

      Proposal:

      • model adapter factory does not return null if not all required fields are injected,
      • result of requirement validation is serviced as for example:
        • injecting it to some extra annotated field: @Valid boolean valid; (with default false),
        • passing bool parameter in @PostConstruct callback, for example 'valid' (true if all required field are injected, false otherwise),
      • behave current behavior, new available only with extra model class annotation, for example @NotNull .

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kpanek Krystian Panek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: