Examples of FunctionEvaluationException


Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

      throws FunctionEvaluationException
  {
    final CSSValue[] parameters = function.getParameters();
    if (parameters.length == 0)
    {
      throw new FunctionEvaluationException
          ("One parameter must be given to the 'elements' function.");
    }

    final String name = FunctionUtilities.resolveString
        (layoutProcess, element, parameters[0]);
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

          throws FunctionEvaluationException
  {
    final CSSValue[] params = function.getParameters();
    if (params.length != 1)
    {
      throw new FunctionEvaluationException();
    }
    final CSSValue value = FunctionUtilities.resolveParameter(layoutProcess, element, params[0]);
    if (value instanceof CSSResourceValue)
    {
      final CSSResourceValue cssResourceValue =
              (CSSResourceValue) value;
      final Resource resource = cssResourceValue.getValue();
      return new ResourceContentToken(resource);
    }
    if (value instanceof CSSStringValue == false)
    {
      throw new FunctionEvaluationException
              ("Not even remotely an URI: " + value);
    }
    final CSSStringValue strval = (CSSStringValue) value;
    final CSSResourceValue cssResourceValue =
            FunctionUtilities.loadResource(layoutProcess, strval.getValue());
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

  {
    // Accepts one or two parameters ...
    final CSSValue[] params = function.getParameters();
    if (params.length < 2)
    {
      throw new FunctionEvaluationException();
    }
    final String counterName =
            FunctionUtilities.resolveString(layoutProcess, element, params[0]);
    final String separator =
            FunctionUtilities.resolveString(layoutProcess, element, params[1]);
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

      throws FunctionEvaluationException
  {
    final Class[] supportedResourceTypes = process.getSupportedResourceTypes();
    if (supportedResourceTypes.length == 0)
    {
      throw new FunctionEvaluationException
          ("Failed to create URI: Resource loading failed as the output " +
              "target does not support any resource types.");
    }
    return loadResource(process, value, supportedResourceTypes);
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

      {
        key = manager.deriveKey(baseKey, (String) value);
      }
      else
      {
        throw new FunctionEvaluationException
            ("Failed to create URI: Resource loading failed: Key not derivable");
      }

      final Resource res = manager.create(key, baseKey, type);
      return new CSSResourceValue(res);
    }
    catch (Exception e)
    {
      throw new FunctionEvaluationException
          ("Failed to create URI: Resource loading failed: " + e.getMessage(), e);
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

    final CSSNumericValue val = convertToNumber(text, getUnitType(type));
    if (val != null)
    {
      return val;
    }
    throw new FunctionEvaluationException("Unable to convert to number.");
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

    final CSSNumericValue val = convertToNumber(text);
    if (val != null)
    {
      return val;
    }
    throw new FunctionEvaluationException("Unable to convert to number.");
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

    // Falling back to the Value itself ..

    final String retval = notAFunctionAnymore.getCSSText();
    if (retval == null)
    {
      throw new FunctionEvaluationException
          ("Value " + notAFunctionAnymore + " is invalid");
    }
    return retval;
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

    final StyleValueFunction function =
        FunctionFactory.getInstance().getStyleFunction
            (functionValue.getFunctionName());
    if (function == null)
    {
      throw new FunctionEvaluationException
          ("Unsupported Function: " + functionValue);
    }
    return function.evaluate
        (layoutProcess, layoutElement, functionValue);
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

          throws FunctionEvaluationException
  {
    final CSSValue[] params = function.getParameters();
    if (params.length < 2)
    {
      throw new FunctionEvaluationException
              ("The parsed attr() function needs at least two parameters.");
    }
    final String namespace = FunctionUtilities.resolveString
            (layoutProcess, element, params[0]);
    final String name = FunctionUtilities.resolveString
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.