Package com.ibm.sbt.jslibrary

Examples of com.ibm.sbt.jslibrary.SBTEnvironment$Property


        return null;
      }
        String environment = context.getProperty("environment");
        environment = (environment == null) ? "defaultEnvironment" : environment;
        if(environment != null) {
            SBTEnvironment env = (SBTEnvironment) context.getBean(environment);
            SBTEnvironment.Endpoint[] endpointsArray = env.getEndpointsArray();
            for(SBTEnvironment.Endpoint endpoint : endpointsArray){
                if(StringUtil.equals(endpointName, endpoint.getAlias())){
                    endpointName = endpoint.getName();
                    break;
                } else if (StringUtil.equals(endpointName, endpoint.getName())){
View Full Code Here


      else if (context.getProperty("environment") != null){
          environment = context.getProperty("environment");
      }
      Object obj = context.getBean(environment);
      if(obj != null){
          SBTEnvironment bean = (SBTEnvironment) obj;
          return bean.getRuntimesArray();
      }
      else {
          return null;
      }
  }
View Full Code Here

      else if (context.getProperty("environment") != null){
          environment = context.getProperty("environment");
      }
      Object obj = context.getBean(environment);
      if(obj != null){
          SBTEnvironment bean = (SBTEnvironment) obj;
          return bean.getRuntimesArray();
      }
      else {
          return null;
      }
  }
View Full Code Here

   * Create default environment
   */
  private SBTEnvironment createDefaultEnvironment(RenderContext renderContext) {
    Endpoint[] endpoints = { createDefaultEndpoint(renderContext) };
    Property[] properties = null;
    SBTEnvironment environment = new SBTEnvironment(LibraryRequestParams.DEFAULT_ENVIRONMENT, endpoints, properties);
    return environment;
  }
View Full Code Here

        setLibraryUrl(defaultLibraryUrl);
        setJsLibraryUrl(defaultJsLibraryUrl);
        setIframeUrl(PathUtil.concat(getToolkitUrl(), defaultIFramePath, '/'));
             
        // load initialization parameters
      SBTEnvironment environment = SBTEnvironmentFactory.get("defaultEnvironment");
      setEnvironment(environment);
    }
View Full Code Here

            logger.entering(sourceClass, "doGet", new Object[] { req, resp });
        }

        try {
            Context context = Context.get();
            SBTEnvironment environment = getDefaultEnvironment(context);
            LibraryRequest request = createLibraryRequest(req, resp);
            request.init(defaultParams);

            AbstractLibrary library = createLibrary(request);
            if (library == null) {
View Full Code Here

        synchronized (createEnvironmentLock) {
            // create a default environment if needed
            if (defaultParams.getEnvironment() == null) {
                Application application = context.getApplication();
                String environmentName = getAppParameter(application, LibraryRequestParams.PARAM_ENVIRONMENT, LibraryRequestParams.DEFAULT_ENVIRONMENT);
                SBTEnvironment environment = (SBTEnvironment) context.getBean(environmentName);
                if (environment == null) {
                    ServletConfig config = getServletConfig();
                    String defaultEndpoints = getAppParameter(application, LibraryRequestParams.PARAM_ENDPOINTS, LibraryRequestParams.DEFAULT_ENDPOINTS);
                    String endpoints = getInitParameter(config, LibraryRequestParams.PARAM_ENDPOINTS, defaultEndpoints);
                    String defaultClientProps = getAppParameter(application, LibraryRequestParams.PARAM_CLIENT_PROPERTIES, LibraryRequestParams.DEFAULT_CLIENT_PROPERTIES);
                    String clientProps = getInitParameter(config, LibraryRequestParams.PARAM_CLIENT_PROPERTIES, defaultClientProps);

                    environmentName = getInitParameter(config, LibraryRequestParams.PARAM_ENVIRONMENT, LibraryRequestParams.DEFAULT_ENVIRONMENT);
                    environment = new SBTEnvironment();
                    environment.setName(environmentName);
                    environment.setEndpoints(endpoints);
                    environment.setProperties(clientProps);
                }
                defaultParams.setEnvironment(environment);
            }
        }
View Full Code Here

        initJs = Boolean.parseBoolean(readString(params, PARAM_INITJS, getDefaultInitJs()));
        debugTransport = Boolean.parseBoolean(readString(params, PARAM_DEBUG_TRANSPORT, getDefaultDebugTransport()));
        mockTransport = Boolean.parseBoolean(readString(params, PARAM_MOCK_TRANSPORT, getDefaultMockTransport()));
        String environmentName = readString(params, PARAM_ENVIRONMENT, null);
        if (!StringUtil.isEmpty(environmentName)) {
            SBTEnvironment parentEnvironment = SBTEnvironmentFactory.get(environmentName);
            if (parentEnvironment == null) {
                String message = MessageFormat.format("Unable to load environment: {0}", environmentName);
                throw new ServletException(message);
            }
            parentEnvironment.prepareEndpoints();
            environment = new RequestEnvironment(params, parentEnvironment);
        }
        if (environment == null) {
          if(defaultEnvironment != null) {
            defaultEnvironment.prepareEndpoints();
View Full Code Here

      }
        if (environment == null ){
          environment = context.getProperty("environment");
        }
        if(environment != null) {
            SBTEnvironment env = (SBTEnvironment) context.getBean(environment);
            SBTEnvironment.Endpoint[] endpointsArray = env.getEndpointsArray();
            for(SBTEnvironment.Endpoint endpoint : endpointsArray){
                if(StringUtil.equals(endpointName, endpoint.getAlias())){
                    endpointName = endpoint.getName();
                    break;
                } else if (StringUtil.equals(endpointName, endpoint.getName())){
View Full Code Here

        StringBuffer url = request.getRequestURL().replace(index, request.getRequestURL().length(), newContext);
        applicationController.subscribeUserAndCreateStatistic(Long.valueOf(applicationVersionId), request);

        String itmsURL = "itms-services://?action=download-manifest&url=" + url.toString();

        Property property = new Property();
        property.setKey("URL");
        property.setValue(itmsURL);

        return property;
    }
View Full Code Here

TOP

Related Classes of com.ibm.sbt.jslibrary.SBTEnvironment$Property

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.