Package com.simoncat.beans

Examples of com.simoncat.beans.XMLServers


      //HttpSession session = request.getSession();
      System.out.println("2");   
      Server ss[];
        
   
      XMLServers xmlserver = new XMLServers();
      ss=xmlserver.readXmls("", this.getServlet().getServletContext());
      System.out.println("3")
      if(ss==null){
    FinalScreenOutput fso = new FinalScreenOutput();
    fso.setPageTitle    ("Schedule Server [Finished]");
View Full Code Here


      //READ XML

      Server ss[];
        
   
      XMLServers xmlserver = new XMLServers();
      ss=xmlserver.readXmls("", this.getServlet().getServletContext());
      if(ss==null){
    FinalScreenOutput fso = new FinalScreenOutput();
    fso.setPageTitle    ("List Servers [Finished]");

    fso.setMessage       ("No existen servidores para listar!");
View Full Code Here

      String form_ = request.getParameter("form");
      String value = request.getParameter("value");
      if(form!= null && value!= null){
        //http://127.0.0.1:8080/mvx/EventServer.do?form=new&value=10/27/08&Submit=localhostl
        //recuperar informacion del server
        XMLServers xmlserver = new XMLServers();
            Server server = xmlserver.loadServerByName(serName, servlet.getServletContext());
        //tratar evento en el XML
        XMLEvents xmlevents = new XMLEvents();
        //Event events[] = xmlevents.loadEventsServerByName(serName,server.getFilePath());
        if(form_.equals("new")){
         
          int hourint = new Integer(request.getParameter("hour")).intValue();
          if(request.getParameter("ampm").equals("PM")){
            hourint=hourint+12;
            if(hourint==24)
              hourint=0;
          }
         
          String hour = ""+hourint+":"+request.getParameter("minute");
           String id=serName+value+hour;
           String description="";
           String user="";
           String results="";
           //calculate folder name
           Locale locale = new Locale("es","ES");
          Date date1 = new Date(value);
          Format formatter = new SimpleDateFormat("MMMM_yyyy");
          String folName = formatter.format(date1);
          formatter = new SimpleDateFormat("yyyy-MM-dd");
          String dateToKeep = formatter.format(date1);
          String type = request.getParameter("type");
          Event event = new Event(id,dateToKeep,hour,description,user,results,type);
          xmlevents.addEvent(event,server.getFilePath(),serName,folName);
          //programar el eventos en XMLHandler
          if(XMLHandler.addEvent(server,event)){
            System.out.println("programed event:"+event+ " at Server:"+server);
          }
         
         
        }
        if(form_.equals("revise")){
          String hour = request.getParameter("hour")+":"+request.getParameter("minute");
           String id=serName+value+hour;//?
           String description="";
           String user="";
           String results="";
           String type = request.getParameter("type");
           Event event = new Event(id,value,hour,description,user,results,type);
           xmlevents.updEvent(id,event,server.getFilePath(),serName);
        }
        if(form_.equals("delete")){
          String id="";//serName+value+hour;//??
          xmlevents.delEvent(id,server.getFilePath(),serName);
        }
    }
      //System.out.println("***********************date:"+date +" "+ "Submit"+serName);
      if(date == null || date.trim().equals("")){
        Calendar c = Calendar.getInstance();
          date = ""+(c.get(Calendar.MONTH)+1);
          date= date +"/"+ c.get(Calendar.DAY_OF_MONTH);
          date = date +"/"+ c.get(Calendar.YEAR);
      }
     
          
      //recuperar los datos del server serName
      XMLServers xmlserver = new XMLServers();
        Server server = xmlserver.loadServerByName(serName, servlet.getServletContext());
      //System.out.println("DatosServer:"+server); 

      //Presentar calendario

     
View Full Code Here

      //HttpSession session = request.getSession();
      System.out.println("2");   
      Server ss[];
        
   
      XMLServers xmlserver = new XMLServers();
      ss=xmlserver.readXmls("", this.getServlet().getServletContext());
      System.out.println("3")


      // Now, let's prepare output
      InstallWebAppOutput iwao = new InstallWebAppOutput();
View Full Code Here

      c.setTestURL(testURL);                       
      c.setObservation(observation);

            session.setAttribute ("server_data", c);
   
      XMLServers xmlserver = new XMLServers();
      boolean r = xmlserver.writeToXml(c,"", this.getServlet().getServletContext());
 
            fso.setMessage       ("Server's information added sucessfully! xml:"+r);

        } else {
            fso.setMessage       ("Sorry, problem with submitted form!");
View Full Code Here

          date= date +"/"+ c.get(Calendar.DAY_OF_MONTH);
          date = date +"/"+ c.get(Calendar.YEAR);
      }
          
      //recuperar los datos del server serName
      XMLServers xmlserver = new XMLServers();
            Server server = xmlserver.loadServerByName(serName, servlet.getServletContext());
      System.out.println("DatosServer:"+server)

      //Presentar calendario

     
View Full Code Here

      //HttpSession session = request.getSession();
      System.out.println("2--->");   
      Server ss[];
        
   
      XMLServers xmlserver = new XMLServers();
      ss=xmlserver.readXmls("", this.getServlet().getServletContext());
      System.out.println("3--->")
      if(ss==null){
    FinalScreenOutput fso = new FinalScreenOutput();
    fso.setPageTitle    ("Event Server [Finished]");
View Full Code Here

   

              //undeploy WAR in SERVER
    //recuperar los datos del server serName
    XMLServers xmlserver = new XMLServers();
        Server server = xmlserver.loadServerByName(serName, this.getServletContext());
    System.out.println("DatosServer:"+server);
    String ip = server.getAddress();
    String tomcatUsr = server.getUserTomcat();
    String tomcatPwd = server.getPasswordTomcat();
    int port= new Integer(server.getPort()).intValue();
View Full Code Here

TOP

Related Classes of com.simoncat.beans.XMLServers

Copyright © 2018 www.massapicom. 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.