All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.galasa.framework.spi.ras.RasSearchCriteriaBundle Maven / Gradle / Ivy

There is a newer version: 0.37.0
Show newest version
/*
 * Copyright contributors to the Galasa project
 *
 * SPDX-License-Identifier: EPL-2.0
 */
package dev.galasa.framework.spi.ras;

import javax.validation.constraints.NotNull;

import dev.galasa.framework.spi.teststructure.TestStructure;

public class RasSearchCriteriaBundle implements IRasSearchCriteria {
   
   private final String[] bundles;
   
   public RasSearchCriteriaBundle(@NotNull String... bundles) {
      this.bundles = bundles;
   }
   
   @Override
   public boolean criteriaMatched(@NotNull TestStructure structure) {
      
      if(structure == null) {
         return Boolean.FALSE;   
     }
      
     if(bundles != null) {
        for(String bundle : bundles) {
            if(bundle.equals(structure.getBundle())){
                return Boolean.TRUE;
            }
        }
    }
     
     return Boolean.FALSE;
      
   }

   public String[] getBundles() {
       return bundles;
   }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy