Package

org

scalatra

Permalink

package scalatra

Linear Supertypes
Control, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. scalatra
  2. Control
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Action = () ⇒ Any

    Permalink
  2. case class ActionResult(status: Int, body: Any, headers: Map[String, String]) extends Product with Serializable

    Permalink
  3. trait ApiFormats extends ScalatraBase

    Permalink

    Adds support for mapping and inferring formats to content types.

    Adds support for mapping and inferring formats to content types.

    $ - Provides a request-scoped format variable $ - Maps formats to content types and vice versa $ - Augments the content-type inferrer to use the format

  4. abstract class AsyncResult extends ScalatraContext

    Permalink
  5. final class BooleanBlockRouteMatcher extends RouteMatcher

    Permalink

    A route matcher on a boolean condition.

    A route matcher on a boolean condition. Does not extract any route parameters.

  6. trait ContentEncoding extends AnyRef

    Permalink

    Represents an HTTP content encoding.

  7. trait ContentEncodingSupport extends Handler

    Permalink

    Scalatra handler for gzipped responses.

  8. case class ContentNegotiation[T](value: T, q: Float = 1) extends Product with Serializable

    Permalink

    Represents the value of a content negotiation header.

  9. trait Control extends AnyRef

    Permalink

    A collection of methods that affect the control flow of routes.

  10. case class Cookie(name: String, value: String)(implicit cookieOptions: CookieOptions = CookieOptions()) extends Product with Serializable

    Permalink
  11. trait CookieContext extends AnyRef

    Permalink
  12. case class CookieOptions(domain: String = "", path: String = "", maxAge: Int = 1, secure: Boolean = false, comment: String = "", httpOnly: Boolean = false, version: Int = 0, encoding: String = "UTF-8") extends Product with Serializable

    Permalink
  13. trait CoreDsl extends Handler with Control with ScalatraContext with ServletApiImplicits

    Permalink

    The core Scalatra DSL.

  14. type CoreStack = CorsSupport with FutureSupport with FlashMapSupport

    Permalink
  15. type CoreStackNoFlash = CorsSupport with FutureSupport

    Permalink
  16. type CoreStackNoFlashWithCsrf = CoreStackNoFlash with CsrfTokenSupport

    Permalink
  17. type CoreStackNoFlashWithXsrf = CoreStackNoFlash with XsrfTokenSupport

    Permalink
  18. type CoreStackWithCsrf = CoreStack with CsrfTokenSupport

    Permalink
  19. type CoreStackWithXsrf = CoreStack with XsrfTokenSupport

    Permalink
  20. trait CorsSupport extends Handler with Initializable

    Permalink
  21. trait CsrfTokenSupport extends AnyRef

    Permalink

    Provides cross-site request forgery protection.

    Provides cross-site request forgery protection.

    Adds a before filter. If a request is determined to be forged, the handleForgery() hook is invoked. Otherwise, a token for the next request is prepared with prepareCsrfToken.

  22. trait DynamicScope extends RequestResponseScope

    Permalink

    The Scalatra DSL requires a dynamically scoped request and response.

    The Scalatra DSL requires a dynamically scoped request and response. This trick is explained in greater detail in Gabriele Renzi's blog post about Step, out of which Scalatra grew:

    http://www.riffraff.info/2009/4/11/step-a-scala-web-picoframework

  23. type ErrorHandler = PartialFunction[Throwable, Any]

    Permalink
  24. case class ExtensionMethod(name: String) extends HttpMethod with Product with Serializable

    Permalink
  25. type FileUploadStack = FutureSupport with FlashMapSupport with FileUploadSupport

    Permalink
  26. class FlashMap extends MutableMapWithIndifferentAccess[Any] with Serializable

    Permalink

    A FlashMap is the data structure used by org.scalatra.FlashMapSupport to allow passing temporary values between sequential actions.

    A FlashMap is the data structure used by org.scalatra.FlashMapSupport to allow passing temporary values between sequential actions.

    FlashMap behaves like org.scalatra.util.MapWithIndifferentAccess. By default, anything placed in the map is available to the current request and next request, and is then discarded.

    See also

    FlashMapSupport

  27. trait FlashMapSupport extends Handler

    Permalink

    Allows an action to set key-value pairs in a transient state that is accessible only to the next action and is expired immediately after that.

    Allows an action to set key-value pairs in a transient state that is accessible only to the next action and is expired immediately after that. This is especially useful when using the POST-REDIRECT-GET pattern to trace the result of an operation.

    post("/article/create") {
      // create session
      flash("notice") = "article created successfully"
      redirect("/home")
    }
    get("/home") {
      // this will access the value set in previous action
      stuff_with(flash("notice"))
    }
    See also

    FlashMap

  28. type FullCoreStack = CoreStack with FileUploadSupport

    Permalink
  29. trait FutureSupport extends AsyncSupport

    Permalink
  30. type FuturesAndFlashStack = FutureSupport with FlashMapSupport

    Permalink
  31. type FuturesAndFlashStackWithCsrf = FuturesAndFlashStack with CsrfTokenSupport

    Permalink
  32. type FuturesAndFlashStackWithXsrf = FuturesAndFlashStack with XsrfTokenSupport

    Permalink
  33. sealed trait HttpMethod extends AnyRef

    Permalink
  34. abstract class HttpVersion extends Ordered[HttpVersion]

    Permalink
  35. trait LifeCycle extends ServletApiImplicits

    Permalink
  36. case class MatchedRoute(action: Action, multiParams: MultiParams) extends Product with Serializable

    Permalink

    An action and the multi-map of route parameters to invoke it with.

  37. trait MethodOverride extends Handler with ServletApiImplicits

    Permalink

    Mixin for clients that only support a limited set of HTTP verbs.

    Mixin for clients that only support a limited set of HTTP verbs. If the request is a POST and the _method request parameter is set, the value of the _method parameter is treated as the request's method.

  38. type MultiParams = Map[String, Seq[String]]

    Permalink
  39. type Params = MultiMapHeadView[String, String] with MapWithIndifferentAccess[String]

    Permalink
  40. case class PathPattern(regex: Regex, captureGroupNames: List[String] = Nil) extends Product with Serializable

    Permalink

    A path pattern optionally matches a request path and extracts path parameters.

  41. trait PathPatternParser extends AnyRef

    Permalink

    Parses a string into a path pattern for routing.

  42. final class PathPatternRouteMatcher extends RouteMatcher

    Permalink
  43. class RailsPathPatternParser extends RegexPathPatternParser

    Permalink

    Path pattern parser based on Rack::Mount::Strexp, which is used by Rails.

  44. final class RailsRouteMatcher extends RouteMatcher with ReversibleRouteMatcher

    Permalink

    An implementation of Rails' path pattern syntax

  45. trait RegexPathPatternParser extends PathPatternParser with RegexParsers

    Permalink
  46. final class RegexRouteMatcher extends RouteMatcher

    Permalink

    A route matcher for regular expressions.

    A route matcher for regular expressions. Useful for cases that are more complex than are supported by Sinatra- or Rails-style routes.

  47. type RenderPipeline = PartialFunction[Any, Any]

    Permalink
  48. trait RequestResponseScope extends AnyRef

    Permalink
  49. trait ReversibleRouteMatcher extends AnyRef

    Permalink

    A route matcher from which a URI can be generated from route parameters.

  50. case class Route(routeMatchers: Seq[RouteMatcher] = Seq.empty, action: Action, contextPath: (HttpServletRequest) ⇒ String = _ => "", metadata: Map[Symbol, Any] = Map.empty) extends Product with Serializable

    Permalink

    A route is a set of matchers and an action.

    A route is a set of matchers and an action. A route is considered to match if all of its route matchers return Some. If a route matches, its action may be invoked. The route parameters extracted by the matchers are made available to the action.

  51. trait RouteMatcher extends RouteTransformer

    Permalink

    A route matcher is evaluated in the context it was created and returns a a (possibly empty) multi-map of parameters if the route is deemed to match.

  52. class RouteRegistry extends AnyRef

    Permalink
  53. trait RouteTransformer extends AnyRef

    Permalink
  54. trait ScalatraBase extends ScalatraContext with CoreDsl with DynamicScope with Initializable with ServletApiImplicits with ScalatraParamsImplicits with DefaultImplicitConversions with SessionSupport

    Permalink

    The base implementation of the Scalatra DSL.

    The base implementation of the Scalatra DSL. Intended to be portable to all supported backends.

  55. trait ScalatraContext extends ServletApiImplicits with SessionSupport with CookieContext

    Permalink
  56. class ScalatraException extends Exception

    Permalink
  57. trait ScalatraFilter extends Filter with ServletBase

    Permalink

    An implementation of the Scalatra DSL in a filter.

    An implementation of the Scalatra DSL in a filter. You may prefer a filter to a ScalatraServlet if:

    $ - you are sharing a URL space with another servlet or filter and want to delegate unmatched requests. This is very useful when migrating legacy applications one page or resource at a time.

    Unlike a ScalatraServlet, does not send 404 or 405 errors on non-matching routes. Instead, it delegates to the filter chain.

    If in doubt, extend ScalatraServlet instead.

    See also

    ScalatraServlet

  58. class ScalatraParams extends MultiMapHeadView[String, String] with MapWithIndifferentAccess[String]

    Permalink
  59. trait ScalatraParamsImplicits extends AnyRef

    Permalink

    Add some implicits

  60. trait ScalatraServlet extends HttpServlet with ServletBase with Initializable

    Permalink

    An implementation of the Scalatra DSL in a servlet.

    An implementation of the Scalatra DSL in a servlet. This is the recommended base trait for most Scalatra applications. Use a servlet if:

    $ - your Scalatra routes run in a subcontext of your web application. $ - you want Scalatra to have complete control of unmatched requests. $ - you think you want a filter just for serving static content with the default servlet; ScalatraServlet can do this too $ - you don't know the difference

    See also

    ScalatraFilter

  61. sealed trait Scheme extends AnyRef

    Permalink
  62. trait SessionSupport extends AnyRef

    Permalink

    This trait provides session support for stateful applications.

  63. class SinatraPathPatternParser extends RegexPathPatternParser

    Permalink

    A Sinatra-compatible route path pattern parser.

  64. final class SinatraRouteMatcher extends RouteMatcher with ReversibleRouteMatcher

    Permalink

    An implementation of Sinatra's path pattern syntax.

  65. trait SslRequirement extends Handler with ServletApiImplicits

    Permalink

    Redirects unsecured requests to the corresponding secure URL.

  66. final class StatusCodeRouteMatcher extends RouteMatcher

    Permalink
  67. class SweetCookies extends ServletApiImplicits

    Permalink
  68. trait UrlGeneratorSupport extends AnyRef

    Permalink

    Adds support for generating URIs from routes and their params.

  69. trait XsrfTokenSupport extends AnyRef

    Permalink

Value Members

  1. object Accepted

    Permalink
  2. object AlreadyReported

    Permalink
  3. object ApiFormats

    Permalink
  4. object BadGateway

    Permalink
  5. object BadRequest

    Permalink
  6. object Conflict

    Permalink
  7. object Connect extends HttpMethod with Product with Serializable

    Permalink
  8. object ContentEncoding

    Permalink
  9. object ContentNegotiation extends Serializable

    Permalink

    Defines type classes and helper methods for well known content-negotiation headers.

  10. object Cookie extends Serializable

    Permalink
  11. object CookieSupport

    Permalink
  12. object CorsSupport

    Permalink
  13. object Created

    Permalink
  14. object CsrfTokenSupport

    Permalink
  15. object Delete extends HttpMethod with Product with Serializable

    Permalink
  16. val EnvironmentKey: String

    Permalink
  17. object ExpectationFailed

    Permalink
  18. object FailedDependency

    Permalink
  19. object FlashMapSupport

    Permalink
  20. object Forbidden

    Permalink
  21. object Found

    Permalink
  22. object GatewayTimeout

    Permalink
  23. object GenerateId

    Permalink
  24. object Get extends HttpMethod with Product with Serializable

    Permalink
  25. object Gone

    Permalink
  26. object HTTPVersionNotSupported

    Permalink
  27. object Head extends HttpMethod with Product with Serializable

    Permalink
  28. object Http extends Scheme with Product with Serializable

    Permalink
  29. object Http10 extends HttpVersion

    Permalink
  30. object Http11 extends HttpVersion

    Permalink
  31. object HttpMethod

    Permalink
  32. object Https extends Scheme with Product with Serializable

    Permalink
  33. object IMUsed

    Permalink
  34. object InsufficientStorage

    Permalink
  35. object InternalServerError

    Permalink
  36. object LengthRequired

    Permalink
  37. object Locked

    Permalink
  38. object LoopDetected

    Permalink
  39. object MethodNotAllowed

    Permalink
  40. object MethodOverride

    Permalink
  41. object MovedPermanently

    Permalink
  42. val MultiParamsKey: String

    Permalink
  43. object MultiStatus

    Permalink
  44. object MultipleChoices

    Permalink
  45. object NetworkAuthenticationRequired

    Permalink
  46. object NoContent

    Permalink
  47. object NonAuthoritativeInformation

    Permalink
  48. object NotAcceptable

    Permalink
  49. object NotExtended

    Permalink
  50. object NotFound

    Permalink
  51. object NotImplemented

    Permalink
  52. object NotModified

    Permalink
  53. object Ok

    Permalink
  54. object Options extends HttpMethod with Product with Serializable

    Permalink
  55. object PartialContent

    Permalink
  56. object Patch extends HttpMethod with Product with Serializable

    Permalink
  57. object PathPatternParser

    Permalink
  58. object PaymentRequired

    Permalink
  59. object PermanentRedirect

    Permalink
  60. object Post extends HttpMethod with Product with Serializable

    Permalink
  61. object PreconditionFailed

    Permalink
  62. object PreconditionRequired

    Permalink
  63. object ProxyAuthenticationRequired

    Permalink
  64. object Put extends HttpMethod with Product with Serializable

    Permalink
  65. object RailsPathPatternParser

    Permalink
  66. object RequestEntityTooLarge

    Permalink
  67. object RequestHeaderFieldsTooLarge

    Permalink
  68. object RequestTimeout

    Permalink
  69. object RequestURITooLong

    Permalink
  70. object RequestedRangeNotSatisfiable

    Permalink
  71. object ResetContent

    Permalink
  72. object Route extends Serializable

    Permalink
  73. object RouteTransformer

    Permalink
  74. object ScalatraBase

    Permalink
  75. object ScalatraContext

    Permalink
  76. object ScalatraParamsImplicits extends ScalatraParamsImplicits with DefaultImplicitConversions

    Permalink
  77. object ScalatraServlet extends Serializable

    Permalink
  78. object SeeOther

    Permalink
  79. object ServiceUnavailable

    Permalink
  80. object SinatraPathPatternParser

    Permalink
  81. object TemporaryRedirect

    Permalink
  82. object TooManyRequests

    Permalink
  83. object Trace extends HttpMethod with Product with Serializable

    Permalink
  84. object Unauthorized

    Permalink
  85. object UnprocessableEntity

    Permalink
  86. object UnsupportedMediaType

    Permalink
  87. object UpgradeRequired

    Permalink
  88. object UriDecoder

    Permalink
  89. object UrlGenerator extends UrlGeneratorSupport

    Permalink
  90. object UseProxy

    Permalink
  91. object VariantAlsoNegotiates

    Permalink
  92. object XsrfTokenSupport

    Permalink
  93. def halt(result: ActionResult): Nothing

    Permalink
    Definition Classes
    Control
  94. def halt[T](status: Integer = null, body: T = (), headers: Map[String, String] = Map.empty)(implicit arg0: Manifest[T]): Nothing

    Permalink

    Immediately halts processing of a request.

    Immediately halts processing of a request. Can be called from either a before filter or a route.

    status

    the status to set on the response, or null to leave the status unchanged.

    body

    a result to render through the render pipeline as the body

    headers

    headers to add to the response

    Definition Classes
    Control
  95. package i18n

    Permalink
  96. def pass(): Nothing

    Permalink

    Immediately exits from the current route.

    Immediately exits from the current route.

    Definition Classes
    Control
  97. package servlet

    Permalink
  98. package util

    Permalink

Inherited from Control

Inherited from AnyRef

Inherited from Any

Ungrouped