Examples of ConnectorException


Examples of org.elfinder.servlets.ConnectorException

    }

    try {
      getFs().removeEmptyDirectory(path);
    } catch (FsException e) {
      throw new ConnectorException("Unable to remove file", e);
    }
  }
View Full Code Here

Examples of org.jboss.fresh.events.net.ConnectorException

      Event ev = new Event(host, app, componentName, agentid, "ENet", "Ignore", null);

   
      if(reset) {
        reset = false;
        throw new ConnectorException("Reset forced");
      }

      synchronized(shellout) {
        ev.setID(String.valueOf(evid++));
        //shellout.write(pinf.procid, ev);
        shout.writeObject(ev);
        shout.flush();
      }

      if(reset) {
        reset = false;
        throw new ConnectorException("Reset forced");
      }

    } catch(Exception ex) {
      //log.error("Exception while pinging remote process: ", ex);
      throw new ConnectorException("Exception while pinging remote process: ", ex);
    }
  }
View Full Code Here

Examples of org.jboss.fresh.events.net.ConnectorException

    try {
      sndT = Thread.currentThread();

      if(reset) {
        reset = false;
        throw new ConnectorException("Reset forced");
      }

      synchronized(shellout) {
        //shellout.writeBuffer(pinf.procid, (LinkedList) ls);
        Iterator it = ls.iterator();
        while(it.hasNext()) {
          shout.writeObject(it.next());
        }
        shout.flush();
      }

      if(reset) {
        reset = false;
        throw new ConnectorException("Reset forced");
      }

    } catch(org.jboss.fresh.shell.ShellIOException ex) {
      log.debug("CATCH  ShellIOException ");
      Throwable th = ex.getCause();
      if(th instanceof org.jboss.fresh.io.ApplicationIOException) {
        log.debug("CATCH  ApplicationIOException ");
        th = th.getCause();
        if(th instanceof org.jboss.fresh.events.net.TakenOverException) {
          log.debug("CATCH  TakenOverException ");
          throw (TakenOverException) th;
        }
      } else if(th instanceof ThrowableProxy) {
        log.debug("CATCH ThrowableProxy ");
        String cname = ((ThrowableProxy) th).getClassName();
        if("org.jboss.fresh.io.ApplicationIOException".equals(cname)) {
          log.debug("CATCH LC ApplicationIOException ");
          th = th.getCause();
          if(th instanceof ThrowableProxy) {
            log.debug("CATCH ThrowableProxy ");
            cname = ((ThrowableProxy) th).getClassName();
            if("org.jboss.fresh.events.net.TakenOverException".equals(cname)) {
              log.debug("CATCH LC TakenOverException ");
              throw new TakenOverException(th.getMessage());
            }
          }
        }
      }

      throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ")", ex);

    } catch(Exception ex) {
      //log.error("Exception while writing to remote process: (" + this + ", procid: " + shout.getProcID() + ")", ex);
      throw new ConnectorException("Exception while writing to remote process: (" + this + ", procid: " + shout.getProcID() + ")", ex);
    } finally {
      sndT = null;
    }

    //log.info("  done sending.");
View Full Code Here

Examples of org.jboss.fresh.events.net.ConnectorException

            cname = ((ThrowableProxy) th).getClassName();
            if("org.jboss.fresh.events.net.TakenOverException".equals(cname)) {
              log.debug("CATCH LC TakenOverException ");
              throw new TakenOverException(th.getMessage());
            } else if("org.jboss.fresh.shell.UninitializedEnvironmentException".equals(cname)) {
              throw new ConnectorException(new org.jboss.fresh.shell.UninitializedEnvironmentException(th.getMessage()));
            }
          }
        }
      }
      log.debug("THROW ConnectorException ");
      throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ")  read buffer: " + ls, ex);

    } catch(IOException ex) {
      Throwable th = ex.getCause();
      if(th instanceof NoSuchProcessException)
        throw new TakenOverException(th.getMessage());
      else
        throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ")  read buffer: " + ls, ex);
    } catch(Exception ex) {
      //log.error("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ")  read buffer: " + ls, ex);
      throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ") ", ex);
    }

  }
View Full Code Here

Examples of org.libreplan.business.common.entities.ConnectorException

     */
    private TypeOfWorkHours getTypeOfWorkHours() throws ConnectorException {
        Connector connector = connectorDAO
                .findUniqueByName(PredefinedConnectors.JIRA.getName());
        if (connector == null) {
            throw new ConnectorException(_("JIRA connector not found"));
        }

        TypeOfWorkHours typeOfWorkHours;
        String name = connector.getPropertiesAsMap().get(
                PredefinedConnectorProperties.JIRA_HOURS_TYPE);

        if (StringUtils.isBlank(name)) {
            throw new ConnectorException(
                    _("Hours type should not be empty to synchronine timesheets"));
        }

        try {
            typeOfWorkHours = typeOfWorkHoursDAO.findUniqueByName(name);
View Full Code Here

Examples of org.libreplan.business.common.entities.ConnectorException

    @Override
    @Transactional(readOnly = true)
    public List<SynchronizationInfo> exportTimesheets() throws ConnectorException {
        Connector connector = getTimConnector();
        if (connector == null) {
            throw new ConnectorException(_("Tim connector not found"));
        }
        if (!connector.areConnectionValuesValid()) {
            throw new ConnectorException(
                    _("Connection values of Tim connector are invalid"));
        }

        synchronizationInfo = new SynchronizationInfo(_("Export"));
View Full Code Here

Examples of org.libreplan.business.common.entities.ConnectorException

    @Override
    @Transactional(readOnly = true)
    public void exportTimesheets(String productCode, Order order)
            throws ConnectorException {
        if (productCode == null || productCode.isEmpty()) {
            throw new ConnectorException(_("Product code should not be empty"));
        }
        if (order == null) {
            throw new ConnectorException(_("Order should not be empty"));
        }

        Connector connector = getTimConnector();
        if (connector == null) {
            throw new ConnectorException(_("Tim connector not found"));
        }

        if (!connector.areConnectionValuesValid()) {
            throw new ConnectorException(
                    _("Connection values of Tim connector are invalid"));
        }

        exportTimesheets(productCode, order, connector);
    }
View Full Code Here

Examples of org.libreplan.business.common.entities.ConnectorException

    @Transactional
    public List<SynchronizationInfo> importRosters() throws ConnectorException {
        Connector connector = connectorDAO
                .findUniqueByName(PredefinedConnectors.TIM.getName());
        if (connector == null) {
            throw new ConnectorException(_("Tim connector not found"));
        }

        if (!connector.areConnectionValuesValid()) {
            throw new ConnectorException(
                    _("Connection values of Tim connector are invalid"));
        }

        Map<String, String> properties = connector.getPropertiesAsMap();
        String url = properties.get(PredefinedConnectorProperties.SERVER_URL);

        String userName = properties
                .get(PredefinedConnectorProperties.USERNAME);

        String password = properties
                .get(PredefinedConnectorProperties.PASSWORD);

        int nrDaysRosterFromTim = Integer.parseInt(properties
                .get(PredefinedConnectorProperties.TIM_NR_DAYS_ROSTER));

        int productivityFactor = Integer.parseInt(properties
                .get(PredefinedConnectorProperties.TIM_PRODUCTIVITY_FACTOR));


        String departmentIds = properties
                .get(PredefinedConnectorProperties.TIM_DEPARTAMENTS_IMPORT_ROSTER);

        if (StringUtils.isBlank(departmentIds)) {
            LOG.warn("No departments configured");
            throw new ConnectorException(_("No departments configured"));
        }

        String[] departmentIdsArray = StringUtils.stripAll(StringUtils.split(
                departmentIds, ","));
View Full Code Here

Examples of org.libreplan.business.common.entities.ConnectorException

    @Override
    @Transactional(readOnly = true)
    public List<String> getAllJiraLabels() throws ConnectorException {
        Connector connector = getJiraConnector();
        if (connector == null) {
            throw new ConnectorException(_("JIRA connector not found"));
        }

        String jiraLabels = connector.getPropertiesAsMap().get(
                PredefinedConnectorProperties.JIRA_LABELS);
View Full Code Here

Examples of org.libreplan.business.common.entities.ConnectorException

    @Transactional(readOnly = true)
    public List<IssueDTO> getJiraIssues(String label) throws ConnectorException {

        Connector connector = getJiraConnector();
        if (connector == null) {
            throw new ConnectorException(_("JIRA connector not found"));
        }

        if (!connector.areConnectionValuesValid()) {
            throw new ConnectorException(
                    _("Connection values of JIRA connector are invalid"));
        }

        return getJiraIssues(label, connector);
    }
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.