Examples of InspectionResult


Examples of org.pentaho.reporting.designer.core.inspections.InspectionResult

          {
            final AttributeMetaData attrMetaData =
                element.getMetaData().getAttributeDescription(attributeNamespace, attributeName);
            if (attrMetaData == null)
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, Severity.WARNING,
                  Messages.getString("InvalidFieldReferenceInspection.AttributeExpressionInvalidFieldNoMetaData",
                      element.getName(), attributeNamespace, attributeName, field, metaData.getDisplayName(Locale.getDefault())),
                  new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, metaData.getName())
              ));
            }
            else
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, Severity.WARNING,
                  Messages.getString("InvalidFieldReferenceInspection.AttributeExpressionInvalidField",
                      element.getName(), attrMetaData.getDisplayName(Locale.getDefault()), field, metaData.getDisplayName(Locale.getDefault())),
                  new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, metaData.getName())
              ));
            }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.inspections.InspectionResult

        {
          final String field = referencedFields[y];
          if (isValidField(field, columnNames) == false)
          {
            final StyleMetaData styleDescription = element.getMetaData().getStyleDescription(styleKey);
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("InvalidFieldReferenceInspection.StyleExpressionInvalidField",
                    element.getName(), styleDescription.getDisplayName(Locale.getDefault()),
                    field, metaData.getDisplayName(Locale.getDefault())),
                new StyleExpressionPropertyLocationInfo(element, styleKey, metaData.getName())
            ));
View Full Code Here

Examples of org.pentaho.reporting.designer.core.inspections.InspectionResult

        for (int j = 0; j < referencedFields.length; j++)
        {
          final String field = referencedFields[j];
          if (isValidField(field, columnNames) == false)
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("InvalidFieldReferenceInspection.ExpressionInvalidField", expression.getName(),
                    field, metaData.getDisplayName(Locale.getDefault())),
                new PropertyLocationInfo(expression, metaData.getName())
            ));
          }
        }
      }
    }
    catch (final Exception e)
    {
      resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
          e.getMessage(),
          new LocationInfo(expression)));
    }

  }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.inspections.InspectionResult

        for (int j = 0; j < referencedFields.length; j++)
        {
          final String field = referencedFields[j];
          if (isValidField(field, columnNames) == false)
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("InvalidFieldReferenceInspection.DataSourceInvalidField",
                    metaData.getDisplayName(Locale.getDefault()), field, query),
                new PropertyLocationInfo(dataFactory, query)
            ));
          }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.inspections.InspectionResult

    for (int i = 0; i < parameterDefinitionEntries.length; i++)
    {
      final ParameterDefinitionEntry definitionEntry = parameterDefinitionEntries[i];
      if (reservedParameterNames.contains(definitionEntry.getName()))
      {
        resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
            Messages.getInstance().formatMessage
                ("ReservedParameterNamesInspection.ReservedParameterNameUsed", definitionEntry.getName()),
            new ParameterLocationInfo(definitionEntry)));
      }
    }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.inspections.InspectionResult

    {
      final AttributeMetaData attrMeta =
          element.getMetaData().getAttributeDescription(attributeNamespace, attributeName);
      if (attrMeta != null)
      {
        resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
            Messages.getString("FormulaErrorInspection.AttributeNoFormulaNoMetaData",
                element.getName(), attrMeta.getDisplayName(Locale.getDefault())),
            new AttributeLocationInfo(element, attributeNamespace, attributeName, true)));
      }
      else
      {
        resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
            Messages.getString("FormulaErrorInspection.AttributeNoFormulaNoMetaData",
                element.getName(), attributeNamespace, attributeName),
            new AttributeLocationInfo(element, attributeNamespace, attributeName, true)));
      }
      return;
    }

    try
    {
      compileFormula(s);
    }
    catch (ParseException pe)
    {

      final AttributeMetaData attrMeta = element.getMetaData().getAttributeDescription
          (attributeNamespace, attributeName);
      if (attrMeta != null)
      {
        resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
            Messages.getString("FormulaErrorInspection.AttributeInvalidFormula",
                element.getName(), attrMeta.getDisplayName(Locale.getDefault())),
            new AttributeLocationInfo(element, attributeNamespace, attributeName, true)));
      }
      else
      {
        resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
            Messages.getString("FormulaErrorInspection.AttributeInvalidFormulaNoMetaData",
                element.getName(), attributeNamespace, attributeName),
            new AttributeLocationInfo(element, attributeNamespace, attributeName, true)));
      }
    }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.inspections.InspectionResult

    if (StringUtils.isEmpty(s, true))
    {
      final StyleMetaData description = element.getMetaData().getStyleDescription(styleKey);
      if (description == null)
      {
        resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
            Messages.getString("FormulaErrorInspection.StyleNoFormulaNoMetaData",
                element.getName(), styleKey.getName()),
            new StyleLocationInfo(element, styleKey, true)));
      }
      else
      {
        resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
            Messages.getString("FormulaErrorInspection.StyleNoFormula",
                element.getName(), description.getDisplayName(Locale.getDefault())),
            new StyleLocationInfo(element, styleKey, true)));
      }
      return;
    }

    try
    {
      compileFormula(s);
    }
    catch (ParseException pe)
    {
      // pe is ignored
      final StyleMetaData description = element.getMetaData().getStyleDescription(styleKey);
      if (description != null)
      {
        resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
            Messages.getString("FormulaErrorInspection.StyleInvalidFormula",
                element.getName(), description.getDisplayName(Locale.getDefault())),
            new StyleLocationInfo(element, styleKey, true)));
      }
      else
      {
        resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
            Messages.getString("FormulaErrorInspection.StyleInvalidFormulaNoMetaData",
                element.getName(), styleKey.getName()),
            new StyleLocationInfo(element, styleKey, true)));
      }
    }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.inspections.InspectionResult

        {
          compileFormula((String) o);
        }
        catch (ParseException fpe)
        {
          resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
              Messages.getString("FormulaErrorInspection.ExpressionInvalidFormula", expression.getName(),
                  metaData.getDisplayName(Locale.getDefault())),
              new PropertyLocationInfo(expression, metaData.getName())));
        }
      }
    }
    catch (Exception e)
    {
      resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
          e.getMessage(),
          new LocationInfo(expression)));
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.inspections.InspectionResult

    }

    final CachedLayoutData data = ModelUtility.getCachedLayoutData((Element) element);
    if (data.isConflictsInTableMode())
    {
      resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
          Messages.getString("OverlappingElementsInspection.ElementConflictsInTableMode", element.getName()),
          new LocationInfo(element)));
    }

  }
View Full Code Here

Examples of org.pentaho.reporting.designer.core.inspections.InspectionResult

          continue;
        }
        final Object o = utility.getProperty(metaData.getName());
        if (metaData.isMandatory() && o == null)
        {
          resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
              Messages.getString("ExpressionsParameterInspection.MandatoryPropertyMissing",
                  expression.getName(), metaData.getDisplayName(Locale.getDefault())),
              new PropertyLocationInfo(expression, metaData.getName())));
        }
      }

      if (expression instanceof ValidateableExpression)
      {
        final ValidateableExpression vae = (ValidateableExpression) expression;
        final Map map = vae.validateParameter(new ReportDesignerDesignTimeContext(designerContext), Locale.getDefault());
        final Iterator iterator = map.entrySet().iterator();
        while (iterator.hasNext())
        {
          final Map.Entry entry = (Map.Entry) iterator.next();
          final String property = (String) entry.getKey();
          final String warning = (String) entry.getValue();
          if (property == null)
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("ExpressionsParameterInspection.ExpressionValidationError",
                    expression.getName(), warning),
                new LocationInfo(expression)));
          }
          else
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("ExpressionsParameterInspection.ExpressionValidationPropertyError",
                    expression.getName(), property, warning),
                new PropertyLocationInfo(expression, property)));
          }
        }
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.