org.apache.camel.web.resources
Class RouteResource

java.lang.Object
  extended by org.apache.camel.web.resources.CamelChildResourceSupport
      extended by org.apache.camel.web.resources.RouteResource

public class RouteResource
extends CamelChildResourceSupport

A single Camel Route which is used to implement one or more Enterprise Integration Patterns

Version:

Field Summary
static String LANGUAGE_XML
           
 
Constructor Summary
RouteResource(RoutesResource routesResource, RouteDefinition route)
           
 
Method Summary
 String getDot()
          Returns the Graphviz DOT Visualisation of this route
 String getError()
           
 String getId()
           
 String getLanguage()
          Returns the language
 RouteDefinition getRoute()
          Returns the XML or JSON representation of this route
 String getRouteDefinition()
          Returns the content of the route definition class
 RouteStatusResource getRouteStatus()
          Looks up an individual route
 String getRouteXml()
          Returns the XML text
 void postRoute(RouteDefinition routeDefinition)
          Allows a route definition to be updated
 javax.ws.rs.core.Response postRouteForm(javax.ws.rs.core.UriInfo uriInfo, String language, String body, String edited)
          Updates a route definition using form encoded data from a web form
 void postRoutes(RouteBuilder builder)
          Allows a routes builder to be updated
 javax.ws.rs.core.Response removeRoute()
          Removes this route
 void setLanguage(String language)
           
 
Methods inherited from class org.apache.camel.web.resources.CamelChildResourceSupport
getCamelContext, getContextResource, getDefaultTypeConverter, getTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LANGUAGE_XML

public static final String LANGUAGE_XML
See Also:
Constant Field Values
Constructor Detail

RouteResource

public RouteResource(RoutesResource routesResource,
                     RouteDefinition route)
Method Detail

getRoute

public RouteDefinition getRoute()
Returns the XML or JSON representation of this route


removeRoute

public javax.ws.rs.core.Response removeRoute()
Removes this route


getRouteXml

public String getRouteXml()
                   throws JAXBException
Returns the XML text

Throws:
JAXBException

getRouteDefinition

public String getRouteDefinition()
Returns the content of the route definition class


getDot

public String getDot()
              throws IOException
Returns the Graphviz DOT Visualisation of this route

Throws:
IOException

postRoute

public void postRoute(RouteDefinition routeDefinition)
               throws Exception
Allows a route definition to be updated

Throws:
Exception

postRoutes

public void postRoutes(RouteBuilder builder)
                throws Exception
Allows a routes builder to be updated

Throws:
Exception

postRouteForm

public javax.ws.rs.core.Response postRouteForm(@Context
                                               javax.ws.rs.core.UriInfo uriInfo,
                                               String language,
                                               String body,
                                               String edited)
                                        throws URISyntaxException
Updates a route definition using form encoded data from a web form

Parameters:
language - is the edited language used on this route
body - is the route definition content POSTed typically from a HTML form with the route field
edited - is a flag to show whether the route have been edited
Throws:
URISyntaxException

getLanguage

public String getLanguage()
Returns the language


setLanguage

public void setLanguage(String language)

getRouteStatus

public RouteStatusResource getRouteStatus()
Looks up an individual route


getError

public String getError()

getId

public String getId()


Apache CAMEL