Package com.cloud.bridge.service.core.ec2

Examples of com.cloud.bridge.service.core.ec2.EC2Filter


    if (null != items)
    {
      // -> each filter can have one or more values associated with it
      for( int j=0; j < items.length; j++ )
      {
        EC2Filter oneFilter = new EC2Filter();
        String filterName = items[j].getName();
        oneFilter.setName( filterName );
       
        // -> is the filter one of the xsd:dateTime filters?
        timeFilter = false;
        for( int m=0; m < timeStrs.length; m++ )
        {
           timeFilter = filterName.equalsIgnoreCase( timeStrs[m] );
           if (timeFilter) break;
        }
       
        ValueSetType vst = items[j].getValueSet();
        ValueType[] valueItems = vst.getItem();
        for( int k=0; k < valueItems.length; k++ )
        {
          // -> time values are not encoded as regexes
          if ( timeFilter )
               oneFilter.addValue( valueItems[k].getValue());
          else oneFilter.addValueEncoded( valueItems[k].getValue());
        }
        vfs.addFilter( oneFilter );
      }
    }   
    return vfs;
View Full Code Here


    if (null != items)
    {
      // -> each filter can have one or more values associated with it
      for( int j=0; j < items.length; j++ )
      {
        EC2Filter oneFilter = new EC2Filter();
        String filterName = items[j].getName();
        oneFilter.setName( filterName );
       
        ValueSetType vst = items[j].getValueSet();
        ValueType[] valueItems = vst.getItem();
        for( int k=0; k < valueItems.length; k++ )
        {
          oneFilter.addValueEncoded( valueItems[k].getValue());
        }
        gfs.addFilter( oneFilter );
      }
    }   
    return gfs;
View Full Code Here

    if (null != items)
    {
      // -> each filter can have one or more values associated with it
      for( int j=0; j < items.length; j++ )
      {
        EC2Filter oneFilter = new EC2Filter();
        String filterName = items[j].getName();
        oneFilter.setName( filterName );
       
        ValueSetType vst = items[j].getValueSet();
        ValueType[] valueItems = vst.getItem();
        for( int k=0; k < valueItems.length; k++ )
        {
          oneFilter.addValueEncoded( valueItems[k].getValue());
        }
        ifs.addFilter( oneFilter );
      }
    }   
    return ifs;
View Full Code Here

        FilterType[] items = fst.getItem();
        if (items != null) {
            // -> each filter can have one or more values associated with it
            for (FilterType item : items) {
                EC2Filter oneFilter = new EC2Filter();
                String filterName = item.getName();
                oneFilter.setName(filterName);

                ValueSetType vst = item.getValueSet();
                ValueType[] valueItems = vst.getItem();
                for (ValueType valueItem : valueItems) {
                    oneFilter.addValueEncoded(valueItem.getValue());
                }
                vfs.addFilter(oneFilter);
            }
        }
        return vfs;
View Full Code Here

        FilterType[] items = fst.getItem();
        if (items != null) {
            // -> each filter can have one or more values associated with it
            for (FilterType item : items) {
                EC2Filter oneFilter = new EC2Filter();
                String filterName = item.getName();
                oneFilter.setName(filterName);

                ValueSetType vst = item.getValueSet();
                ValueType[] valueItems = vst.getItem();
                for (ValueType valueItem : valueItems) {
                    oneFilter.addValueEncoded(valueItem.getValue());
                }
                vfs.addFilter(oneFilter);
            }
        }
        return vfs;
View Full Code Here

                        tag.setKey(key);
                        tag.setValue(valueItem.getValue());
                        request.addResourceTag(tag);
                    }
                } else {
                    EC2Filter oneFilter = new EC2Filter();
                    oneFilter.setName(filterName);

                    // -> is the filter one of the xsd:dateTime filters?
                    timeFilter = false;
                    for (int m = 0; m < timeStrs.length; m++) {
                        timeFilter = filterName.equalsIgnoreCase(timeStrs[m]);
                        if (timeFilter)
                            break;
                    }

                    for (int k = 0; k < valueItems.length; k++) {
                        // -> time values are not encoded as regexes
                        if (timeFilter)
                            oneFilter.addValue(valueItems[k].getValue());
                        else
                            oneFilter.addValueEncoded(valueItems[k].getValue());
                    }
                    vfs.addFilter(oneFilter);
                }
            }
            request.setFilterSet(vfs);
View Full Code Here

                        tag.setKey(key);
                        tag.setValue(valueItem.getValue());
                        request.addResourceTag(tag);
                    }
                } else {
                    EC2Filter oneFilter = new EC2Filter();
                    oneFilter.setName(filterName);

                    // -> is the filter one of the xsd:dateTime filters?
                    timeFilter = false;
                    for (int m = 0; m < timeStrs.length; m++) {
                        timeFilter = filterName.equalsIgnoreCase(timeStrs[m]);
                        if (timeFilter)
                            break;
                    }

                    for (int k = 0; k < valueItems.length; k++) {
                        // -> time values are not encoded as regexes
                        if (timeFilter)
                            oneFilter.addValue(valueItems[k].getValue());
                        else
                            oneFilter.addValueEncoded(valueItems[k].getValue());
                    }
                    sfs.addFilter(oneFilter);
                }
            }
            request.setFilterSet(sfs);
View Full Code Here

        FilterType[] items = fst.getItem();
        if (null != items) {
            // -> each filter can have one or more values associated with it
            for (int j = 0; j < items.length; j++) {
                EC2Filter oneFilter = new EC2Filter();
                String filterName = items[j].getName();
                oneFilter.setName(filterName);

                ValueSetType vst = items[j].getValueSet();
                ValueType[] valueItems = vst.getItem();
                for (int k = 0; k < valueItems.length; k++) {
                    oneFilter.addValueEncoded(valueItems[k].getValue());
                }
                gfs.addFilter(oneFilter);
            }
        }
        return gfs;
View Full Code Here

                        tag.setKey(key);
                        tag.setValue(valueItem.getValue());
                        request.addResourceTag(tag);
                    }
                } else {
                    EC2Filter oneFilter = new EC2Filter();
                    oneFilter.setName(filterName);
                    for (int k = 0; k < valueItems.length; k++)
                        oneFilter.addValueEncoded(valueItems[k].getValue());
                    ifs.addFilter(oneFilter);
                }
            }
            request.setFilterSet(ifs);
        }
View Full Code Here

        EC2AvailabilityZonesFilterSet azfs = new EC2AvailabilityZonesFilterSet();

        FilterType[] items = fst.getItem();
        if (items != null) {
            for (FilterType item : items) {
                EC2Filter oneFilter = new EC2Filter();
                String filterName = item.getName();
                oneFilter.setName(filterName);

                ValueSetType vft = item.getValueSet();
                ValueType[] valueItems = vft.getItem();
                for (ValueType valueItem : valueItems) {
                    oneFilter.addValueEncoded(valueItem.getValue());
                }
                azfs.addFilter(oneFilter);
            }
        }
        return azfs;
View Full Code Here

TOP

Related Classes of com.cloud.bridge.service.core.ec2.EC2Filter

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.