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

be.tomcools.rickrollsecurity.RickRollConfigurationProperties Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
package be.tomcools.rickrollsecurity;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

@AutoConfiguration
@ConfigurationProperties(prefix = "rickroll")
public class RickRollConfigurationProperties {

    private List paths;
    private List fileExtensions;
    private Version version = Version.ORIGINAL;

    public List getFileExtensions() {
        if(fileExtensions == null) {
            return new ArrayList<>();
        }
        return fileExtensions;
    }

    public void setFileExtensions(List fileExtensions) {
        this.fileExtensions = fileExtensions;
    }

    public List getPaths() {
        if(paths == null) {
            return new ArrayList<>();
        }
        return paths;
    }

    public void setPaths(List paths) {
        this.paths = paths;
    }

    void setVersion(Version version) {
        this.version = version;
    }

    public String getVersionUrl() {
        return version.url;
    }

    enum Version {

        ORIGINAL("https://www.youtube.com/watch?v=dQw4w9WgXcQ"),
        METAL_CALEB("https://www.youtube.com/watch?v=MXMf_ni0Msk"),
        SCARY_POCKETS("https://www.youtube.com/watch?v=sQnoZUR6fvY");

        final String url;

        private Version(String url) {
            this.url = url;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy