Package com.adito.extensions

Examples of com.adito.extensions.ExtensionException$ExceptionMessageResourcesFactory


      initPageTasks();
      initService();
      initTagLib();
      CoreUtil.updateEventsTable(WebForwardPlugin.MESSAGE_RESOURCES_KEY, WebForwardEventConstants.class);
    } catch (Exception e) {
      throw new ExtensionException(ExtensionException.INTERNAL_ERROR, e);
    }
  }
View Full Code Here


      removeTableItemActions();
      removeMainMenu();
      removePageTasks();
      stopService();
    } catch (Exception e) {
      throw new ExtensionException(ExtensionException.INTERNAL_ERROR, e, "Failed to start.");
    }
  }
View Full Code Here

        if (element.getName().equals(TYPE)) {
            aditoAware = "true".equalsIgnoreCase(element.getAttributeValue("aditoAware"));
            window = element.getAttributeValue("window");
            template = element.getAttributeValue("template");
            if (template == null) {
                throw new ExtensionException(ExtensionException.FAILED_TO_PROCESS_DESCRIPTOR, "The <html> tag requires the template attribute.");
            }
        }

    }
View Full Code Here

          if (DefaultAgentManager.getInstance().hasActiveAgent(session)) {
          try {
            Request agentRequest = ((ApplicationService) DefaultAgentManager.getInstance().getService(ApplicationService.class)).launchApplication(launchSession);
            AgentTunnel agent = DefaultAgentManager.getInstance().getAgentBySession(launchSession.getSession());
            if (!agent.sendRequest(agentRequest, true, 60000)) {
              throw new ExtensionException(ExtensionException.AGENT_REFUSED_LAUNCH);
            }
            ByteArrayReader baw = new ByteArrayReader(agentRequest.getRequestData());
            try {
              while(true) {
                String name = baw.readString();
                String hostname = baw.readString();
                long port = baw.readInt();
                if(tunnels.length() > 0) {
                  tunnels.append(",");
                }
                tunnels.append(name);
                tunnels.append(":");
                tunnels.append(hostname);
                tunnels.append(":");
                tunnels.append(port);
                log.info("Got temporary tunnel '" + name + "' = " + port + " (" + hostname + ")");
              }
            }
            catch(EOFException eofe) {             
            }
          } catch (ExtensionException ee) {
            throw ee;
          } catch (Exception e) {
            throw new ExtensionException(ExtensionException.INTERNAL_ERROR, e);
          }
         
        }
        else {
          throw new ExtensionException(ExtensionException.NO_AGENT);
        }

            script = "myRef = window.open('" + "/getHTMLApplication.do?"
              + LaunchSession.LAUNCH_ID + "=" +  launchSession.getId()
              + "&tunnels=" + Util.urlEncode(tunnels.toString())
View Full Code Here

    if (DefaultAgentManager.getInstance().hasActiveAgent(launchSession.getSession())) {
      try {
        Request agentRequest = ((ApplicationService) DefaultAgentManager.getInstance().getService(ApplicationService.class)).launchApplication(launchSession);
        AgentTunnel agent = DefaultAgentManager.getInstance().getAgentBySession(launchSession.getSession());
        if (!agent.sendRequest(agentRequest, true, 60000)) {
          throw new ExtensionException(ExtensionException.AGENT_REFUSED_LAUNCH);
        }
      } catch (ExtensionException ee) {
        throw ee;
      } catch (Exception e) {
        throw new ExtensionException(ExtensionException.INTERNAL_ERROR, e);
      }
    } else {
      throw new ExtensionException(ExtensionException.NO_AGENT);
    }
    return null;
  }
View Full Code Here

    for (Iterator it = element.getChildren().iterator(); it.hasNext();) {
      Element e = (Element) it.next();
      if (e.getName().equalsIgnoreCase("if")) {
        verifyExecutable(e);
      } else if (!e.getName().equalsIgnoreCase("arg") && !e.getName().equalsIgnoreCase("program") && !e.getName().equalsIgnoreCase("jvm")) {
        throw new ExtensionException(ExtensionException.FAILED_TO_PROCESS_DESCRIPTOR, "Unexpected element <" + e.getName()
          + "> found in <executable>");
      }
    }

  }
View Full Code Here

    try {
      app = new ServerApplicationLauncher(parameters, shortcut
          .getApplication(), launchSession.getSession(), shortcut);
      app.start();
    } catch (Exception e) {
      throw new ExtensionException(ExtensionException.FAILED_TO_LAUNCH, e);
    }

    return null;
  }
View Full Code Here

      Element e = (Element) it.next();
      if (e.getName().equalsIgnoreCase("if")) {
        verifyExecutable(e);
      } else if (!e.getName().equalsIgnoreCase("arg")
          && !e.getName().equalsIgnoreCase("jvm")) {
        throw new ExtensionException(
            ExtensionException.FAILED_TO_PROCESS_DESCRIPTOR,
            "Unexpected element <" + e.getName()
                + "> found in <executable>");
      }
    }
View Full Code Here

    if (DefaultAgentManager.getInstance().hasActiveAgent(session)) {
      try {
        Request agentRequest = ((ApplicationService) DefaultAgentManager.getInstance().getService(ApplicationService.class)).launchApplication(launchSession);
        AgentTunnel agent = DefaultAgentManager.getInstance().getAgentBySession(launchSession.getSession());
        if (!agent.sendRequest(agentRequest, true, 60000)) {
          throw new ExtensionException(ExtensionException.AGENT_REFUSED_LAUNCH);
        }
      } catch (ExtensionException ee) {
        throw ee;
      } catch (Exception e) {
        throw new ExtensionException(ExtensionException.INTERNAL_ERROR, e);
      }
    }
    else {
      throw new ExtensionException(ExtensionException.NO_AGENT);
    }
    return null;
  }
View Full Code Here

    if (element.getName().equals(TYPE)) {

      jre = element.getAttribute("jre").getValue();

      if (jre == null) {
        throw new ExtensionException(
            ExtensionException.FAILED_TO_PROCESS_DESCRIPTOR,
            "<application> element requires attribute 'jre'");
      }

      try {
        ExtensionDescriptor.getVersion(jre);
      } catch (Throwable ex) {
        throw new ExtensionException(
            ExtensionException.FAILED_TO_PROCESS_DESCRIPTOR,
            "Invalid value '" + jre
                + "' specified for 'jre' attribute");
      }

      for (Iterator it = element.getChildren().iterator(); it.hasNext();) {
        Element e = (Element) it.next();

        if (e.getName().equalsIgnoreCase("classpath")) {
          verifyClasspath(e);
        } else if (e.getName().equalsIgnoreCase("main")) {
          verifyMain(e);
        } else {
          throw new ExtensionException(
              ExtensionException.FAILED_TO_PROCESS_DESCRIPTOR,
              "Unexpected element <" + e.getName()
                  + "> found in <application>");
        }
      }
View Full Code Here

TOP

Related Classes of com.adito.extensions.ExtensionException$ExceptionMessageResourcesFactory

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.