Class RestLocationTranslator<U extends DefaultUser,​P>


  • public class RestLocationTranslator<U extends DefaultUser,​P>
    extends java.lang.Object
    • Method Summary

      Modifier and Type Method Description
      protected java.util.Map<StatusCode,​RestErrorTarget<U,​? extends org.rootservices.otter.translatable.Translatable>> mergeDispatchErrors​(java.util.Map<StatusCode,​RestErrorTarget<U,​? extends org.rootservices.otter.translatable.Translatable>> left, java.util.Map<StatusCode,​RestErrorTarget<U,​? extends org.rootservices.otter.translatable.Translatable>> right)
      Merges two maps of rest error targets (dispatch errors) with the preference to the right when a collision occurs.
      protected java.util.Map<StatusCode,​RestError<U,​? extends org.rootservices.otter.translatable.Translatable>> mergeRestErrors​(java.util.Map<StatusCode,​RestError<U,​? extends org.rootservices.otter.translatable.Translatable>> left, java.util.Map<StatusCode,​RestError<U,​? extends org.rootservices.otter.translatable.Translatable>> right)
      Merges two maps of rest errors with the preference to the right when a collision occurs.
      java.util.Map<Method,​Location> to​(RestTarget<U,​P> from)  
      protected java.util.Map<StatusCode,​RestErrorHandler<U>> toErrorHandlers​(java.util.Map<StatusCode,​RestError<U,​? extends org.rootservices.otter.translatable.Translatable>> from)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RestLocationTranslator

        public RestLocationTranslator​(RestBetweenFlyweight<U> restBetweenFlyweight,
                                      java.util.Map<StatusCode,​RestError<U,​? extends org.rootservices.otter.translatable.Translatable>> restErrors,
                                      java.util.Map<StatusCode,​RestError<U,​? extends org.rootservices.otter.translatable.Translatable>> defaultErrors,
                                      java.util.Map<StatusCode,​RestErrorTarget<U,​? extends org.rootservices.otter.translatable.Translatable>> dispatchErrors,
                                      java.util.Map<StatusCode,​RestErrorTarget<U,​? extends org.rootservices.otter.translatable.Translatable>> defaultDispatchErrors)
    • Method Detail

      • mergeRestErrors

        protected java.util.Map<StatusCode,​RestError<U,​? extends org.rootservices.otter.translatable.Translatable>> mergeRestErrors​(java.util.Map<StatusCode,​RestError<U,​? extends org.rootservices.otter.translatable.Translatable>> left,
                                                                                                                                                java.util.Map<StatusCode,​RestError<U,​? extends org.rootservices.otter.translatable.Translatable>> right)
        Merges two maps of rest errors with the preference to the right when a collision occurs.
        Parameters:
        left - a map of rest errors
        right - a map of rest errors
        Returns:
        a merged map of rest errors.
      • mergeDispatchErrors

        protected java.util.Map<StatusCode,​RestErrorTarget<U,​? extends org.rootservices.otter.translatable.Translatable>> mergeDispatchErrors​(java.util.Map<StatusCode,​RestErrorTarget<U,​? extends org.rootservices.otter.translatable.Translatable>> left,
                                                                                                                                                          java.util.Map<StatusCode,​RestErrorTarget<U,​? extends org.rootservices.otter.translatable.Translatable>> right)
        Merges two maps of rest error targets (dispatch errors) with the preference to the right when a collision occurs.
        Parameters:
        left - a map of rest errors
        right - a map of rest errors
        Returns:
        a merged map of RestErrorTarget.