org.scalatra.scalate

ScalateI18nSupport

trait ScalateI18nSupport extends ScalateSupport with I18nSupport

linear super types: I18nSupport, ScalateSupport, ServletBase, SessionSupport, ServletHandler, ScalatraBase, Initializable, DynamicScope, CoreDsl, Control, Handler, AnyRef, Any
self type: ScalateI18nSupport with ScalatraServlet with CookieSupport
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ScalateI18nSupport
  2. I18nSupport
  3. ScalateSupport
  4. ServletBase
  5. SessionSupport
  6. ServletHandler
  7. ScalatraBase
  8. Initializable
  9. DynamicScope
  10. CoreDsl
  11. Control
  12. Handler
  13. AnyRef
  14. Any
Visibility
  1. Public
  2. All
Impl.
  1. Concrete
  2. Abstract

Type Members

  1. type ApplicationContextT = ServletApplicationContext

    definition classes: ServletBase → Initializable → CoreDsl
  2. type ConfigT <: AnyRef {...}

    attributes: abstract
    definition classes: ServletBase → Initializable
  3. type RequestT = ServletRequest

    definition classes: ServletHandler → Handler
  4. type ResponseT = ServletResponse

    definition classes: ServletHandler → Handler
  5. trait ScalatraTemplateEngine extends AnyRef

    A TemplateEngine integrated with Scalatra.

  6. type SessionT = ServletSession

    definition classes: ServletBase → SessionSupport

Value Members

  1. def != (arg0: AnyRef) : Boolean

    attributes: final
    definition classes: AnyRef
  2. def != (arg0: Any) : Boolean

    o != arg0 is the same as !(o == (arg0)).

    o != arg0 is the same as !(o == (arg0)).

    arg0

    the object to compare against this object for dis-equality.

    returns

    false if the receiver object is equivalent to the argument; true otherwise.

    attributes: final
    definition classes: Any
  3. def ## () : Int

    attributes: final
    definition classes: AnyRef → Any
  4. def $asInstanceOf [T0] () : T0

    attributes: final
    definition classes: AnyRef
  5. def $isInstanceOf [T0] () : Boolean

    attributes: final
    definition classes: AnyRef
  6. def == (arg0: AnyRef) : Boolean

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    attributes: final
    definition classes: AnyRef
  7. def == (arg0: Any) : Boolean

    o == arg0 is the same as o.equals(arg0).

    o == arg0 is the same as o.equals(arg0).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    attributes: final
    definition classes: Any
  8. val _params : MultiMapHeadView[String, String] with MapWithIndifferentAccess[String]

    attributes: protected
    definition classes: ScalatraBase
  9. def _request : DynamicVariable[RequestT]

    attributes: protected
    definition classes: DynamicScope
      deprecated:
    1. Do not invoke directly. Use withRequest to change the binding, or request to get the value

  10. def _response : DynamicVariable[ResponseT]

    attributes: protected
    definition classes: DynamicScope
      deprecated:
    1. Do not invoke directly. Use withRequest to change the binding, or response to get the value

  11. def addRoute (verb: String, transformers: Seq[RouteTransformer], action: ⇒ Any) : Route

    attributes: protected[scalatra]
    definition classes: ScalatraBase
      deprecated:
    1. Use addRoute(HttpMethod, Seq[RouteMatcher], =>Any)

  12. def addRoute (method: HttpMethod, transformers: Seq[RouteTransformer], action: ⇒ Any) : Route

    attributes: protected
    definition classes: ScalatraBase
  13. def addSessionId (uri: String) : String

    definition classes: ServletBase → ScalatraBase
  14. def addStatusRoute (codes: Range, action: ⇒ Any) : Unit

    attributes: protected[scalatra]
    definition classes: ScalatraBase
  15. def after (transformers: RouteTransformer*)(fun: ⇒ Any) : Unit

    definition classes: ScalatraBase → CoreDsl
  16. def afterAll (block: ⇒ Any) : Unit

    attributes: final
    definition classes: CoreDsl
      deprecated:
    1. Use after() { ... }

  17. def afterSome (transformers: RouteTransformer*)(block: ⇒ Any) : Unit

    attributes: final
    definition classes: CoreDsl
      deprecated:
    1. Use after(RouteTransformer*) { ... }

  18. def applicationContext : ApplicationContextT

    definition classes: ScalatraBase → CoreDsl
  19. def asInstanceOf [T0] : T0

    This method is used to cast the receiver object to be of type T0.

    This method is used to cast the receiver object to be of type T0.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expressionList(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested typed.

    returns

    the receiver object.

    attributes: final
    definition classes: Any
  20. def before (transformers: RouteTransformer*)(fun: ⇒ Any) : Unit

    definition classes: ScalatraBase → CoreDsl
  21. def beforeAll (block: ⇒ Any) : Unit

    attributes: final
    definition classes: CoreDsl
      deprecated:
    1. Use before() { ... }

  22. def beforeSome (transformers: RouteTransformer*)(block: ⇒ Any) : Unit

    attributes: final
    definition classes: CoreDsl
      deprecated:
    1. Use before(RouteTransformer*) { ... }

  23. implicit def booleanBlock2RouteMatcher (block: ⇒ Boolean) : RouteMatcher

    attributes: protected implicit
    definition classes: ScalatraBase
  24. def clone () : AnyRef

    This method creates and returns a copy of the receiver object.

    This method creates and returns a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    attributes: protected[lang]
    definition classes: AnyRef
  25. implicit def configWrapper (config: ConfigT) : Config {...}

    attributes: protected implicit
    definition classes: ServletBase → Initializable
  26. def contentType : String

    definition classes: CoreDsl
  27. def contentTypeInferrer : ContentTypeInferrer

    attributes: protected
    definition classes: ScalatraBase
  28. def contentType_= (contentType: String) : Unit

    definition classes: CoreDsl
  29. def contextPath : String

    attributes: protected
    definition classes: ScalatraBase
  30. def createRenderContext (req: HttpServletRequest = ..., resp: HttpServletResponse = ..., out: PrintWriter = ...) : RenderContext

    Added "messages" into the template context so it can be accessed like: #{messages("hello")}

    Added "messages" into the template context so it can be accessed like: #{messages("hello")}

    attributes: protected
    definition classes: ScalateI18nSupportScalateSupport
  31. def createTemplateEngine (config: ConfigT) : TemplateEngine

    Creates the templateEngine from the config.

    Creates the templateEngine from the config. There is little reason to override this unless you have created a ScalatraKernel extension outside an HttpServlet or Filter.

    attributes: protected
    definition classes: ScalateSupport
  32. val defaultCharacterEncoding : String

    attributes: protected
    definition classes: ScalatraBase
  33. def defaultIndexName : String

    The default index page when the path is a directory.

    The default index page when the path is a directory.

    attributes: protected
    definition classes: ScalateSupport
  34. def defaultLayoutPath : List[String]

    The default path to search for templates.

    The default path to search for templates. Left as a def so it can be read from the servletContext in initialize, but you probably want a constant.

    Defaults to: - /WEB-INF/views (recommended) - /WEB-INF/scalate/templates (used by previous Scalatra quickstarts)

    attributes: protected
    definition classes: ScalateSupport
  35. def defaultTemplateFormat : String

    The default template format.

    The default template format.

    attributes: protected
    definition classes: ScalateSupport
  36. def defaultTemplatePath : List[String]

    The default path to search for templates.

    The default path to search for templates. Left as a def so it can be read from the servletContext in initialize, but you probably want a constant.

    Defaults to: - /WEB-INF/views (recommended) - /WEB-INF/scalate/templates (used by previous Scalatra quickstarts)

    attributes: protected
    definition classes: ScalateSupport
  37. def delete (transformers: RouteTransformer*)(action: ⇒ Any) : Route

    definition classes: ScalatraBase → CoreDsl
  38. var doMethodNotAllowed : (Set[HttpMethod]) ⇒ Any

    attributes: protected
    definition classes: ScalatraBase
  39. val doNotFound : Action

    attributes: protected abstract
    definition classes: ScalatraBase
  40. implicit def ensureServletRequest (request: HttpServletRequest) : ServletRequest

    attributes: protected implicit
    definition classes: ServletBase
      deprecated:
    1. Remove references to HttpServletRequest from Scalatra apps

  41. implicit def ensureServletResponse (response: HttpServletResponse) : ServletResponse

    attributes: protected implicit
    definition classes: ServletBase
      deprecated:
    1. Remove references to HttpServletResponse from Scalatra apps

  42. def environment : String

    definition classes: ScalatraBase
  43. def eq (arg0: AnyRef) : Boolean

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

    The eq method implements an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation] on non-null instances of AnyRef: * It is reflexive: for any non-null instance x of type AnyRef, x.eq(x) returns true. * It is symmetric: for any non-null instances x and y of type AnyRef, x.eq(y) returns true if and only if y.eq(x) returns true. * It is transitive: for any non-null instances x, y, and z of type AnyRef if x.eq(y) returns true and y.eq(z) returns true, then x.eq(z) returns true.

    Additionally, the eq method has three other properties. * It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false. * For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false. * null.eq(null) returns true.

    When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

    arg0

    the object to compare against this object for reference equality.

    returns

    true if the argument is a reference to the receiver object; false otherwise.

    attributes: final
    definition classes: AnyRef
  44. def equals (arg0: Any) : Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    The default implementations of this method is an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation]: * It is reflexive: for any instance x of type Any, x.equals(x) should return true. * It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true. * It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

    If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same scala.Int (o1.hashCode.equals(o2.hashCode)).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    definition classes: AnyRef → Any
  45. def error (handler: ErrorHandler) : Unit

    definition classes: ScalatraBase → CoreDsl
  46. var errorHandler : ErrorHandler

    attributes: protected
    definition classes: ScalatraBase
  47. def executeRoutes () : Unit

    attributes: protected
    definition classes: ScalatraBase
  48. def finalize () : Unit

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

    The details of when and if the finalize method are invoked, as well as the interaction between finalizeand non-local returns and exceptions, are all platform dependent.

    attributes: protected[lang]
    definition classes: AnyRef
  49. def findTemplate (path: String, extensionSet: Set[String] = ...) : Option[String]

    Finds a template for a path.

    Finds a template for a path. Delegates to a TemplateFinder, and if that fails, tries again with /defaultIndexName appended.

    attributes: protected
    definition classes: ScalateSupport
  50. def get (transformers: RouteTransformer*)(action: ⇒ Any) : Route

    definition classes: ScalatraBase → CoreDsl
  51. def getClass () : java.lang.Class[_]

    Returns a representation that corresponds to the dynamic class of the receiver object.

    Returns a representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    attributes: final
    definition classes: AnyRef
  52. def halt [T] (status: Integer, body: T, headers: Map[String, String], reason: String)(implicit arg0: Manifest[T]) : Nothing

    definition classes: Control
  53. def handle (req: HttpServletRequest, res: HttpServletResponse) : Unit

    definition classes: ScalateSupport → ServletBase
  54. def handle (request: RequestT, response: ResponseT) : Unit

    definition classes: ServletBase → ScalatraBase → Handler
  55. def hashCode () : Int

    Returns a hash code value for the object.

    Returns a hash code value for the object.

    The default hashing algorithm is platform dependent.

    Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

    returns

    the hash code value for the object.

    definition classes: AnyRef → Any
  56. def initParameter (name: String) : Option[String]

    definition classes: ScalatraBase
  57. def initialize (config: ConfigT) : Unit

    definition classes: ScalateSupport → ScalatraBase → Initializable
  58. def invoke (matchedRoute: MatchedRoute) : Option[Any]

    attributes: protected
    definition classes: ScalatraBase
  59. def isDevelopmentMode : Boolean

    definition classes: ScalatraBase
  60. def isInstanceOf [T0] : Boolean

    This method is used to test whether the dynamic type of the receiver object is T0.

    This method is used to test whether the dynamic type of the receiver object is T0.

    Note that the test result of the test is modulo Scala's erasure semantics. Therefore the expression1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested typed.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

    attributes: final
    definition classes: Any
  61. def isScalateErrorPageEnabled : Boolean

    Flag whether the Scalate error page is enabled.

    Flag whether the Scalate error page is enabled. If true, uncaught exceptions will be caught and rendered by the Scalate error page.

    The default is true.

    attributes: protected
    definition classes: ScalateSupport
  62. def jade (path: String, attributes: (String, Any)*) : String

    Convenience method for layoutTemplateAs("jade").

    Convenience method for layoutTemplateAs("jade").

    attributes: protected
    definition classes: ScalateSupport
  63. def layoutTemplate (path: String, attributes: (String, Any)*) : String

    Finds and renders a template with the current layout strategy, looking for all known extensions, returning the result.

    Finds and renders a template with the current layout strategy, looking for all known extensions, returning the result.

    path

    The path of the template, passed to findTemplate.

    attributes

    Attributes to path to the render context. Disable layouts by passing layout -> "".

    attributes: protected
    definition classes: ScalateSupport
  64. def layoutTemplateAs (ext: Set[String])(path: String, attributes: (String, Any)*) : String

    Finds and renders a template with the current layout strategy, returning the result.

    Finds and renders a template with the current layout strategy, returning the result.

    ext

    The extensions to look for a template.

    path

    The path of the template, passed to findTemplate.

    attributes

    Attributes to path to the render context. Disable layouts by passing layout -> "".

    attributes: protected
    definition classes: ScalateSupport
  65. var locale : Locale

    definition classes: I18nSupport
  66. var messages : Messages

    definition classes: I18nSupport
  67. def methodNotAllowed (f: (Set[HttpMethod]) ⇒ Any) : Unit

    definition classes: ScalatraBase → CoreDsl
  68. def multiParams : MultiParams

    definition classes: ScalatraBase → CoreDsl
  69. def mustache (path: String, attributes: (String, Any)*) : String

    Convenience method for layoutTemplateAs("mustache").

    Convenience method for layoutTemplateAs("mustache").

    attributes: protected
    definition classes: ScalateSupport
  70. def ne (arg0: AnyRef) : Boolean

    o.ne(arg0) is the same as !(o.eq(arg0)).

    o.ne(arg0) is the same as !(o.eq(arg0)).

    arg0

    the object to compare against this object for reference dis-equality.

    returns

    false if the argument is not a reference to the receiver object; true otherwise.

    attributes: final
    definition classes: AnyRef
  71. def notFound (fun: ⇒ Any) : Unit

    definition classes: ScalatraBase → CoreDsl
  72. def notify () : Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    attributes: final
    definition classes: AnyRef
  73. def notifyAll () : Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    attributes: final
    definition classes: AnyRef
  74. def options (transformers: RouteTransformer*)(action: ⇒ Any) : Route

    definition classes: ScalatraBase → CoreDsl
  75. def params : MultiMapHeadView[String, String] with MapWithIndifferentAccess[String]

    definition classes: ScalatraBase → CoreDsl
  76. def pass () : Nothing

    definition classes: Control
  77. def patch (transformers: RouteTransformer*)(action: ⇒ Any) : Route

    definition classes: ScalatraBase → CoreDsl
  78. implicit def pathPatternParser2RouteMatcher (pattern: PathPattern) : RouteMatcher

    attributes: protected implicit
    definition classes: ScalatraBase
  79. def post (transformers: RouteTransformer*)(action: ⇒ Any) : Route

    definition classes: ScalatraBase → CoreDsl
  80. def put (transformers: RouteTransformer*)(action: ⇒ Any) : Route

    definition classes: ScalatraBase → CoreDsl
  81. def redirect (uri: String) : Unit

    definition classes: CoreDsl
  82. implicit def regex2RouteMatcher (regex: Regex) : RouteMatcher

    attributes: protected implicit
    definition classes: ScalatraBase
  83. def removeRoute (method: String, route: Route) : Unit

    attributes: protected
    definition classes: ScalatraBase
  84. def removeRoute (method: HttpMethod, route: Route) : Unit

    attributes: protected
    definition classes: ScalatraBase
  85. def renderHaltException (e: HaltException) : Unit

    attributes: protected
    definition classes: ScalatraBase
  86. def renderPipeline : RenderPipeline

    attributes: protected
    definition classes: ScalatraBase
  87. def renderResponse (actionResult: Any) : Unit

    attributes: protected
    definition classes: ScalatraBase
  88. def renderResponseBody (actionResult: Any) : Unit

    attributes: protected
    definition classes: ScalatraBase
  89. def renderTemplate (path: String, attributes: (String, Any)*) : Unit

    Creates a render context and renders directly to that.

    Creates a render context and renders directly to that. No template search is performed, and the layout strategy is circumvented. Clients are urged to consider layoutTemplate instead.

    definition classes: ScalateSupport
      deprecated:
    1. not idiomatic Scalate; consider layoutTemplate instead

  90. implicit def request : RequestT

    attributes: implicit
    definition classes: DynamicScope
  91. def requestPath : String

    attributes: abstract
    definition classes: ScalatraBase
  92. def requestWithMethod (req: RequestT, m: HttpMethod) : ServletRequest

    attributes: protected
    definition classes: ServletBase
  93. implicit def response : ResponseT

    attributes: implicit
    definition classes: DynamicScope
  94. def routeBasePath : String

    attributes: protected abstract
    definition classes: ScalatraBase
  95. lazy val routes : RouteRegistry

    attributes: protected
    definition classes: ScalatraBase
  96. def runFilters (filters: Traversable[Route]) : Unit

    attributes: protected
    definition classes: ScalatraBase
  97. def runRoutes (routes: Traversable[Route]) : Stream[Any]

    attributes: protected
    definition classes: ScalatraBase
  98. def scaml (path: String, attributes: (String, Any)*) : String

    Convenience method for layoutTemplateAs("scaml").

    Convenience method for layoutTemplateAs("scaml").

    attributes: protected
    definition classes: ScalateSupport
  99. def servletContext : ApplicationContextT

    definition classes: CoreDsl
      deprecated:
    1. Use applicationContext instead

  100. implicit def session : SessionT

    attributes: implicit
    definition classes: ServletBase → SessionSupport
  101. implicit def sessionOption : Option[SessionT]

    attributes: implicit
    definition classes: ServletBase → SessionSupport
  102. def ssp (path: String, attributes: (String, Any)*) : String

    Convenience method for layoutTemplateAs("ssp").

    Convenience method for layoutTemplateAs("ssp").

    attributes: protected
    definition classes: ScalateSupport
  103. def status : Int

    definition classes: CoreDsl
  104. def status (code: Int) : Unit

    definition classes: CoreDsl
      deprecated:
    1. Use status_=(Int) instead

  105. def status_= (code: Int) : Unit

    definition classes: CoreDsl
  106. implicit def string2RouteMatcher (path: String) : RouteMatcher

    attributes: protected implicit
    definition classes: ScalatraBase
  107. def synchronized [T0] (arg0: T0) : T0

    attributes: final
    definition classes: AnyRef
  108. def templateAttributes : Map[String, Any]

    A request-scoped map of attributes to pass to the template.

    A request-scoped map of attributes to pass to the template. This map will be set to any render context created with the createRenderContextmethod.

    attributes: protected
    definition classes: ScalateSupport
  109. var templateEngine : TemplateEngine

    The template engine used by the methods in this support class.

    The template engine used by the methods in this support class. It provides a lower-level interface to Scalate and may be used directly to circumvent the conventions imposed by the helpers in this class. For instance, paths passed directly to the template engine are not run through findTemplate.

    attributes: protected[scalatra]
    definition classes: ScalateSupport
  110. def toString () : String

    Returns a string representation of the object.

    Returns a string representation of the object.

    The default representation is platform dependent.

    returns

    a string representation of the object.

    definition classes: AnyRef → Any
  111. def trap (codes: Range)(block: ⇒ Any) : Unit

    definition classes: ScalatraBase → CoreDsl
  112. def trap (code: Int)(block: ⇒ Any) : Unit

    definition classes: CoreDsl
  113. def url (path: String, params: Iterable[(String, Any)]) : String

    definition classes: ScalatraBase
  114. var userLocales : Array[Locale]

    definition classes: I18nSupport
  115. def wait () : Unit

    attributes: final
    definition classes: AnyRef
  116. def wait (arg0: Long, arg1: Int) : Unit

    attributes: final
    definition classes: AnyRef
  117. def wait (arg0: Long) : Unit

    attributes: final
    definition classes: AnyRef
  118. def withRequest [A] (request: RequestT)(f: ⇒ A) : A

    attributes: protected
    definition classes: DynamicScope
  119. def withRequestResponse [A] (request: RequestT, response: ResponseT)(f: ⇒ A) : A

    attributes: protected
    definition classes: DynamicScope
  120. def withResponse [A] (response: ResponseT)(f: ⇒ A) : A

    attributes: protected
    definition classes: DynamicScope
  121. def withRouteMultiParams [S] (matchedRoute: Option[MatchedRoute])(thunk: ⇒ S) : S

    attributes: protected
    definition classes: ScalatraBase

Inherited from I18nSupport

Inherited from ScalateSupport

Inherited from ServletBase

Inherited from SessionSupport

Inherited from ServletHandler

Inherited from ScalatraBase

Inherited from Initializable

Inherited from DynamicScope

Inherited from CoreDsl

Inherited from Control

Inherited from Handler

Inherited from AnyRef

Inherited from Any