Package nsf.playground.beans

Examples of nsf.playground.beans.DataAccessBean


  public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    // The API explorer sets the current environment as a request header
    // If this parameter exists, then we initialize it
    String envName = request.getHeader("x-env");
    if(StringUtil.isNotEmpty(envName)) {
      DataAccessBean dataAccess = DataAccessBean.get();
      PlaygroundEnvironment env = dataAccess.getCurrentEnvironment(envName);
      env.prepareEndpoints();
    }
    super.service(request, response);
  }
View Full Code Here


  public PlaygroundToolkitServlet() {
  }
 
    protected SBTEnvironment getDefaultEnvironment(Context context) {
    DataAccessBean dataAccess = DataAccessBean.get();
    String envName = context.getHttpRequest().getHeader("x-env");
    //String envName = (String)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("environment");
    PlaygroundEnvironment env = dataAccess.getCurrentEnvironment(envName);
    env.prepareEndpoints();
    return env;
   
View Full Code Here

  public EnvironmentFactory() {
  }
 
  public SBTEnvironment getEnvironment(String name) {
    try {
      DataAccessBean acc = (DataAccessBean) ManagedBeanUtil.getBean(FacesContext.getCurrentInstance(), DataAccessBean.BEAN_NAME);
      return acc.getEnvironment(name);
    } catch(IOException ex) {}
    return null;
  }
View Full Code Here

      } catch(Exception ex) {}
      boolean debug = options.getBoolean("debug");
 
      String unid = requestParams.id;
 
      DataAccessBean dataAccess = DataAccessBean.get();
     
      String envName = options.getString("env");
      PlaygroundEnvironment env = dataAccess.getEnvironment(envName);
      env.prepareEndpoints();
 
      // Push the dynamic parameters to the user session
      JsonObject p = (JsonObject)options.get("params");
      if(p!=null) {
View Full Code Here

TOP

Related Classes of nsf.playground.beans.DataAccessBean

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.