Package org.apache.avalon.framework.parameters

Examples of org.apache.avalon.framework.parameters.Parameters


   * or an association list
   * @return an Avalon <code>Parameters</code> instance
   */
  static public Parameters getParameters(Value sparams)
  {
    Parameters params = emptyParam;

    if (!sparams.eq(FALSE)) {
      params = new Parameters();
      Pair sparamValues = pair(pair(sparams).cdr);
      while (sparamValues != EMPTYLIST) {
        Pair entry = pair(sparamValues.car);
        String name = string(entry.car);
        String value = string(entry.cdr);
        params.setParameter(name, value);
        sparamValues = pair(sparamValues.cdr);
      }
    }

    return params;
View Full Code Here


      throw new RuntimeException("No 'src' attribute specified for 'generate'!");
    String src = string(pair(ssrc).cdr);

    // Obtain the parameters
    Value sparams = assq(sargs, Symbol.get("params"));
    Parameters params = getParameters(sparams);

    //     System.out.println("generate type " + type + ", src " + src
    //                        + " params " + params);
   
    eventPipeline.setGenerator(type, src, params);
View Full Code Here

    else
      type = sitemap.getDefaultReaderType();

    // Obtain the parameters
    Value sparams = assq(sargs, Symbol.get("params"));
    Parameters params = getParameters(sparams);

    pipeline.setReader(type, src, params, mimeType);

    return new J2S.JavaObject(pipeline);
  }
View Full Code Here

    else
      type = sitemap.getDefaultTransformerType();

    // Obtain the parameters
    Value sparams = assq(sargs, Symbol.get("params"));
    Parameters params = getParameters(sparams);

//     System.out.println("transform type " + type + ", src " + src
//                        + " params " + params);
   
    eventPipeline.addTransformer(type, src, params);
View Full Code Here

    if (!smimeType.eq(FALSE))
      mimeType = string(pair(smimeType).cdr);

    // Obtain the parameters
    Value sparams = assq(sargs, Symbol.get("params"));
    Parameters params = getParameters(sparams);

//     System.out.println("serialize type " + type
//                        + " params " + params + " mime-type " + mimeType);
   
    pipeline.setSerializer(type, null, params, mimeType);
View Full Code Here

        Map               objectModel    = env.getObjectModel();
        SitemapRedirector redirector     = PipelinesNode.getRedirector(env);
        SourceResolver    resolver       = getSourceResolver(objectModel);
        List              mapStack       = context.getMapStack();
        String            resolvedSource = source.resolve(mapStack);
        Parameters        resolvedParams = MapStackResolver.buildParameters(this.parameters, mapStack);

        Map actionResult;

        // If action is ThreadSafe, avoid select() and try/catch block (faster !)
        if (this.threadSafeAction != null) {
View Full Code Here

        List mapStack = context.getMapStack();

        String resolvedPattern = pattern.resolve(mapStack);
        Map objectModel = env.getObjectModel();
        Parameters resolvedParams = MapStackResolver.buildParameters(this.parameters, mapStack);

        Map result = null;

        if (this.threadSafeMatcher != null) {
            // Avoid select() and try/catch block (faster !)
View Full Code Here

      throws Exception {

        // Prepare data needed by the action
        Map objectModel = env.getObjectModel();
        List mapStack   = context.getMapStack();
        Parameters resolvedParams = MapStackResolver.buildParameters(this.parameters, mapStack);

        // If selector is ThreadSafe, avoid select() and try/catch block (faster !)
        if (this.threadSafeSelector != null) {

            for (int i = 0; i < this.whenTests.length; i++) {
View Full Code Here

        protected HashMap outParametersNames = null;

        protected Query( SQLTransformer transformer, int query_index ) {
            this.transformer = transformer;
            this.query_index = query_index;
            this.properties = new Parameters();
            this.properties.merge( transformer.parameters );
        }
View Full Code Here

     * Abstract out the Logicsheet creation.  Handles both Named and regular logicsheets.
     */
    private Logicsheet createLogicsheet(Configuration configuration, boolean named)
            throws Exception
    {
        Parameters params = Parameters.fromConfiguration(configuration);

        Logicsheet logicsheet;
        if (named) {
            String location = params.getParameter("href", null);
            String uri = params.getParameter("uri", null);
            String prefix = params.getParameter("prefix", null);

            NamedLogicsheet namedLogicsheet =
                new NamedLogicsheet(location, manager, urlResolver);
            namedLogicsheet.setLogger(getLogger());
            namedLogicsheet.setURI(uri);
            namedLogicsheet.setPrefix(prefix);
            logicsheet = namedLogicsheet;
        } else {
            String location = params.getParameter("core-logicsheet", null);
            logicsheet = new Logicsheet(location, manager, urlResolver);
            logicsheet.setLogger(getLogger());
        }

        String logicsheetName = logicsheet.getSystemId();
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.parameters.Parameters

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.