Package org.pentaho.reporting.libraries.css.resolver

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


          throws FunctionEvaluationException
  {
    final CSSValue[] params = function.getParameters();
    if (params.length != 1)
    {
      throw new FunctionEvaluationException();
    }
    final String name = FunctionUtilities.resolveString(layoutProcess, element, params[0]);
    return new VariableToken(name);
  }
View Full Code Here


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

    CounterStyle cstyle = null;
View Full Code Here

      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

          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

  {
    // 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

      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

      {
        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

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

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

    // 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

TOP

Related Classes of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

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.