Package it.eng.spago.base

Examples of it.eng.spago.base.SourceBeanAttribute


    logger.debug("IN");
    List toReturn = new ArrayList();
    List list = getResponse().getContainedAttributes();
    Iterator it = list.iterator();
    while (it.hasNext()) {
      SourceBeanAttribute sba = (SourceBeanAttribute) it.next();
      String key = sba.getKey();
      toReturn.add(key);
    }
    logger.debug("OUT");
    return toReturn;
  }
View Full Code Here


      }
      else

        Iterator intervalsAttrsIter = intervalsAttrsList.iterator();
        while(intervalsAttrsIter.hasNext()) {
          SourceBeanAttribute paramSBA = (SourceBeanAttribute)intervalsAttrsIter.next();
          SourceBean param = (SourceBean)paramSBA.getValue();
          String min= (String)param.getAttribute(MIN_INTERVAL);
          String max= (String)param.getAttribute(MAX_INTERVAL);
          String col= (String)param.getAttribute(COLOR_INTERVAL);

          KpiInterval interval=new KpiInterval();
          interval.setMin(Double.valueOf(min).doubleValue());
          interval.setMax(Double.valueOf(max).doubleValue());

          Color color=new Color(Integer.decode(col).intValue());
          if(color!=null){
            interval.setColor(color);}
          else{
            // sets default color
            interval.setColor(Color.WHITE);
          }
          addInterval(interval);
        }
      }
     
      //reading values colors if present
      SourceBean colors = (SourceBean)content.getAttribute(VALUES_COLORS);
      if(colors!=null){
        colorMap=new HashMap();
        List atts=colors.getContainedAttributes();
        String colorValue="";
        for (Iterator iterator = atts.iterator(); iterator.hasNext();) {
          SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();

          String valueName=new String(object.getKey());
          colorValue=new String((String)object.getValue());
          Color col=new Color(Integer.decode(colorValue).intValue());
          if(col!=null){
            colorMap.put(valueName,col);
          }
        } 
View Full Code Here


      int contSer = 0;
      //run all the attributes in a row, to define series
      for (Iterator iterator2 = atts.iterator(); iterator2.hasNext();) {
        SourceBeanAttribute object = (SourceBeanAttribute) iterator2.next();

        name=new String(object.getKey());
        value=new String((String)object.getValue());
       
        if (name.startsWith("serie")){
            // map containing the series
            series.put(name, value);
            contSer++;
View Full Code Here


      int contSer = 0;
      //run all the attributes in a row, to define series pertaining to a category!
      for (Iterator iterator2 = atts.iterator(); iterator2.hasNext();) {
        SourceBeanAttribute object = (SourceBeanAttribute) iterator2.next();

        name=new String(object.getKey());
        value=new String((String)object.getValue());

        // the one targeted x is the category name
        if(name.equalsIgnoreCase("x"))
        {
          catValue=value;
View Full Code Here

      List atts=colors.getContainedAttributes();
      String colorNum="";
      String colorSerie="";
      String num="";
      for (Iterator iterator = atts.iterator(); iterator.hasNext();) {
        SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();

        String serieName=new String(object.getKey());
        colorSerie=new String((String)object.getValue());
        Color col=new Color(Integer.decode(colorSerie).intValue());
        if(col!=null){
          colorMap.put(serieName,col);
        }
      }   

    }


    //reading series colors if present, if present this overrides series colors!!!
    SourceBean orderColors = (SourceBean)content.getAttribute(SERIES_ORDER_COLORS);
    if(orderColors==null){
      orderColors = (SourceBean)content.getAttribute("CONF."+SERIES_ORDER_COLORS);
    }
    if(orderColors!=null){
      orderColorVector=new Vector<Color>();
      List atts=orderColors.getContainedAttributes();
      String numSerie="";
      String colorSerie="";
      for (Iterator iterator = atts.iterator(); iterator.hasNext();) {
        SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();
        numSerie=new String(object.getKey());
        colorSerie=new String((String)object.getValue());
        Color col=new Color(Integer.decode(colorSerie).intValue());
        if(col!=null){
          orderColorVector.add(col);
          //colorMap.put(numSerie,col);
        }
      }   

    }


    //reading filter style if present
    SourceBean sbSerieStyle = (SourceBean)content.getAttribute("STYLE_SLIDER_AREA");
    if(sbSerieStyle==null){
      sbSerieStyle = (SourceBean)content.getAttribute("CONF.STYLE_SLIDER_AREA");
    }
    if(sbSerieStyle!=null){
      List atts=sbSerieStyle.getContainedAttributes();
      String StyleValue = "";
      for (Iterator iterator = atts.iterator(); iterator.hasNext();) {
        SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();
        String styleLabel=(String)object.getKey();
        StyleValue=new String((String)object.getValue());
        if(StyleValue!=null){
          if (styleLabel.equalsIgnoreCase("font")) styleLabel = "font-family";
          else if (styleLabel.equalsIgnoreCase("size")) styleLabel = "font-size";
          else if (styleLabel.equalsIgnoreCase("color")) styleLabel = "color";
View Full Code Here

      }
      else

        Iterator intervalsAttrsIter = intervalsAttrsList.iterator();
        while(intervalsAttrsIter.hasNext()) {
          SourceBeanAttribute paramSBA = (SourceBeanAttribute)intervalsAttrsIter.next();
          SourceBean param = (SourceBean)paramSBA.getValue();

          String label="";
          if(param.getAttribute("label")!=null)
            label=(String)param.getAttribute("label");
          String min= (String)param.getAttribute(MIN_INTERVAL);
View Full Code Here


      //run all the attributes, to define series!
      int contSer = 0;
      for (Iterator iterator2 = atts.iterator(); iterator2.hasNext();) {
        SourceBeanAttribute object = (SourceBeanAttribute) iterator2.next();

        nameP=new String(object.getKey());
        value=new String((String)object.getValue());
        if(nameP.equalsIgnoreCase("x"))
        {
          catValue=value;
          categoriesNumber++;
          categories.put(new Integer(categoriesNumber),value);
View Full Code Here

    if(colors!=null){
      colorMap=new LinkedHashMap();
      List atts=colors.getContainedAttributes();
      String colorSerie="";
      for (Iterator iterator = atts.iterator(); iterator.hasNext();) {
        SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();

        String serieName=new String(object.getKey());
        colorSerie=new String((String)object.getValue());
        Color col=new Color(Integer.decode(colorSerie).intValue());
        if(col!=null){
          colorMap.put(serieName,col);
        }
      }   
    }
    //reading gradient colors if present
    SourceBean gradients = (SourceBean)content.getAttribute("GRADIENTS_COLORS");
    if(gradients==null){
      gradients = (SourceBean)content.getAttribute("CONF.GRADIENTS_COLORS");
    }
    if(gradients!=null){
      gradientMap=new LinkedHashMap();
      List atts=gradients.getContainedAttributes();
      String gradientSerie="";
      for (Iterator iterator = atts.iterator(); iterator.hasNext();) {
        SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();

        String serieName=new String(object.getKey());
        gradientSerie=new String((String)object.getValue());
        Color col=new Color(Integer.decode(gradientSerie).intValue());
        if(col!=null){
          gradientMap.put(serieName,col);
        }
      }   
    }
    //reading subcategories labels
    SourceBean subcatLabels = (SourceBean)content.getAttribute("SUBCATEGORY_LABELS");
    if(subcatLabels==null){
      subcatLabels = (SourceBean)content.getAttribute("CONF.SUBCATEGORY_LABELS");
    }
    if(subcatLabels!=null){
      subCatLabelsMap=new LinkedHashMap();
      List atts=subcatLabels.getContainedAttributes();
      String label="";
      for (Iterator iterator = atts.iterator(); iterator.hasNext();) {
        SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();

        String subcatName=new String(object.getKey());
        label=new String((String)object.getValue());
        if(label!=null){
          subCatLabelsMap.put(subcatName,label);
        }
      }   
View Full Code Here

    PortletRequest portReq = PortletUtilities.getPortletRequest();
    PortletPreferences pref = portReq.getPreferences();
    String prefPrefix = "PORTLET_PREF_";
    Iterator it = attributes.iterator();
    while (it.hasNext()) {
      SourceBeanAttribute attribute = (SourceBeanAttribute) it.next();
      String key = attribute.getKey();
      if (key != null && key.startsWith(prefPrefix)) {
        String prefName = key.substring(prefPrefix.length());
        String prefValues = (String) attribute.getValue();
        String[] values = prefValues.split(",");
        pref.setValues(prefName, values);
      }
    }
    pref.store();
View Full Code Here

 
  private List getSubreportsId(SourceBean request){
    List results = new ArrayList();
    List attrs = request.getContainedAttributes();
    for(int i = 0; i < attrs.size(); i++){
      SourceBeanAttribute attr = (SourceBeanAttribute)attrs.get(i);
      SpagoBITracer.debug(SpagoBIConstants.NAME_MODULE, "ListLookupReportsModule","service", " ATTR -> " + attr.getKey() + "=" + attr.getValue());
      String key = (String)attr.getKey();
      if(key.startsWith("checkbox")) {
        String id = key.substring(key.indexOf(':')+1, key.length());
        SpagoBITracer.debug(SpagoBIConstants.NAME_MODULE, "ListLookupReportsModule","service", " ATTR [OK] " + id);
        results.add(new Integer(id));
      }
View Full Code Here

TOP

Related Classes of it.eng.spago.base.SourceBeanAttribute

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.