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

dev.galasa.framework.spi.ras.RasSearchCriteriaRequestor 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 RasSearchCriteriaRequestor implements IRasSearchCriteria{
	
	private final String[] requestors;
	
	public RasSearchCriteriaRequestor(@NotNull String... requestorCriteria) {
		this.requestors = requestorCriteria;
	}
	
	@Override
	public boolean criteriaMatched(@NotNull TestStructure structure) {
		
		if(structure == null) {
			return Boolean.FALSE;	
		}
		
		if(requestors != null) {
			for(String requestor : requestors) {
				if(requestor.equals(structure.getRequestor())){
					return Boolean.TRUE;
				}
			}
		}
		
		return Boolean.FALSE;
	}

    public String[] getRequestors() {
        return requestors;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy