public.javadoc.org.spincast.plugins.routing.RedirectRuleBuilderDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
RedirectRuleBuilderDefault (org.spincast:spincast-framework 1.0.0 API)
org.spincast.plugins.routing
Class RedirectRuleBuilderDefault<R extends RequestContext<?>,W extends WebsocketContext<?>>
- java.lang.Object
-
- org.spincast.plugins.routing.RedirectRuleBuilderDefault<R,W>
-
- All Implemented Interfaces:
- RedirectRuleBuilder
public class RedirectRuleBuilderDefault<R extends RequestContext<?>,W extends WebsocketContext<?>>
extends Object
implements RedirectRuleBuilder
Default implementation for the RedirectRuleBuilder interface.
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected org.slf4j.Logger
logger
-
Constructor Summary
Constructors
Constructor and Description
RedirectRuleBuilderDefault(Router<R,W> router,
String oldPath,
SpincastRouterConfig spincastRouterConfig,
SpincastRoutingUtils spincastRoutingUtils)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
protected String
getOldPath()
protected Router<R,W>
getRouter()
protected SpincastRouterConfig
getSpincastRouterConfig()
protected SpincastRoutingUtils
getSpincastRoutingUtils()
protected boolean
isPermanently()
RedirectRuleBuilder
permanently()
The redirection will be permanent (301).
RedirectRuleBuilder
temporarily()
The redirection will be temporarily (302).
void
to(String newPathOrFullUrl)
The new path or full URL to redirect to.
-
-
Constructor Detail
-
RedirectRuleBuilderDefault
public RedirectRuleBuilderDefault(Router<R,W> router,
String oldPath,
SpincastRouterConfig spincastRouterConfig,
SpincastRoutingUtils spincastRoutingUtils)
-
Method Detail
-
getOldPath
protected String getOldPath()
-
getSpincastRouterConfig
protected SpincastRouterConfig getSpincastRouterConfig()
-
getSpincastRoutingUtils
protected SpincastRoutingUtils getSpincastRoutingUtils()
-
isPermanently
protected boolean isPermanently()
-
permanently
public RedirectRuleBuilder permanently()
Description copied from interface: RedirectRuleBuilder
The redirection will be permanent (301).
This is the default.
- Specified by:
permanently
in interface RedirectRuleBuilder
-
temporarily
public RedirectRuleBuilder temporarily()
Description copied from interface: RedirectRuleBuilder
The redirection will be temporarily (302).
- Specified by:
temporarily
in interface RedirectRuleBuilder
-
to
public void to(String newPathOrFullUrl)
Description copied from interface: RedirectRuleBuilder
The new path or full URL to redirect to.
This ends the creation of the redirection rule and
save it to the router.
- Specified by:
to
in interface RedirectRuleBuilder
Copyright © 2019. All rights reserved.