Package org.apache.sqoop.json

Examples of org.apache.sqoop.json.FrameworkBean


  public FrameworkBean read(String serverUrl) {
    String response = null;
    response = super.get(serverUrl + RESOURCE);
    JSONObject jsonObject = (JSONObject) JSONValue.parse(response);

    FrameworkBean frameworkBean = new FrameworkBean();
    frameworkBean.restore(jsonObject);

    return frameworkBean;
  }
View Full Code Here


      bundles.put(connector.getPersistenceId(), null);
    }
    return new ConnectorBean(connectorList, bundles);
  }
  private FrameworkBean frameworkBean(MFramework framework) {
    return new FrameworkBean(framework, new MapResourceBundle(null));
  }
View Full Code Here

  /**
   * Retrieve framework structure and cache it.
   */
  private void retrieveFramework() {
    FrameworkBean request =  requests.readFramework();
    framework = request.getFramework();
    frameworkBundle = request.getResourceBundle();
  }
View Full Code Here

  public JsonBean handleEvent(RequestContext ctx) {
    AuditLoggerManager.getInstance()
        .logAuditEvent(ctx.getUserName(), ctx.getRequest().getRemoteAddr(),
        "get", "framework", "");

    return new FrameworkBean(FrameworkManager.getInstance().getFramework(),
      FrameworkManager.getInstance().getBundle(ctx.getAcceptLanguageHeader()));
  }
View Full Code Here

    LOG.info("FrameworkRequestHandler initialized");
  }

  @Override
  public JsonBean handleEvent(RequestContext ctx) {
    return new FrameworkBean(FrameworkManager.getFramework(),
      FrameworkManager.getBundle(ctx.getAcceptLanguageHeader()));
  }
View Full Code Here

    io.out.println(MessageFormat.format(getResource().getString(Constants
        .RES_CREATE_CREATING_CONN), connectorId));

    ConsoleReader reader = new ConsoleReader();

    FrameworkBean frameworkBean = readFramework();
    ConnectorBean connectorBean = readConnector(connectorId);

    MFramework framework = frameworkBean.getFramework();
    ResourceBundle frameworkBundle = frameworkBean.getResourceBundle();

    MConnector connector = connectorBean.getConnectors().get(0);
    ResourceBundle connectorBundle = connectorBean.getResourceBundles().get(connector.getPersistenceId());

    MConnection connection = new MConnection(connector.getPersistenceId(),
View Full Code Here

    return null;
  }

  private void showFramework() {
    FrameworkBean frameworkBean = readFramework();

    MFramework framework = frameworkBean.getFramework();
    ResourceBundle bundle = frameworkBean.getResourceBundle();
    io.out.println(StringEscapeUtils.unescapeJava(
        MessageFormat.format(Constants.RES_SHOW_PROMPT_FRAMEWORK_OPTS,
            framework.getPersistenceId())));

    displayFormMetadataDetails(io, framework, bundle);
View Full Code Here

    io.out.println(MessageFormat.format(getResource().getString(Constants
        .RES_CREATE_CREATING_JOB), connectionId));

    ConsoleReader reader = new ConsoleReader();

    FrameworkBean frameworkBean = readFramework();
    ConnectionBean connectionBean = readConnection(connectionId);
    ConnectorBean connectorBean;

    MFramework framework = frameworkBean.getFramework();
    ResourceBundle frameworkBundle = frameworkBean.getResourceBundle();

    MConnection connection = connectionBean.getConnections().get(0);

    connectorBean = readConnector(String.valueOf(connection.getConnectorId()));
    MConnector connector = connectorBean.getConnectors().get(0);
View Full Code Here

      bundles.put(connector.getPersistenceId(), null);
    }
    return new ConnectorBean(connectorList, bundles);
  }
  private FrameworkBean frameworkBean(MFramework framework) {
    return new FrameworkBean(framework, new MapResourceBundle(null));
  }
View Full Code Here

    LOG.info("FrameworkRequestHandler initialized");
  }

  @Override
  public JsonBean handleEvent(RequestContext ctx) {
    return new FrameworkBean(FrameworkManager.getInstance().getFramework(),
      FrameworkManager.getInstance().getBundle(ctx.getAcceptLanguageHeader()));
  }
View Full Code Here

TOP

Related Classes of org.apache.sqoop.json.FrameworkBean

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.