Package org.apache.sqoop.validation

Examples of org.apache.sqoop.validation.Status


      = connectionBean.getConnectorBundle(connection.getConnectorId());

    // Remove persistent id as we're making a clone
    connection.setPersistenceId(MPersistableEntity.PERSISTANCE_ID_DEFAULT);

    Status status = Status.FINE;

    io.out.println(getResource().getString(Constants
       .RES_PROMPT_UPDATE_CONN_METADATA));

    do {
      // Print error introduction if needed
      if( !status.canProceed() ) {
        errorIntroduction(io);
      }

      // Fill in data from user
      if(!fillConnection(io, reader, connection,
                         connectorBundle, frameworkBundle)) {
        return;
      }

      status = createConnectionApplyValidations(connection);

    } while(!status.canProceed());

    io.out.println(MessageFormat.format(getResource()
        .getString(Constants.RES_CLONE_CONN_SUCCESSFUL),
        status.name(), connection.getPersistenceId()));
  }
View Full Code Here


    MConnection connection = new MConnection(connector.getPersistenceId(),
                                             connector.getConnectionForms(),
                                             framework.getConnectionForms());

    Status status = Status.FINE;

    io.out.println(getResource().getString(Constants.RES_PROMPT_FILL_CONN_METADATA));

    do {
      // Print error introduction if needed
      if( !status.canProceed() ) {
        errorIntroduction(io);
      }

      // Fill in data from user
      if(!fillConnection(io, reader, connection,
                         connectorBundle, frameworkBundle)) {
        return;
      }

      // Try to create
      status = createConnectionApplyValidations(connection);
    } while(!status.canProceed());


    io.out.println(MessageFormat.format(getResource()
        .getString(Constants.RES_CREATE_CONN_SUCCESSFUL), status.name(),
        connection.getPersistenceId()));
  }
View Full Code Here

    ResourceBundle frameworkBundle
      = jobBean.getFrameworkBundle();
    ResourceBundle connectorBundle
      = jobBean.getConnectorBundle(job.getConnectorId());

    Status status = Status.FINE;

    io.out.println(getResource().getString(Constants.RES_PROMPT_UPDATE_JOB_METADATA));

    do {
      // Print error introduction if needed
      if( !status.canProceed() ) {
        errorIntroduction(io);
      }

      // Fill in data from user
      if(!fillJob(io, reader, job, connectorBundle, frameworkBundle)) {
        return;
      }

      // Try to create
      status = updateJobApplyValidations(job);
    } while(!status.canProceed());

    io.out.println(MessageFormat.format(getResource().getString(Constants
        .RES_UPDATE_JOB_SUCCESSFUL), status.name()));
  }
View Full Code Here

      = new HashMap<Validation.FormInput, Validation.Message>();

    for(Object key : jsonMessages.keySet()) {
      JSONObject jsonMessage = (JSONObject) jsonMessages.get(key);

      Status status = Status.valueOf((String) jsonMessage.get(STATUS));
      String stringMessage = (String) jsonMessage.get(MESSAGE);

      Validation.Message message
        = new Validation.Message(status, stringMessage);

      messages.put(new Validation.FormInput((String)key), message);
    }

    Status status = Status.valueOf((String) jsonObject.get(STATUS));

    return new Validation(status, messages);
  }
View Full Code Here

    ResourceBundle frameworkBundle
      = connectionBean.getFrameworkBundle();
    ResourceBundle connectorBundle
      = connectionBean.getConnectorBundle(connection.getConnectorId());

    Status status = Status.FINE;

    io.out.println(getResource().getString(Constants
        .RES_PROMPT_UPDATE_CONN_METADATA));

    do {
      // Print error introduction if needed
      if( !status.canProceed() ) {
        errorIntroduction(io);
      }

      // Fill in data from user
      if(!fillConnection(io, reader, connection,
                         connectorBundle, frameworkBundle)) {
        return;
      }

      // Try to create
      status = updateConnectionApplyValidations(connection);
    } while(!status.canProceed());

    io.out.println(MessageFormat.format(getResource().getString(Constants
        .RES_UPDATE_CONN_SUCCESSFUL), status.name()));
  }
View Full Code Here

    ResourceBundle frameworkBundle
      = jobBean.getFrameworkBundle();
    ResourceBundle connectorBundle
      = jobBean.getConnectorBundle(job.getConnectorId());

    Status status = Status.FINE;

    // Remove persistent id as we're making a clone
    job.setPersistenceId(MPersistableEntity.PERSISTANCE_ID_DEFAULT);

    io.out.println(getResource().getString(Constants
        .RES_PROMPT_UPDATE_JOB_METADATA));

    do {
      // Print error introduction if needed
      if( !status.canProceed() ) {
        errorIntroduction(io);
      }

      // Fill in data from user
      if(!fillJob(io, reader, job, connectorBundle, frameworkBundle)) {
        return;
      }

      // Try to create
      status = createJobApplyValidations(job);
    } while(!status.canProceed());

    io.out.println(MessageFormat.format(getResource()
        .getString(Constants.RES_CLONE_JOB_SUCCESSFUL), status.name(),
        job.getPersistenceId()));
  }
View Full Code Here

      jobType,
      connector.getJobForms(jobType),
      framework.getJobForms(jobType)
    );

    Status status = Status.FINE;

    io.out.println(getResource().getString(Constants.RES_PROMPT_FILL_JOB_METADATA));

    do {
      // Print error introduction if needed
      if( !status.canProceed() ) {
        errorIntroduction(io);
      }

      // Fill in data from user
      if(!fillJob(io, reader, job, connectorBundle, frameworkBundle)) {
        return;
      }

      // Try to create
      status = createJobApplyValidations(job);
    } while(!status.canProceed());

    io.out.println(MessageFormat.format(getResource()
        .getString(Constants.RES_CREATE_JOB_SUCCESSFUL), status.name(),
        job.getPersistenceId()));
  }
View Full Code Here

    job.setPersistenceId(MPersistableEntity.PERSISTANCE_ID_DEFAULT);

    ResourceBundle connectorBundle = client.getResourceBundle(job.getConnectorId());
    ResourceBundle frameworkBundle = client.getFrameworkResourceBundle();

    Status status = Status.FINE;

    // Remove persistent id as we're making a clone
    job.setPersistenceId(MPersistableEntity.PERSISTANCE_ID_DEFAULT);

    printlnResource(Constants.RES_PROMPT_UPDATE_JOB_METADATA);
    do {
      // Print error introduction if needed
      if( !status.canProceed() ) {
        errorIntroduction();
      }

      // Fill in data from user
      if(!fillJob(reader, job, connectorBundle, frameworkBundle)) {
        return;
      }

      // Try to create
      status = client.createJob(job);
    } while(!status.canProceed());

    printlnResource(Constants.RES_CLONE_JOB_SUCCESSFUL, status.name(), job.getPersistenceId());
  }
View Full Code Here

    MConnection connection = client.getConnection(connectionId);
    // Remove persistent id as we're making a clone
    connection.setPersistenceId(MPersistableEntity.PERSISTANCE_ID_DEFAULT);

    Status status = Status.FINE;
    printlnResource(Constants.RES_PROMPT_UPDATE_CONN_METADATA);

    ResourceBundle connectorBundle = client.getResourceBundle(connection.getConnectorId());
    ResourceBundle frameworkBundle = client.getFrameworkResourceBundle();
    do {
      // Print error introduction if needed
      if( !status.canProceed() ) {
        errorIntroduction();
      }

      // Fill in data from user
      if(!fillConnection(reader, connection, connectorBundle, frameworkBundle)) {
        return;
      }

      status = client.createConnection(connection);

    } while(!status.canProceed());

    printlnResource(Constants.RES_CLONE_CONN_SUCCESSFUL, status.name(), connection.getPersistenceId());
  }
View Full Code Here

      = new HashMap<Validation.FormInput, Validation.Message>();

    for(Object key : jsonMessages.keySet()) {
      JSONObject jsonMessage = (JSONObject) jsonMessages.get(key);

      Status status = Status.valueOf((String) jsonMessage.get(STATUS));
      String stringMessage = (String) jsonMessage.get(MESSAGE);

      Validation.Message message
        = new Validation.Message(status, stringMessage);

      messages.put(new Validation.FormInput((String)key), message);
    }

    Status status = Status.valueOf((String) jsonObject.get(STATUS));

    return new Validation(status, messages);
  }
View Full Code Here

TOP

Related Classes of org.apache.sqoop.validation.Status

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.