Examples of SystemInformation


Examples of Model.SystemInformation

        for (IDownloadHandler handler : handlersList) {
            // Se estiver marcado para ser usado busco as informações do VO
            if (pconfig.getPluginBooleanParameter(handler.getClass().getSimpleName(), false)) {

                SystemInformation systemInformation = new SystemInformation();
                systemInformation.setSystemName(Core.SYSTEM_NAME);
                systemInformation.setVersionNumber(Core.VERSION_NUMBER);
                handler.setSystemInformation(systemInformation);
                try {
                    DownloadHandlerVO handlerVO = (DownloadHandlerVO) handler.getHandlerVOType().newInstance();
                    Method[] metodos = handlerVO.getClass().getMethods();
                    for (Method metodo : metodos) {
View Full Code Here

Examples of com.googlecode.psiprobe.model.SystemInformation

    public void setCollectionPeriod(long collectionPeriod) {
        this.collectionPeriod = collectionPeriod;
    }

    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
        SystemInformation systemInformation = new SystemInformation();
        systemInformation.setAppBase(getContainerWrapper().getTomcatContainer().getAppBase().getAbsolutePath());
        systemInformation.setConfigBase(getContainerWrapper().getTomcatContainer().getConfigBase());

        Map sysProps = new Properties();
        sysProps.putAll(System.getProperties());

        if (!SecurityUtils.hasAttributeValueRole(getServletContext(), request)) {
            for (Iterator it = filterOutKeys.iterator(); it.hasNext();) {
                sysProps.remove(it.next());
            }
        }

        systemInformation.setSystemProperties(sysProps);

        return new ModelAndView(getViewName())
                .addObject("systemInformation", systemInformation)
                .addObject("runtime", getRuntimeInfoAccessor().getRuntimeInformation())
                .addObject("collectionPeriod", new Long(getCollectionPeriod()));
View Full Code Here

Examples of jp.vmi.selenium.selenese.utils.SystemInformation

    private static final Logger log = LoggerFactory.getLogger(ExecuteTestSuiteInterceptor.class);

    private void initTestSuiteResult(JUnitResult jUnitResult, TestSuite testSuite) {
        jUnitResult.startTestSuite(testSuite);
        SystemInformation sysInfo = SystemInformation.getInstance();
        jUnitResult.addProperty(testSuite, "seleneseRunner.version", sysInfo.getSeleneseRunnerVersion());
        jUnitResult.addProperty(testSuite, "selenium.version", sysInfo.getSeleniumVersion());
        jUnitResult.addProperty(testSuite, "selenium.webDriver.name", testSuite.getWebDriverName());
    }
View Full Code Here

Examples of org.jamesii.core.data.runtime.SystemInformation

    Serializable expid = getDataStorage().setExperimentID(uid);
    long mid = 987987;
    String version = "AlphaBetaGamma123";
    JavaInfo ji1 = new JavaInfo();
    getDataStorage().writeExperimentSystemInformation(uid, mid, version, ji1);
    SystemInformation si =
        getDataStorage().getExperimentSystemInformation(expid);
    // go through the attributes of the SystemInformation items:
    assertEquals(mid, si.getMachineId());
    assertEquals(version, si.getJamesVersion());
    JavaInfo ji2 = si.getJavaInfo();
    assertEquals(ji1.getName(), ji2.getName());
    assertEquals(ji1.getVersion(), ji2.getVersion());
    assertEquals(ji1.getVendor(), ji2.getVendor());
    assertEquals(ji1.getInstDir(), ji2.getInstDir());
    assertEquals(ji1.getClassFormatVersion(), ji2.getClassFormatVersion());
View Full Code Here

Examples of org.openbravo.model.ad.system.SystemInformation

    xmlDocument.setParameter("theme", vars.getTheme());
    xmlDocument.setParameter("welcome", Utility.formatMessageBDToHtml(Utility.messageBD(this,
        "REG_WELCOME", vars.getLanguage())));

    // Building registration URL js variable
    SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class, "0");

    String url = "var url = 'http://www.openbravo.com/embedreg/form";
    if (sysInfo != null && sysInfo.getSystemIdentifier() != null) {
      url += "?system_id=" + sysInfo.getSystemIdentifier();
    }
    url += "';";

    xmlDocument.setParameter("url", url);
View Full Code Here

Examples of org.openbravo.model.ad.system.SystemInformation

        log4j.debug("InitialClientSetup - createClient - CLIENT INFO CREATED");
      if (log4j.isDebugEnabled())
        log4j.debug("InitialClientSetup - createClient - m_info: " + m_info.toString());
      // Add images
      Client newClient = OBDal.getInstance().get(Client.class, AD_Client_ID);
      SystemInformation sys = OBDal.getInstance().get(SystemInformation.class, "0");
      if (sys.getYourCompanyBigImage() != null) {
        Image yourCompanyBigImage = OBProvider.getInstance().get(Image.class);
        yourCompanyBigImage.setClient(newClient);
        yourCompanyBigImage.setBindaryData(sys.getYourCompanyBigImage().getBindaryData());
        yourCompanyBigImage.setName(sys.getYourCompanyBigImage().getName());
        newClient.getClientInformationList().get(0).setYourCompanyBigImage(yourCompanyBigImage);
        OBDal.getInstance().save(yourCompanyBigImage);
      }

      if (sys.getYourCompanyDocumentImage() != null) {
        Image yourCompanyDocumentImage = OBProvider.getInstance().get(Image.class);
        yourCompanyDocumentImage.setClient(newClient);
        yourCompanyDocumentImage.setBindaryData(sys.getYourCompanyDocumentImage().getBindaryData());
        yourCompanyDocumentImage.setName(sys.getYourCompanyBigImage().getName());
        newClient.getClientInformationList().get(0).setYourCompanyDocumentImage(
            yourCompanyDocumentImage);
        OBDal.getInstance().save(yourCompanyDocumentImage);
      }

      if (sys.getYourCompanyMenuImage() != null) {
        Image yourCompanyMenuImage = OBProvider.getInstance().get(Image.class);
        yourCompanyMenuImage.setClient(newClient);
        yourCompanyMenuImage.setBindaryData(sys.getYourCompanyMenuImage().getBindaryData());
        yourCompanyMenuImage.setName(sys.getYourCompanyMenuImage().getName());
        newClient.getClientInformationList().get(0).setYourCompanyMenuImage(yourCompanyMenuImage);
        OBDal.getInstance().save(yourCompanyMenuImage);
      }

      OBDal.getInstance().save(newClient);
View Full Code Here

Examples of org.openbravo.model.ad.system.SystemInformation

      throws ServletException, IOException {

    VariablesSecureApp vars = new VariablesSecureApp(request);

    final Process HBProcess = OBDal.getInstance().get(Process.class, HB_Process_ID);
    final SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class,
        SystemInfomation_ID);
    final boolean isHearbeatEnabled = sysInfo.isEnableHeartbeat() == null ? false : sysInfo
        .isEnableHeartbeat();

    final String clickedButton = vars.getStringParameter("inpLastFieldChanged");

    if (isHearbeatEnabled || clickedButton.equalsIgnoreCase("inpisheartbeatactive")) {
      // Disable Heartbeat
      try {

        if (sysInfo.isEnableHeartbeat() != null && sysInfo.isEnableHeartbeat()) {
          // Sending beat
          ProcessBundle beat = new ProcessBundle(HB_Process_ID, vars).init(this);
          new ProcessRunner(beat).execute(this);
        }

        // Deactivating the process at SystemInfo
        sysInfo.setEnableHeartbeat(false);
        sysInfo.setTestHeartbeat("N");
        OBDal.getInstance().save(sysInfo);

        // Un-scheduling the process
        final OBCriteria<ProcessRequest> prCriteria = OBDal.getInstance().createCriteria(
            ProcessRequest.class);
        prCriteria.add(Expression.eq(ProcessRequest.PROPERTY_PROCESS, HBProcess));
        prCriteria
            .add(Expression.eq(ProcessRequest.PROPERTY_CHANNEL, Channel.SCHEDULED.toString()));
        final List<ProcessRequest> requestList = prCriteria.list();

        if (requestList.size() != 0) {

          final ProcessRequest pr = requestList.get(0);

          OBDal.getInstance().save(pr);
          OBDal.getInstance().commitAndClose();

          final ProcessBundle bundle = ProcessBundle.request(pr.getId(), vars, this);

          OBScheduler.getInstance().unschedule(pr.getId(), bundle.getContext());
        }

        String msg = Utility.messageBD(this, "HB_SUCCESS", vars.getLanguage());
        advisePopUpRefresh(request, response, "SUCCESS", "Heartbeat Configuration", msg);

      } catch (Exception e) {
        log4j.error(e.getMessage(), e);
        advisePopUpRefresh(request, response, "ERROR", "Heartbeat Configuration", e.getMessage());
      }

    } else { // Enable Heartbeat

      try {

        HBProcess.setActive(true);
        OBDal.getInstance().save(HBProcess);

        OBDal.getInstance().commitAndClose();

        // Sending beat
        ProcessBundle bundle = new ProcessBundle(HB_Process_ID, vars).init(this);
        final String beatExecutionId = new ProcessRunner(bundle).execute(this);

        // Getting beat result
        final ProcessRun result = OBDal.getInstance().get(ProcessRun.class, beatExecutionId);

        if (result.getStatus().equals("ERR")) {
          // Restoring not active state
          sysInfo.setEnableHeartbeat(false);
          sysInfo.setTestHeartbeat("N");
          OBDal.getInstance().save(sysInfo);
          OBDal.getInstance().commitAndClose();

          String msg = Utility.messageBD(this, "HB_INTERNAL_ERROR", vars.getLanguage());
          // Extracting the last line from the log
View Full Code Here

Examples of org.openbravo.model.ad.system.SystemInformation

    }
    return notAllowedMods.size() == 0;
  }

  private boolean isHeartbeatEnabled() {
    SystemInformation sys = OBDal.getInstance().get(SystemInformation.class, "0");
    return sys.isEnableHeartbeat() != null && sys.isEnableHeartbeat();
  }
View Full Code Here

Examples of org.openbravo.model.ad.system.SystemInformation

   * @return
   */
  private String getSearchResults(HttpServletRequest request, HttpServletResponse response,
      VariablesSecureApp vars, String text) {
    SimpleModule[] modules = null;
    SystemInformation info = OBDal.getInstance().get(SystemInformation.class, "0");
    try {
      if (info.isProxyRequired() && !info.getProxyServer().equals("") && info.getProxyPort() > 0) {
        if (!HttpsUtils.isInternetAvailable(info.getProxyServer(), info.getProxyPort().intValue())) {
          final OBError message = new OBError();
          message.setType("Error");
          message.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
          message.setMessage(Utility.messageBD(this, "WSError", vars.getLanguage()));
          vars.setMessage("ModuleManagement", message);
View Full Code Here

Examples of org.openbravo.model.ad.system.SystemInformation

  /**
   * Test to assert save false in a null char(1) column - Part I
   */
  public void testSaveBooleanValue1() {
    setUserContext("0");
    SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class, "0");
    if (sysInfo.isEnableHeartbeat() == null) {
      sysInfo.setEnableHeartbeat(false);
    }
    OBDal.getInstance().save(sysInfo);
  }
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.