Package com.k42b3.sacmis

Examples of com.k42b3.sacmis.Toolbar


  {
    try
    {
      this.log = new ArrayList<String>();

      Project project = Project.getProjectById(projectId);

      project.getRightHandler().loadMap();

      this.mirrorFolder(project, false, "");

      console.printf("Found " + this.log.size() + " changes%n");

      // rebuild map
      FileMap.generate(project.getRightHandler());

      // write log
      this.writeLog(project);

      // add release
      project.addRelease();

      project.close();

      console.printf("Project release successful%n");
    }
    catch(Exception e)
    {
View Full Code Here


  public void addProject(String name, String leftPath, int leftResourceId, String rightPath, int rightResourceId)
  {
    try
    {
      Project project = new Project();

      project.setName(name);
      project.setLeftPath(leftPath);
      project.setLeftResourceId(leftResourceId);
      project.setRightPath(rightPath);
      project.setRightResourceId(rightResourceId);

      project.insert();

      console.printf("Add project successful%n");
    }
    catch(Exception e)
    {
View Full Code Here

  public void deleteProject(int projectId)
  {
    try
    {
      Project project = Project.getProjectById(projectId);

      project.delete();

      console.printf("Delete project " + projectId + " successful%n");
    }
    catch(Exception e)
    {
View Full Code Here

  public void info(int projectId)
  {
    try
    {
      Project project = Project.getProjectById(projectId);

      String formatString = "%1$-12s %2$-32s%n";

      console.printf("Id:         " + project.getId() + "%n");
      console.printf("Name:       " + project.getName() + "%n");
      console.printf("Date:       " + project.getDate() + "%n");
      console.printf("Left path:  " + project.getLeftPath() + "%n");
      console.printf("Right path: " + project.getRightPath() + "%n");


      formatString = "%1$-4s %2$-16s%n";

      // excludes
      console.printf("%n-- Exclude rules:%n");
      console.printf(formatString, "Id", "Pattern");

      ArrayList<Exclude> excludes = project.getExcludes();

      for(int i = 0; i < excludes.size(); i++)
      {
        console.printf(formatString, excludes.get(i).getId(), excludes.get(i).getPattern());
      }

      // releases
      console.printf("%n-- Latest releases:%n");
      console.printf(formatString, "Id", "Date");

      ArrayList<Release> releases = project.getReleases(8);

      for(int i = 0; i < releases.size(); i++)
      {
        console.printf(formatString, releases.get(i).getId(), releases.get(i).getDate());
      }
View Full Code Here

  public void addResource(String type, String name, HashMap<String, String> config)
  {
    try
    {
      Resource resource = new Resource();

      resource.setType(type);
      resource.setName(name);
      resource.setConfig(config);

      resource.insert();

      console.printf("Add resource successful%n");
    }
    catch(Exception e)
    {
View Full Code Here

  public void deleteResource(int resourceId)
  {
    try
    {
      Resource resource = Resource.getResourceById(resourceId);

      resource.delete();

      console.printf("Delete resource " + resourceId + " successful%n");
    }
    catch(Exception e)
    {
View Full Code Here


      // traffic panel
      trafficTm = new TrafficTableModel();

      http = new Http(new TrafficListenerInterface(){

        public void handleRequest(TrafficItem item)
        {
          trafficTm.addTraffic(item);
        }
View Full Code Here

    try
    {
      trafficTm = new TrafficTableModel();

      // http
      http = new Http(new TrafficListenerInterface(){

        public void handleRequest(TrafficItem item)
        {
          trafficTm.addTraffic(item);
        }
View Full Code Here

        {
          Document doc = sendRequest();
          Element rootElement = (Element) doc.getDocumentElement();

          // get message
          Message msg = Message.parseMessage(rootElement);

          if(msg.hasSuccess())
          {
            JOptionPane.showMessageDialog(null, msg.getText(), "Response", JOptionPane.INFORMATION_MESSAGE);
          }
          else
          {
            throw new Exception(msg.getText());
          }
        }
        catch(Exception ex)
        {
          JOptionPane.showMessageDialog(null, ex.getMessage(), "Response", JOptionPane.ERROR_MESSAGE);
View Full Code Here

    {
      Element rootElement = (Element) doc.getDocumentElement();
      rootElement.normalize();

      // get message
      Message msg = Message.parseMessage(rootElement);

      if(msg != null && !msg.hasSuccess())
      {
        JPanel errorPanel = new JPanel();
        errorPanel.setLayout(new FlowLayout());
        errorPanel.add(new JLabel(msg.getText()));

        body.add(errorPanel);
      }
      else
      {
View Full Code Here

TOP

Related Classes of com.k42b3.sacmis.Toolbar

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.