Package org.pentaho.reporting.engine.classic.core.metadata

Examples of org.pentaho.reporting.engine.classic.core.metadata.DataFactoryMetaData


    DataFactory m = getDataFactoryForQuery(element, query);
    if (m == null)
    {
      return null;
    }
    DataFactoryMetaData md = m.getMetaData();
    if (md == null)
    {
      return null;
    }
    return md.getReferencedFields(m, query, parameter);
  }
View Full Code Here


    DataFactory m = getDataFactoryForQuery(element, query);
    if (m == null)
    {
      return null;
    }
    DataFactoryMetaData md = m.getMetaData();
    if (md == null)
    {
      return null;
    }
    return md.getReferencedResources(m, resourceManager, query, parameter);
  }
View Full Code Here

    DataFactory m = getDataFactoryForQuery(dataFactory, queryName);
    if (m == null)
    {
      return null;
    }
    DataFactoryMetaData md = m.getMetaData();
    if (md == null)
    {
      return null;
    }
    return md.getQueryHash(m, queryName, parameter);
  }
View Full Code Here

    if (datasourceId == null)
    {
      return "";
    }

    DataFactoryMetaData meta = DataFactoryRegistry.getInstance().getMetaData(datasourceId);
    String displayName = meta.getDisplayName(getLocale());
    return Messages.getString("KettleEmbeddedDataSourceDialog.Title", displayName);

  }
View Full Code Here

    for (int i = 0; i < queries.length; i++)
    {
      final String query = queries[i];
      if (DesignTimeUtil.isSelectedDataSource(reportRenderContext.getReportDefinition(), dataFactory, query))
      {
        final DataFactoryMetaData metaData = dataFactory.getMetaData();
        final String[] referencedFields = metaData.getReferencedFields(dataFactory, query, dataRow);
        if (referencedFields == null)
        {
          continue;
        }
        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

      {
        setEnabled(false);
        return;
      }

      final DataFactoryMetaData metadata =
          DataFactoryRegistry.getInstance().getMetaData(dataFactory.getClass().getName());
      if (metadata.isEditable())
      {
        setEnabled(true);
        return;
      }
View Full Code Here

    if (DataFactoryRegistry.getInstance().isRegistered(dataFactory.getClass().getName()) == false)
    {
      return;
    }

    final DataFactoryMetaData metadata =
        DataFactoryRegistry.getInstance().getMetaData(dataFactory.getClass().getName());
    if (metadata.isEditable() == false)
    {
      return;
    }

    final DataSourcePlugin dataSourcePlugin = metadata.createEditor();
    final DataFactory storedFactory = dataFactory.derive();
    if (dataSourcePlugin.canHandle(dataFactory))
    {
      final ReportRenderContext activeContext = getActiveContext();
      final AbstractReportDefinition report = activeContext.getReportDefinition();
View Full Code Here

  {
    final DataFactoryMetaData[] datas = DataFactoryRegistry.getInstance().getAll();
    final Map<String, Boolean> groupMap = new HashMap<String, Boolean>();
    for (int i = 0; i < datas.length; i++)
    {
      final DataFactoryMetaData data = datas[i];
      if (data.isHidden())
      {
        continue;
      }
      if (data.isEditorAvailable() == false)
      {
        continue;
      }
      final String currentGrouping = data.getGrouping(Locale.getDefault());
      groupMap.put(currentGrouping, groupMap.containsKey(currentGrouping));
    }

    Arrays.sort(datas, new GroupedMetaDataComparator());
    Object grouping = null;
    JMenu subMenu = null;
    boolean firstElement = true;
    for (int i = 0; i < datas.length; i++)
    {
      final DataFactoryMetaData data = datas[i];
      if (data.isHidden())
      {
        continue;
      }
      if (data.isEditorAvailable() == false)
      {
        continue;
      }

      final String currentGrouping = data.getGrouping(Locale.getDefault());
      final Boolean isMultiGrouping = groupMap.get(currentGrouping);
      if (firstElement == false)
      {
        if (ObjectUtilities.equal(currentGrouping, grouping) == false)
        {
View Full Code Here

          if (dataFactory != null)
          {
            final String key = dataFactory.getClass().getName();
            if (DataFactoryRegistry.getInstance().isRegistered(key))
            {
              final DataFactoryMetaData data = DataFactoryRegistry.getInstance().getMetaData(key);
              if (data.isFormattingMetaDataSource())
              {
                visualElement.setAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ALLOW_METADATA_ATTRIBUTES, Boolean.TRUE);
                visualElement.setAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ALLOW_METADATA_STYLING, Boolean.TRUE);
              }
            }
View Full Code Here

      if (DataFactoryRegistry.getInstance().isRegistered(dataFactory.getClass().getName()) == false)
      {
        return;
      }

      final DataFactoryMetaData metadata =
          DataFactoryRegistry.getInstance().getMetaData(dataFactory.getClass().getName());
      if (metadata.isEditable() == false)
      {
        return;
      }

      final int idx = availableDataSourcesModel.indexOf(dataFactory);
      if (idx == -1)
      {
        throw new IllegalStateException("DataSource Model is out of sync with the GUI");
      }

      final DataSourcePlugin dataSourcePlugin = metadata.createEditor();
      if (dataSourcePlugin.canHandle(dataFactory))
      {
        final DataFactory editedDataFactory = dataSourcePlugin.performEdit
            (new ParameterEditorDesignTimeContext(), dataFactory, null);
        if (editedDataFactory == null)
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.metadata.DataFactoryMetaData

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.