Uploaded image for project: 'Solder'
  1. Solder
  2. SOLDER-142

Provide convenience constants for precedents

    Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.0.0.Beta1
    • Fix Version/s: 3.0.0.Beta1
    • Component/s: None
    • Labels:
      None
    • Estimated Difficulty:
      Low

      Description

      First time users get a little scared when they see:

      public void redirectingHandler(@Handles(precedence = -100) CaughtException<Throwable> event, NavigationHandler nav)

      { .. }

      To provide more guidance to first time users and integrators, we should provide some named constants for common purposes, similar to the Install annotation from Seam 2. For instance, -100 is perhaps a typical precedence for a built-in handler. Thus, we can make this a constant:

      public void redirectingHandler(@Handles(precedence = BUILT_IN) CaughtException<Throwable> event, NavigationHandler nav) { .. }

      Here's a possible list:

      BUILT_IN = -100;
      FRAMEWORK = -50;
      DEFAULT = 0;
      LOW = 50;
      HIGH = 100;

      Of course, the user can always use any int value. These are just conveniences.

        Gliffy Diagrams

          Activity

          Hide
          lightguard Jason Porter added a comment -

          These would be constants on the @Handles annotation?

          Show
          lightguard Jason Porter added a comment - These would be constants on the @Handles annotation?
          Hide
          lightguard Jason Porter added a comment -

          Complete

          Show
          lightguard Jason Porter added a comment - Complete

            People

            • Assignee:
              lightguard Jason Porter
              Reporter:
              dan.j.allen Dan Allen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development