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

dev.galasa.framework.internal.dss.FpfDynamicStatusStoreRegistration 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.internal.dss;

import java.net.URI;

import javax.validation.constraints.NotNull;

import org.osgi.service.component.annotations.Component;

import dev.galasa.framework.spi.DynamicStatusStoreException;
import dev.galasa.framework.spi.IDynamicStatusStoreRegistration;
import dev.galasa.framework.spi.IFrameworkInitialisation;

/**
 * 
 * 
 *  
 */
@Component(service = { IDynamicStatusStoreRegistration.class })
public class FpfDynamicStatusStoreRegistration implements IDynamicStatusStoreRegistration {

    /**
     * 

* This method registers this as the only DSS Store. *

* * @param frameworkInitialisation * @throws DynamicStatusStoreException */ @Override public void initialise(@NotNull IFrameworkInitialisation frameworkInitialisation) throws DynamicStatusStoreException { URI dss = frameworkInitialisation.getDynamicStatusStoreUri(); if (isFileUri(dss)) { frameworkInitialisation.registerDynamicStatusStore(new FpfDynamicStatusStore(dss)); } } /** *

* A simple method thta checks the provided URI to the CPS is a local file or * not. *

* * @param uri - URI to the CPS * @return - boolean if File or not. */ public static boolean isFileUri(URI uri) { return "file".equals(uri.getScheme()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy