Packages

p

org

scalatra

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
  2. case class ActionResult (status: ResponseStatus, body: Any, headers: Map[String, String]) extends Product with Serializable
  3. trait ApiFormats extends ScalatraBase

    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
  5. final class BooleanBlockRouteMatcher extends RouteMatcher

    A route matcher on a boolean condition.

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

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

    Represents the value of a content negotiation header.

  7. trait ContentEncoding extends AnyRef

    Represents an HTTP content encoding.

  8. trait ContentEncodingSupport extends Handler

    Scalatra handler for gzipped responses.

  9. type ContentTypeInferrer = PartialFunction[Any, String]
  10. trait Control extends AnyRef

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

  11. case class Cookie (name: String, value: String)(implicit cookieOptions: CookieOptions = CookieOptions()) extends Product with Serializable
  12. trait CookieContext extends AnyRef
  13. 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
  14. trait CoreDsl extends Handler with Control with ScalatraContext with ServletApiImplicits

    The core Scalatra DSL.

  15. type CoreStack = CorsSupport with FutureSupport with FlashMapSupport
  16. type CoreStackNoFlash = CorsSupport with FutureSupport
  17. type CoreStackNoFlashWithCsrf = CoreStackNoFlash with CsrfTokenSupport
  18. type CoreStackNoFlashWithXsrf = CoreStackNoFlash with XsrfTokenSupport
  19. type CoreStackWithCsrf = CoreStack with CsrfTokenSupport
  20. type CoreStackWithXsrf = CoreStack with XsrfTokenSupport
  21. trait CorsSupport extends Handler with Initializable
  22. trait CsrfTokenSupport extends AnyRef

    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.

  23. trait DynamicScope extends RequestResponseScope

    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

  24. type ErrorHandler = PartialFunction[Throwable, Any]
  25. case class ExtensionMethod (name: String) extends HttpMethod with Product with Serializable
  26. type FileUploadStack = FutureSupport with FlashMapSupport with FileUploadSupport
  27. class FlashMap extends MutableMapWithIndifferentAccess[Any] with Serializable

    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

  28. trait FlashMapSupport extends Handler

    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

  29. type FullCoreStack = CoreStack with FileUploadSupport
  30. trait FutureSupport extends AsyncSupport
  31. type FuturesAndFlashStack = FutureSupport with FlashMapSupport
  32. type FuturesAndFlashStackWithCsrf = FuturesAndFlashStack with CsrfTokenSupport
  33. type FuturesAndFlashStackWithXsrf = FuturesAndFlashStack with XsrfTokenSupport
  34. trait Handler extends AnyRef

    A Handler is the Scalatra abstraction for an object that operates on a request/response pair.

  35. sealed trait HttpMethod extends AnyRef
  36. abstract class HttpVersion extends Ordered[HttpVersion]
  37. trait Initializable extends AnyRef

    Trait representing an object that can't be fully initialized by its constructor.

    Trait representing an object that can't be fully initialized by its constructor. Useful for unifying the initialization process of an HttpServlet and a Filter.

  38. trait LifeCycle extends ServletApiImplicits
  39. case class MatchedRoute (action: Action, multiParams: MultiParams) extends Product with Serializable

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

  40. trait MethodOverride extends Handler with ServletApiImplicits

    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.

  41. type MultiParams = MultiMap
  42. type Params = MultiMapHeadView[String, String] with MapWithIndifferentAccess[String]
  43. case class PathPattern (regex: Regex, captureGroupNames: List[String] = Nil) extends Product with Serializable

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

  44. trait PathPatternParser extends AnyRef

    Parses a string into a path pattern for routing.

  45. final class PathPatternRouteMatcher extends RouteMatcher
  46. class RailsPathPatternParser extends RegexPathPatternParser

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

  47. final class RailsRouteMatcher extends RouteMatcher with ReversibleRouteMatcher

    An implementation of Rails' path pattern syntax

  48. trait RegexPathPatternParser extends PathPatternParser with RegexParsers
  49. final class RegexRouteMatcher extends RouteMatcher

    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.

  50. type RenderPipeline = PartialFunction[Any, Any]
  51. trait RequestResponseScope extends AnyRef
  52. case class ResponseStatus (code: Int, message: String) extends Ordered[ResponseStatus] with Product with Serializable
  53. trait ReversibleRouteMatcher extends AnyRef

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

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

    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.

  55. trait RouteMatcher extends RouteTransformer

    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.

  56. class RouteRegistry extends AnyRef
  57. trait RouteTransformer extends AnyRef
  58. trait ScalatraBase extends ScalatraContext with CoreDsl with DynamicScope with Initializable with ServletApiImplicits with ScalatraParamsImplicits with DefaultImplicitConversions with SessionSupport

    The base implementation of the Scalatra DSL.

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

  59. trait ScalatraContext extends ServletApiImplicits with SessionSupport with CookieContext
  60. class ScalatraException extends Exception
  61. trait ScalatraFilter extends Filter with ServletBase

    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

  62. class ScalatraParams extends MultiMapHeadView[String, String] with MapWithIndifferentAccess[String]
  63. trait ScalatraParamsImplicits extends AnyRef

    Add some implicits

  64. trait ScalatraServlet extends HttpServlet with ServletBase with Initializable

    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

  65. sealed trait Scheme extends AnyRef
  66. trait SessionSupport extends AnyRef

    This trait provides session support for stateful applications.

  67. class SinatraPathPatternParser extends RegexPathPatternParser

    A Sinatra-compatible route path pattern parser.

  68. final class SinatraRouteMatcher extends RouteMatcher with ReversibleRouteMatcher

    An implementation of Sinatra's path pattern syntax.

  69. trait SslRequirement extends Handler with ServletApiImplicits

    Redirects unsecured requests to the corresponding secure URL.

  70. final class StatusCodeRouteMatcher extends RouteMatcher
  71. class SweetCookies extends ServletApiImplicits
  72. trait UrlGeneratorSupport extends AnyRef

    Adds support for generating URIs from routes and their params.

  73. trait XsrfTokenSupport extends AnyRef
  74. trait CookieSupport extends AnyRef
    Annotations
    @deprecated
    Deprecated

    (Since version 2.2) You can remove this mixin, it's included in core by default

  75. type GZipSupport = ContentEncodingSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) Use ContentEncodingSupport, GZipSupport will be removed eventually

  76. trait GetResponseStatusSupport extends AnyRef
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.0) No longer necessary after upgrade to Servlet 3.0

  77. type ScalatraKernel = ServletBase
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.0) Use org.scalatra.servlet.ServletBase if you depend on the Servlet API, or org.scalatra.ScalatraBase if you don't.

  78. trait TypedParamSupport extends ScalatraBase
    Annotations
    @deprecated
    Deprecated

    (Since version 2.2) This got folded into core, so you can remove the TypeParamSupport trait safely.

  79. trait UrlSupport extends AnyRef

    Provides utility methods for the creation of URL strings.

    Provides utility methods for the creation of URL strings. Supports context-relative and session-aware URLs. Should behave similarly to JSTL's <c:url> tag.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.0) This functionality has been subsumed by ScalatraBase.

Value Members

  1. val EnvironmentKey: String
  2. val MultiParamsKey: String
  3. def halt(result: ActionResult): Nothing
    Definition Classes
    Control
  4. def halt[T](status: Integer = null, body: T = (), headers: Map[String, String] = Map.empty, reason: String = null)(implicit arg0: Manifest[T]): Nothing

    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

    reason

    the HTTP status reason to set, or null to leave unchanged.

    Definition Classes
    Control
  5. def pass(): Nothing

    Immediately exits from the current route.

    Immediately exits from the current route.

    Definition Classes
    Control
  6. object Accepted
  7. object AlreadyReported
  8. object ApiFormats
  9. object BadGateway
  10. object BadRequest
  11. object Conflict
  12. object Connect extends HttpMethod with Product with Serializable
  13. object Conneg extends Serializable

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

  14. object ContentEncoding
  15. object Cookie extends Serializable
  16. object CookieSupport
  17. object CorsSupport
  18. object Created
  19. object CsrfTokenSupport
  20. object Delete extends HttpMethod with Product with Serializable
  21. object ExpectationFailed
  22. object FailedDependency
  23. object FlashMapSupport
  24. object Forbidden
  25. object Found
  26. object GatewayTimeout
  27. object GenerateId
  28. object Get extends HttpMethod with Product with Serializable
  29. object Gone
  30. object HTTPVersionNotSupported
  31. object Head extends HttpMethod with Product with Serializable
  32. object Http extends Scheme with Product with Serializable
  33. object Http10 extends HttpVersion
  34. object Http11 extends HttpVersion
  35. object HttpMethod
  36. object Https extends Scheme with Product with Serializable
  37. object IMUsed
  38. object InsufficientStorage
  39. object InternalServerError
  40. object LengthRequired
  41. object Locked
  42. object LoopDetected
  43. object MethodNotAllowed
  44. object MethodOverride
  45. object MovedPermanently
  46. object MultiStatus
  47. object MultipleChoices
  48. object NetworkAuthenticationRequired
  49. object NoContent
  50. object NonAuthoritativeInformation
  51. object NotAcceptable
  52. object NotExtended
  53. object NotFound
  54. object NotImplemented
  55. object NotModified
  56. object Ok
  57. object Options extends HttpMethod with Product with Serializable
  58. object PartialContent
  59. object Patch extends HttpMethod with Product with Serializable
  60. object PathPatternParser
  61. object PaymentRequired
  62. object PermanentRedirect
  63. object Post extends HttpMethod with Product with Serializable
  64. object PreconditionFailed
  65. object PreconditionRequired
  66. object ProxyAuthenticationRequired
  67. object Put extends HttpMethod with Product with Serializable
  68. object RailsPathPatternParser
  69. object RequestEntityTooLarge
  70. object RequestHeaderFieldsTooLarge
  71. object RequestTimeout
  72. object RequestURITooLong
  73. object RequestedRangeNotSatisfiable
  74. object ResetContent
  75. object ResponseStatus extends Serializable
  76. object Route extends Serializable
  77. object RouteTransformer
  78. object ScalatraBase
  79. object ScalatraContext
  80. object ScalatraKernel
  81. object ScalatraParamsImplicits extends ScalatraParamsImplicits with DefaultImplicitConversions
  82. object ScalatraServlet extends Serializable
  83. object SeeOther
  84. object ServiceUnavailable
  85. object SinatraPathPatternParser
  86. object TemporaryRedirect
  87. object TooManyRequests
  88. object Trace extends HttpMethod with Product with Serializable
  89. object Unauthorized
  90. object UnprocessableEntity
  91. object UnsupportedMediaType
  92. object UpgradeRequired
  93. object UriDecoder
  94. object UrlGenerator extends UrlGeneratorSupport
  95. object UseProxy
  96. object VariantAlsoNegotiates
  97. object XsrfTokenSupport

Inherited from Control

Inherited from AnyRef

Inherited from Any

Ungrouped