Examples of RegistrationFailedException


Examples of com.art.anette.exceptions.RegistrationFailedException

            String q = SQLFormatter.generateQuery("SELECT * FROM %s WHERE email = '%s'",
                    Employee.getTableName(), data.email);
            ResultSet rs = dbConnector.query(q);
            if (rs.next()) {
                throw new RegistrationFailedException("This email is already in system!");
            }
            rs.close();

            Employee e = new Employee(this, 0, 0, data);
            e.setState(Status.NEW);
            dbConnector.execute(e.toSQL(owner));
            rs = dbConnector.query("SELECT LAST_INSERT_ID() as id FROM " + Employee.getTableName());
            rs.next();

            e = new Employee(null, rs.getLong("id"), data);
            rs.close();

            SDBCPool.getInstance().inform(e);
            return e;

        } catch (SQLException ex) {
            logger.severe(null, ex);
            //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException
            throw new RegistrationFailedException("Error while checking logindata!");
        }
    }
View Full Code Here

Examples of eu.admire.registry.generic.exception.RegistrationFailedException

      mUpdate.addPE(descriptor.getName(), descriptor.getInputs(),
          descriptor.getOutputs(), type, relations.toString(),
          descriptor.getMetadata());
      LOG.debug("Registered processing element " + descriptor);
    } else {
      throw new RegistrationFailedException(descriptor.getName(),
          new ProcessingElementAlreadyExistsException(descriptor));
    }
  }
View Full Code Here

Examples of eu.admire.registry.generic.exception.RegistrationFailedException

    try {
      if (lookupSType(name).get(name) == null) {
        mUpdate.addDType(name, type);// , type.getMetadata());
        LOG.debug("Registered processing element " + type);
      } else {
        throw new RegistrationFailedException(name,
            new DTypeAlreadyExistsException(type));
      }
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

Examples of eu.admire.registry.generic.exception.RegistrationFailedException

    try {
      if (lookupSType(name).get(name) == null) {
        mUpdate.addSType(name, type);// , type.getMetadata());
        LOG.debug("Registered processing element " + type);
      } else {
        throw new RegistrationFailedException(name,
            new STypeAlreadyExistsException(type));
      }
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

Examples of eu.admire.registry.pe.RegistrationFailedException

    SimpleRDFProcessingElementRegistry registry = new SimpleRDFProcessingElementRegistry(
        mAddress);
    try {
      if(lookupFunction(function.getName())!=null)
      {
        throw new RegistrationFailedException(function,
            new FunctionAlreadyExistsException(function));
      }
    } catch (LookupFailedException e) {
     
    }
View Full Code Here

Examples of eu.admire.registry.pe.RegistrationFailedException

          inputElement.append(DELIMITER + propertyName);
          inputElement.append(DELIMITER
              + peList.get(0).getProcessingElementId());
          inputElement.append(DELIMITER + propertyValues.getIndex());
        } else {
          throw new RegistrationFailedException(
              function,
              new ProcessingElementUnexistingException(
                  (SimpleProcessingElementDescriptor) parameters
                      .get(propertyName).getType()));
        }
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.