net.amullins.liftkit.routing.params

PathParam

case class PathParam[ParamType](func: PartialFunction[Boolean, Box[ParamType]], auth: (ParamType) ⇒ Boolean)(implicit paramTypeTag: scala.reflect.api.JavaUniverse.TypeTag[ParamType]) extends Product with Serializable

Abstract away the complexity of boxing/unboxing param values for locations that should be available for things like autologin. By default, a location is undefined if its value cannot be determined. When a user is not logged in, the param's value may not be available because we use the current user's session information for data retrieval. We work around this by providing a simplified data lookup for non-logged in users and then authenticate the data once the user has logged in.

The flip-side to this is that there is an additional method that must be included on the snippets that use the location's parameter(s).

func

Function for retrieving the value of the Param based on the current user's authentication status

auth

Check that user has access to the param value.

See also

net.amullins.liftkit.routing.params.PathParamAuth

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PathParam
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PathParam(func: PartialFunction[Boolean, Box[ParamType]], auth: (ParamType) ⇒ Boolean)(implicit paramTypeTag: scala.reflect.api.JavaUniverse.TypeTag[ParamType])

    func

    Function for retrieving the value of the Param based on the current user's authentication status

    auth

    Check that user has access to the param value.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. val auth: (ParamType) ⇒ Boolean

    Check that user has access to the param value.

  6. def boxed: Box[Box[PathParam[ParamType]]]

    This is for use with Menu.param(s) parser If the value is NOT Full, the location will be unavailable

  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. val func: PartialFunction[Boolean, Box[ParamType]]

    Function for retrieving the value of the Param based on the current user's authentication status

  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def get_?: Box[ParamType]

    Performs authentication on the value according to the provided auth function

    Performs authentication on the value according to the provided auth function

    returns

    The boxed value Full, if accessible | Empty, if not

  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. implicit val paramTypeTag: scala.reflect.api.JavaUniverse.TypeTag[ParamType]

  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  19. val value: Box[ParamType]

    This is the *actual* value of the param

  20. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped