Examples of BeanUtility


Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

  }

  public void testSimpleProperties ()
          throws IntrospectionException, BeanException
  {
    final BeanUtility bu = new BeanUtility(new TestBean());
    validateProperty(bu, "simpleColor", Color.red, null);
    validateProperty(bu, "simpleString", "Hello World", null);
    validateProperty(bu, "simpleBool", Boolean.TRUE, Boolean.FALSE);
    validateProperty(bu, "simpleDouble", new Double(100), new Double(0));
    validateProperty(bu, "arrayOnly", new String[]{"test"}, new String[0]);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

  {
    final TestBean testBean = new TestBean();
    testBean.setArrayOnly(new String[1]);
    testBean.setFullyIndexed(new String[1]);
    testBean.setIndexOnly(0, null);
    final BeanUtility bu = new BeanUtility(testBean);
    validateProperty(bu, "arrayOnly[0]", "Color.red", null);
    validateProperty(bu, "fullyIndexed[0]", "Hello World", null);
    validateProperty(bu, "indexOnly[0]", "Boolean.TRUE", null);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

                                            final ExpressionMetaData expressionMetaData)
  {

    try
    {
      final BeanUtility utility = new BeanUtility(expression);
      final ExpressionPropertyMetaData[] propertyDescriptions = expressionMetaData.getPropertyDescriptions();
      for (int x = 0; x < propertyDescriptions.length; x++)
      {
        final ExpressionPropertyMetaData metaData = propertyDescriptions[x];
        final Object o = utility.getProperty(metaData.getName());
        if (o instanceof String == false)
        {
          continue;
        }
        final String fmtString = (String) o;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

      return;
    }

    try
    {
      final BeanUtility utility = new BeanUtility(expression);
      final ExpressionPropertyMetaData[] propertyDescriptions = expressionMetaData.getPropertyDescriptions();
      for (int x = 0; x < propertyDescriptions.length; x++)
      {
        final ExpressionPropertyMetaData metaData = propertyDescriptions[x];
        final Object o = utility.getProperty(metaData.getName());
        if (o instanceof String == false)
        {
          continue;
        }
        final String fmtString = (String) o;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

      return;
    }

    try
    {
      final BeanUtility utility = new BeanUtility(expression);
      final ExpressionPropertyMetaData[] datas = expressionMetaData.getPropertyDescriptions();
      for (int i = 0; i < datas.length; i++)
      {
        final ExpressionPropertyMetaData metaData = datas[i];
        final Object o = utility.getProperty(metaData.getName());
        if (o instanceof String == false)
        {
          continue;
        }
        final String fmtString = (String) o;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

      return;
    }

    try
    {
      final BeanUtility utility = new BeanUtility(expression);
      final ExpressionPropertyMetaData[] datas = expressionMetaData.getPropertyDescriptions();
      for (int i = 0; i < datas.length; i++)
      {
        final ExpressionPropertyMetaData metaData = datas[i];
        if (metaData.isHidden())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowExpertItems() == false && metaData.isExpert())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowDeprecatedItems() == false && metaData.isDeprecated())
        {
          continue;
        }

        if (!"ElementName".equals(metaData.getPropertyRole()))//NON-NLS
        {
          continue;
        }

        final Object o = utility.getProperty(metaData.getName());
        final String[] elements = metaData.getReferencedElements(expression, o);
        for (int j = 0; j < elements.length; j++)
        {
          final String element = elements[j];
          final AbstractReportDefinition reportDefinition = reportRenderContext.getReportDefinition();
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

      return;
    }

    try
    {
      final BeanUtility utility = new BeanUtility(expression);

      final ExpressionPropertyMetaData[] datas = expressionMetaData.getPropertyDescriptions();
      for (int i = 0; i < datas.length; i++)
      {
        final ExpressionPropertyMetaData metaData = datas[i];
        if (metaData.isHidden())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowExpertItems() == false && metaData.isExpert())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowDeprecatedItems() == false && metaData.isDeprecated())
        {
          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())),
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

      return;
    }

    try
    {
      final BeanUtility utility = new BeanUtility(expression);
      final ExpressionMetaData data = ExpressionRegistry.getInstance().getExpressionMetaData(expressionName);
      final ExpressionPropertyMetaData[] datas = data.getPropertyDescriptions();
      for (int i = 0; i < datas.length; i++)
      {
        final ExpressionPropertyMetaData metaData = datas[i];
        if (metaData.isHidden())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowExpertItems() == false && metaData.isExpert())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowDeprecatedItems() == false && metaData.isDeprecated())
        {
          continue;
        }
        if ("name".equals(metaData.getName()))
        {
          continue;
        }

        final Object o = utility.getProperty(metaData.getName());
        if (metaData.isMandatory() && o == null)
        {
          final AttributeMetaData attributeMetaData =
              element.getMetaData().getAttributeDescription(attributeNamespace, attributeName);
          if (attributeMetaData == null)
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

      return;
    }

    try
    {
      final BeanUtility utility = new BeanUtility(expression);
      final ExpressionMetaData data = ExpressionRegistry.getInstance().getExpressionMetaData(expressionName);
      final ExpressionPropertyMetaData[] datas = data.getPropertyDescriptions();
      for (int i = 0; i < datas.length; i++)
      {
        final ExpressionPropertyMetaData metaData = datas[i];
        if (metaData.isHidden())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowExpertItems() == false && metaData.isExpert())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowDeprecatedItems() == false && metaData.isDeprecated())
        {
          continue;
        }
        if ("name".equals(metaData.getName()))
        {
          continue;
        }

        final Object o = utility.getProperty(metaData.getName());
        if (metaData.isMandatory() && o == null)
        {
          final StyleMetaData description = element.getMetaData().getStyleDescription(styleKey);
          final String displayName;
          if (description == null)
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

      return;
    }

    try
    {
      final BeanUtility utility = new BeanUtility(expression);
      final ExpressionPropertyMetaData[] datas = expressionMetaData.getPropertyDescriptions();
      for (int i = 0; i < datas.length; i++)
      {
        final ExpressionPropertyMetaData metaData = datas[i];
        if (metaData.isHidden())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowExpertItems() == false && metaData.isExpert())
        {
          continue;
        }
        if (WorkspaceSettings.getInstance().isShowDeprecatedItems() == false && metaData.isDeprecated())
        {
          continue;
        }

        if (!"Group".equals(metaData.getPropertyRole()))//NON-NLS
        {
          continue;
        }

        final Object o = utility.getProperty(metaData.getName());
        final String[] elements = metaData.getReferencedGroups(expression, o);
        for (int j = 0; j < elements.length; j++)
        {
          final String element = elements[j];
          final AbstractReportDefinition reportDefinition = reportRenderContext.getReportDefinition();
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.