Package com.ibm.xsp.minifier

Examples of com.ibm.xsp.minifier.ResourceFactory


        pw.println("          '"+sbtPath+"/js/sdk/_layers/sbt-extra-controls-dojo-amd.js'");
        pw.println("        ]");
      }
     
      protected void aggregatorAddLibraryModules(DojoDependencyList dojoResources) throws IOException {
            ResourceFactory factory = dojoResources.getFactory();
            DojoLibrary dojoLibrary = dojoResources.getDojoLibrary();
   
    //        if(includeSDKModules) {
          // The resources bellow are generally needed
          // They should not be included if the SDK layer is already loaded
            dojoResources.addResource(factory.getDojoResource("sbt.config",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.declare",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.defer",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.lang",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.Promise",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.log",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.stringUtil",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.xml",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.i18n",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.ErrorTransport",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.Endpoint",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.pathUtil",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.Proxy",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.Cache",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.xpath",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.util",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.dom",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.text",dojoLibrary));
           
            // These ones don't have direct dep in the source code
          // The are loaded by the config
          //sbt/ErrorTransport', 'sbt/Endpoint', 'sbt/Proxy', 'sbt/_bridge/Transport', 'sbt/authenticator/Basic', 'sbt/util
            dojoResources.addResource(factory.getDojoResource("sbt.ErrorTransport",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.Endpoint",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.Proxy",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt._bridge.Transport",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt._bridge.i18n",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.authenticator.Basic",dojoLibrary));
            dojoResources.addResource(factory.getDojoResource("sbt.util",dojoLibrary));
      }
    };
  }
View Full Code Here


    protected void emitDojoAggregatedConfig(PrintWriter pw, String serverUrl) throws IOException {
    }
   
    protected String aggregatorAddModules(String serverUrl, String js, boolean includeLibraryModules) throws IOException {
      // XPages aggregator
          ResourceFactory factory = ResourceFactory.get();
          DojoLibrary dojoLibrary = DojoLibraryFactory.getDefaultLibrary(false);
          String dojoLocale = "en-us";
          DojoDependencyList dojoResources = new DojoDependencyList(factory,dojoLibrary,dojoLocale);
         
          aggregatorAddDojoModules(dojoResources);
View Full Code Here

          String dojoAgg = PathUtil.concat(serverUrl, fullUrl, '/');
          return dojoAgg;
    }
     
    protected void aggregatorAddDojoModules(DojoDependencyList dojoResources) throws IOException {
          ResourceFactory factory = dojoResources.getFactory();
          DojoLibrary dojoLibrary = dojoResources.getDojoLibrary();
         
        // Common dojo resources
          dojoResources.addResource(factory.getDojoResource("dojo.parser",dojoLibrary));
          dojoResources.addResource(factory.getDojoResource("dojo.date",dojoLibrary));
          dojoResources.addResource(factory.getDojoResource("dojo.date.locale",dojoLibrary));
          dojoResources.addResource(factory.getDojoResource("dojo.regexp",dojoLibrary));
          dojoResources.addResource(factory.getDojoResource("dojo.i18n",dojoLibrary));
          dojoResources.addResource(factory.getDojoResource("dojo.string",dojoLibrary));
          dojoResources.addResource(factory.getDojoResource("dojo.cache",dojoLibrary));
          dojoResources.addResource(factory.getDojoResource("dojo.text",dojoLibrary));
         
          // Controls
          dojoResources.addResource(factory.getDojoResource("dijit._WidgetBase",dojoLibrary));
          dojoResources.addResource(factory.getDojoResource("dijit._TemplatedMixin",dojoLibrary));
          dojoResources.addResource(factory.getDojoResource("dojo.touch",dojoLibrary));
    }
View Full Code Here

   
    protected void aggregatorAddLibraryModules(DojoDependencyList dojoResources) throws IOException {
    }
   
    protected void aggregatorAddJSDependencyModules(DojoDependencyList dojoResources, String js) throws IOException {
          ResourceFactory factory = dojoResources.getFactory();
          DojoLibrary dojoLibrary = dojoResources.getDojoLibrary();
 
          //if(includeSDKModules) {
          // Extract the entries from the JS file
          // This might be in the SDK layer already, so we don't load them if not fully using the XPages agg but the SDK one
          if(StringUtil.isNotEmpty(js)) {
            Matcher matcher = amdRequireRegEx.matcher(js);
            while(matcher.find()) {
              String s = matcher.group(1);
              Matcher matcher2 = amdRequireRegEx2.matcher(s);
              while(matcher2.find()) {
                String mod = StringUtil.replace(matcher2.group(1),'/','.');
                DojoResource res = factory.getDojoResource(mod,dojoLibrary);
                if(res!=null) {
                  dojoResources.addResource(res);
                }
              }
            }
View Full Code Here

TOP

Related Classes of com.ibm.xsp.minifier.ResourceFactory

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.