Package jmri.server.web.spi
Class AngularRoute
- java.lang.Object
-
- jmri.server.web.spi.AngularRoute
-
public final class AngularRoute extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AngularRoute(java.lang.String when, java.lang.String template, java.lang.String controller, java.lang.String redirection)
Create an AngularJS route.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getController()
Get the AngularJS controller for the route.java.lang.String
getRedirection()
java.lang.String
getTemplate()
Get the HTML template for the route.java.lang.String
getWhen()
-
-
-
Constructor Detail
-
AngularRoute
public AngularRoute(@Nonnull java.lang.String when, @CheckForNull java.lang.String template, @CheckForNull java.lang.String controller, @CheckForNull java.lang.String redirection)
Create an AngularJS route.- Parameters:
when
- the trigger for the routetemplate
- the template loaded for the route; must be non-null if controller is non-nullcontroller
- the controller loaded for the route; must be non-null if template is non-nullredirection
- the path to redirect the route to; must be non-null if template and controller is null; must be null if template and controller is non-null- Throws:
java.lang.NullPointerException
- if when is nulljava.lang.IllegalArgumentException
- if any of the rules concerning when template, controller, and redirection must be non-null are violated
-
-
Method Detail
-
getRedirection
@CheckForNull public java.lang.String getRedirection()
-
getTemplate
@CheckForNull public java.lang.String getTemplate()
Get the HTML template for the route.- Returns:
- the template or null
-
getController
@CheckForNull public java.lang.String getController()
Get the AngularJS controller for the route.- Returns:
- the controller or null
-
-