Wicket
  1. Wicket
  2. WICKET-287

refactor/ damage control IRequestCycleProcessor

    Details

      Activity

      Hide
      Eelco Hillenius added a comment -

      done for 1.3 and tbd for 2.0:

      Pulled out the layer that was in java/wicket/request/compound/. All those indirection interfaces only cluttered the API. Instead, there now is wicket.request.AbstractRequestCycleProcessor, which contains most of the implementation you'll typically need, but in an overridable fashion.

      Where you would you do:
      protected IRequestCycleProcessor newRequestCycleProcessor()

      { return new CompoundRequestCycleProcessor(new URLCompressingWebCodingStrategy(), new WebURLCompressingTargetResolverStrategy(), null, null, null); }

      in the older versions, you now do:

      protected IRequestCycleProcessor newRequestCycleProcessor()

      { return new UrlCompressingWebRequestProcessor(); }

      And:

      protected IRequestCycleProcessor newRequestCycleProcessor()

      { WebRequestCodingStrategy.Settings stratSettings = new WebRequestCodingStrategy.Settings(); stratSettings.setMountsCaseSensitive(false); WebRequestCodingStrategy strat = new WebRequestCodingStrategy(stratSettings); return new CompoundRequestCycleProcessor(strat); }

      becomes:

      protected IRequestCycleProcessor newRequestCycleProcessor()
      {
      return new WebRequestCycleProcessor()
      {
      protected IRequestCodingStrategy newRequestCodingStrategy()

      { WebRequestCodingStrategy.Settings stratSettings = new WebRequestCodingStrategy.Settings(); stratSettings.setMountsCaseSensitive(false); return new WebRequestCodingStrategy(stratSettings); }

      };
      }

      and:

      protected IRequestCycleProcessor newRequestCycleProcessor()

      { return new CompoundRequestCycleProcessor(new CryptedUrlWebRequestCodingStrategy( new WebRequestCodingStrategy()), null, null, null, null); }

      would now be:

      protected IRequestCycleProcessor newRequestCycleProcessor()
      {
      return new WebRequestCycleProcessor()
      {
      protected IRequestCodingStrategy newRequestCodingStrategy()

      { return new CryptedUrlWebRequestCodingStrategy(new WebRequestCodingStrategy()); }

      };
      }

      Show
      Eelco Hillenius added a comment - done for 1.3 and tbd for 2.0: Pulled out the layer that was in java/wicket/request/compound/. All those indirection interfaces only cluttered the API. Instead, there now is wicket.request.AbstractRequestCycleProcessor, which contains most of the implementation you'll typically need, but in an overridable fashion. Where you would you do: protected IRequestCycleProcessor newRequestCycleProcessor() { return new CompoundRequestCycleProcessor(new URLCompressingWebCodingStrategy(), new WebURLCompressingTargetResolverStrategy(), null, null, null); } in the older versions, you now do: protected IRequestCycleProcessor newRequestCycleProcessor() { return new UrlCompressingWebRequestProcessor(); } And: protected IRequestCycleProcessor newRequestCycleProcessor() { WebRequestCodingStrategy.Settings stratSettings = new WebRequestCodingStrategy.Settings(); stratSettings.setMountsCaseSensitive(false); WebRequestCodingStrategy strat = new WebRequestCodingStrategy(stratSettings); return new CompoundRequestCycleProcessor(strat); } becomes: protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { protected IRequestCodingStrategy newRequestCodingStrategy() { WebRequestCodingStrategy.Settings stratSettings = new WebRequestCodingStrategy.Settings(); stratSettings.setMountsCaseSensitive(false); return new WebRequestCodingStrategy(stratSettings); } }; } and: protected IRequestCycleProcessor newRequestCycleProcessor() { return new CompoundRequestCycleProcessor(new CryptedUrlWebRequestCodingStrategy( new WebRequestCodingStrategy()), null, null, null, null); } would now be: protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { protected IRequestCodingStrategy newRequestCodingStrategy() { return new CryptedUrlWebRequestCodingStrategy(new WebRequestCodingStrategy()); } }; }

        People

        • Assignee:
          Eelco Hillenius
          Reporter:
          Eelco Hillenius
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development