Examples of DashboardDuplicateComponentError


Examples of pt.webdetails.cdf.dd.model.inst.validation.DashboardDuplicateComponentError

        this._dataSourceComponentsByLowerName.put(key, comp);
      }
      else
      {
        // Don't index datasource component by lower name and log warning.
        _logger.warn(new DashboardDuplicateComponentError(comp.getName(), this.getId()));
      }
    }
   
    this._layoutComponentsByLowerName = new LinkedHashMap<String, LayoutComponent>();
    this._layoutComponents = new ArrayList<LayoutComponent>();
    for(LayoutComponent.Builder compBuilder : builder._layoutComponents)
    {
      LayoutComponent comp;
      try
      {
        comp = compBuilder.build(metaModel);
      }
      catch(ValidationException ex)
      {
        // Ignore layout component, log warning and continue.
        _logger.warn(ex.getError());
        continue;
      }
     
      this._layoutComponents.add(comp);
     
      String key = comp.getName().toLowerCase();
      if(!this._layoutComponentsByLowerName.containsKey(key))
      {
        this._layoutComponentsByLowerName.put(key, comp);
      }
      else
      {
        // Don't index layout component by lower name and log warning.
        _logger.warn(new DashboardDuplicateComponentError(comp.getName(), this.getId()));
      }
    }
   
    this._regularComponentsByLowerName = new LinkedHashMap<String, Component>();
    this._regularComponents = new ArrayList<Component>();
    for(Component.Builder compBuilder : builder._regularComponents)
    {
      Component comp;
      try
      {
        comp = compBuilder.build(metaModel);
      }
      catch(ValidationException ex)
      {
        // Ignore regular component, log warning and continue.
        _logger.warn(ex.getError());
        continue;
      }
     
      this._regularComponents.add(comp);
     
      String key = comp.getName().toLowerCase();
      if(!this._regularComponentsByLowerName.containsKey(key))
      {
        this._regularComponentsByLowerName.put(key, comp);
      }
      else
      {
        // Don't index regular component by lower name and log warning.
        _logger.warn(new DashboardDuplicateComponentError(comp.getName(), this.getId()));
      }
    }
  }
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.