Package org.pentaho.reporting.designer.core.inspections

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


          if (attrMetaData == null)
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("InvalidFormatInspection.AttributeExpressionInvalidFormatNoMetaData",
                    element.getName(), attributeNamespace, attributeName, fmtString, metaData.getDisplayName(Locale.getDefault())),
                new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, metaData.getName())));
          }
          else
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("InvalidFormatInspection.AttributeExpressionInvalidFormat",
                    element.getName(), attrMetaData.getDisplayName(Locale.getDefault()), fmtString, metaData.getDisplayName(Locale.getDefault())),
                new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, metaData.getName())));
          }

        }

      }
View Full Code Here


          if (attributeMetaData == null)
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("ExpressionsParameterInspection.AttributeExpressionMandatoryPropertyMissingNoMetaData",
                    element.getName(), attributeNamespace, attributeName, metaData.getDisplayName(Locale.getDefault())),
                new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, metaData.getName())));
          }
          else
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("ExpressionsParameterInspection.AttributeExpressionMandatoryPropertyMissing",
                    element.getName(), attributeMetaData.getDisplayName(Locale.getDefault()),
                    metaData.getDisplayName(Locale.getDefault())),
                new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, 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();

          final AttributeMetaData attributeMetaData =
              element.getMetaData().getAttributeDescription(attributeNamespace, attributeName);
          if (attributeMetaData == null)
          {
            if (property == null)
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                  Messages.getString("ExpressionsParameterInspection.AttributeExpressionValidationErrorNoMetaData",
                      element.getName(), attributeNamespace, attributeName, warning),
                  new AttributeLocationInfo(element, attributeNamespace, attributeName, true)));
            }
            else
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                  Messages.getString("ExpressionsParameterInspection.AttributeExpressionValidationPropertyErrorNoMetaData",
                      element.getName(), attributeNamespace, attributeName, property, warning),
                  new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, property)));
            }
          }
          else
          {
            if (property == null)
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                  Messages.getString("ExpressionsParameterInspection.AttributeExpressionValidationError",
                      element.getName(), attributeMetaData.getDisplayName(Locale.getDefault()), warning),
                  new AttributeLocationInfo(element, attributeNamespace, attributeName, true)));
            }
            else
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                  Messages.getString("ExpressionsParameterInspection.AttributeExpressionValidationPropertyError",
                      element.getName(), attributeMetaData.getDisplayName(Locale.getDefault()), property, warning),
                  new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, property)));
            }
          }
        }
      }
    }
View Full Code Here

            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

          if (attributeMetaData == null)
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("ExpressionsParameterInspection.AttributeExpressionMandatoryPropertyMissingNoMetaData",
                    element.getName(), attributeNamespace, attributeName, metaData.getDisplayName(Locale.getDefault())),
                new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, metaData.getName())));
          }
          else
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("ExpressionsParameterInspection.AttributeExpressionMandatoryPropertyMissing",
                    element.getName(), attributeMetaData.getDisplayName(Locale.getDefault()),
                    metaData.getDisplayName(Locale.getDefault())),
                new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, 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();

          final AttributeMetaData attributeMetaData =
              element.getMetaData().getAttributeDescription(attributeNamespace, attributeName);
          if (attributeMetaData == null)
          {
            if (property == null)
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                  Messages.getString("ExpressionsParameterInspection.AttributeExpressionValidationErrorNoMetaData",
                      element.getName(), attributeNamespace, attributeName, warning),
                  new AttributeLocationInfo(element, attributeNamespace, attributeName, true)));
            }
            else
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                  Messages.getString("ExpressionsParameterInspection.AttributeExpressionValidationPropertyErrorNoMetaData",
                      element.getName(), attributeNamespace, attributeName, property, warning),
                  new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, property)));
            }
          }
          else
          {
            if (property == null)
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                  Messages.getString("ExpressionsParameterInspection.AttributeExpressionValidationError",
                      element.getName(), attributeMetaData.getDisplayName(Locale.getDefault()), warning),
                  new AttributeLocationInfo(element, attributeNamespace, attributeName, true)));
            }
            else
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                  Messages.getString("ExpressionsParameterInspection.AttributeExpressionValidationPropertyError",
                      element.getName(), attributeMetaData.getDisplayName(Locale.getDefault()), property, warning),
                  new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, property)));
            }
          }
        }
      }
    }
View Full Code Here

            if (attrMetaData == null)
            {
              resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.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, InspectionResult.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

          if (attrMetaData == null)
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("InvalidFormatInspection.AttributeExpressionInvalidFormatNoMetaData",
                    element.getName(), attributeNamespace, attributeName, fmtString, metaData.getDisplayName(Locale.getDefault())),
                new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, metaData.getName())));
          }
          else
          {
            resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
                Messages.getString("InvalidFormatInspection.AttributeExpressionInvalidFormat",
                    element.getName(), attrMetaData.getDisplayName(Locale.getDefault()), fmtString, metaData.getDisplayName(Locale.getDefault())),
                new AttributeExpressionPropertyLocationInfo(element, attributeNamespace, attributeName, metaData.getName())));
          }

        }

      }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.designer.core.inspections.AttributeExpressionPropertyLocationInfo

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.