Examples of RouteType


Examples of lineage2.gameserver.templates.spawn.WalkerRouteTemplate.RouteType

    {
      Element routeElement = routeIterator.next();
      if (routeElement.getName().equalsIgnoreCase("route"))
      {
        int npcId = Integer.parseInt(routeElement.attributeValue("npcId"));
        RouteType type = RouteType.valueOf(routeElement.attributeValue("type"));
        long baseDelay = Long.parseLong(routeElement.attributeValue("delay"));
        boolean isRunning = Boolean.parseBoolean(routeElement.attributeValue("isRunning"));
        int walkRange = Integer.parseInt(routeElement.attributeValue("walkRange"));
        WalkerRouteTemplate template = new WalkerRouteTemplate(npcId, baseDelay, type, isRunning, walkRange);
        for (Iterator<Element> subIterator = routeElement.elementIterator(); subIterator.hasNext();)
View Full Code Here

Examples of models.transit.RouteType

    public static void getRouteType(Long id) {
        try {
            if(id != null)
            {
              RouteType routeType = RouteType.findById(id);
                if(routeType != null)
                    renderJSON(Api.toJson(routeType, false));
                else
                    notFound();
            }
View Full Code Here

Examples of models.transit.RouteType

        }

    }

    public static void createRouteType() {
      RouteType routeType;

        try {
            routeType = mapper.readValue(params.get("body"), RouteType.class);

            routeType.save();
            renderJSON(Api.toJson(routeType, false));
        } catch (Exception e) {
            e.printStackTrace();
            badRequest();
        }
View Full Code Here

Examples of models.transit.RouteType

        }
    }


    public static void updateRouteType() {
      RouteType routeType;

        try {
          routeType = mapper.readValue(params.get("body"), RouteType.class);

            if(routeType.id == null ||RouteType.findById(routeType.id) == null)
                badRequest();

       
            RouteType updatedRouteType = RouteType.em().merge(routeType);
            updatedRouteType.save();

            renderJSON(Api.toJson(updatedRouteType, false));
        } catch (Exception e) {
            e.printStackTrace();
            badRequest();
View Full Code Here

Examples of models.transit.RouteType

    public static void deleteRouteType(Long id) {
        if(id == null)
            badRequest();

        RouteType routeType = RouteType.findById(id);

        if(routeType == null)
            badRequest();

        routeType.delete();

        ok();
    }
View Full Code Here

Examples of models.transit.RouteType

      }
     
      if(type == null)
      return null;
   
      RouteType routeType = RouteType.find("gtfsRouteType = ?", type).first();
     
      if(routeType != null)
        return routeType;
     
      else {
       
        routeType = new RouteType();
        routeType.gtfsRouteType = type;
        routeType.description = type.name();
        routeType.save();
       
        return routeType;
      }   
    }
View Full Code Here

Examples of org.apache.camel.model.RouteType

    public Processor getOverdueAction() throws Exception {
        if (overdueAction == null && overdueProcessors != null) {

            // TOOD refactor to avoid this messyness...
            ArrayList<Route> list = new ArrayList<Route>();
            RouteType route = new RouteType();
            route.setCamelContext(first.getBuilder().getProcessBuilder().getContext());
            RouteContext routeContext = new RouteContext(route, null, list);

            overdueAction = overdueProcessors.createOutputsProcessor(routeContext);
        }
        return overdueAction;
View Full Code Here

Examples of org.apache.camel.model.RouteType

    /**
     * Creates a new route from the given URI input
     */
    public RouteType from(String uri) {
        RouteType answer = routeCollection.from(uri);
        configureRoute(answer);
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.model.RouteType

    /**
     * Creates a new route from the given endpoint
     */
    public RouteType from(Endpoint endpoint) {
        RouteType answer = routeCollection.from(endpoint);
        configureRoute(answer);
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.model.RouteType

        public void process(Exchange exchange) throws Exception {
            // compuate and set from endpoint uri
            if (exchange.getProperty("fromEndpointUri") == null) {
                ProcessorType parent = node.getParent();
                if (parent instanceof RouteType) {
                    RouteType rt = (RouteType)parent;
                    // note assumes that we only have one input (that is very common anyway)
                    String fromEndpointUri = rt.getInputs().get(0).getEndpoint().getEndpointUri();
                    exchange.setProperty("fromEndpointUri", fromEndpointUri);
                }
            }

            // must invoke the target to continue the routing
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.