C# Class Spring.Web.Support.DefaultResultWebNavigator

The default implementation of the IResultWebNavigator interface.
Inheritance: IResultWebNavigator
Mostrar archivo Open project: spring-projects/spring-net

Public Methods

Method Description
CanNavigateTo ( string destination ) : bool

Determines, whether this navigator or one of its parents can navigate to the destination specified in destination.

DefaultResultWebNavigator ( ) : System

Creates and initializes a new instance.

DefaultResultWebNavigator ( IWebNavigator parent, IDictionary initialResults, bool ignoreCase ) : System

Creates and initializes a new instance.

GetResultUri ( string resultName, object sender, object context ) : string

Returns a redirect url string that points to the Spring.Web.Support.Result.TargetPage defined by this result evaluated using this Page for expression

NavigateTo ( string destination, object sender, object context ) : void

Redirects user to a URL mapped to specified result name.

Protected Methods

Method Description
CreateResultsDictionary ( IDictionary initialResults ) : IDictionary

Create the dictionary instance to be used by this navigator component.

Implementors may override this for creating custom dictionaries.

GetResult ( string name ) : IResult

Obtain the named result instance from the Results dictionary. If necessary, the actual representation of the result will be converted to an IResult instance by this method.

HandleUnknownDestination ( string destination, object sender, object context ) : string

Handle an unknown destination.

By default, this method throws a ArgumentOutOfRangeException.

HandleUnknownResultType ( string name, object val ) : IResult

Handle an unknown result object.

By default, this method throws a TypeMismatchException.

Method Details

CanNavigateTo() public method

Determines, whether this navigator or one of its parents can navigate to the destination specified in destination.
public CanNavigateTo ( string destination ) : bool
destination string the name of the navigation destination
return bool

CreateResultsDictionary() protected method

Create the dictionary instance to be used by this navigator component.
Implementors may override this for creating custom dictionaries.
protected CreateResultsDictionary ( IDictionary initialResults ) : IDictionary
initialResults IDictionary a dictionary of intitial result mappings
return IDictionary

DefaultResultWebNavigator() public method

Creates and initializes a new instance.
public DefaultResultWebNavigator ( ) : System
return System

DefaultResultWebNavigator() public method

Creates and initializes a new instance.
public DefaultResultWebNavigator ( IWebNavigator parent, IDictionary initialResults, bool ignoreCase ) : System
parent IWebNavigator the parent of this instance. May be null.
initialResults IDictionary a dictionary of result name to result mappings. May be null.
ignoreCase bool sets, how this navigator treats case sensitivity of result names
return System

GetResult() protected method

Obtain the named result instance from the Results dictionary. If necessary, the actual representation of the result will be converted to an IResult instance by this method.
protected GetResult ( string name ) : IResult
name string
return IResult

GetResultUri() public method

Returns a redirect url string that points to the Spring.Web.Support.Result.TargetPage defined by this result evaluated using this Page for expression
public GetResultUri ( string resultName, object sender, object context ) : string
resultName string Name of the result.
sender object the instance that issued this request
context object The context to use for evaluating the SpEL expression in the Result
return string

HandleUnknownDestination() protected method

Handle an unknown destination.
By default, this method throws a ArgumentOutOfRangeException.
protected HandleUnknownDestination ( string destination, object sender, object context ) : string
destination string the destination that could not be resolved.
sender object the sender that issued the request
context object the context to be used for evaluating any dynamic parts of the destination
return string

HandleUnknownResultType() protected method

Handle an unknown result object.
By default, this method throws a TypeMismatchException.
protected HandleUnknownResultType ( string name, object val ) : IResult
name string the name of the result
val object the result instance obtained from the dictionary
return IResult

NavigateTo() public method

Redirects user to a URL mapped to specified result name.
public NavigateTo ( string destination, object sender, object context ) : void
destination string Name of the result.
sender object the instance that issued this request
context object The context to use for evaluating the SpEL expression in the Result.
return void