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

org.moskito.control.plugins.mattermost.MattermostConfig Maven / Gradle / Ivy

The newest version!
package org.moskito.control.plugins.mattermost;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.configureme.annotations.Configure;
import org.configureme.annotations.ConfigureMe;
import org.moskito.control.plugins.notifications.config.BaseNotificationPluginConfig;

/**
 * Configurable by ConfigureMe class,
 * witch represents Mattermost plugin config.
 */
@ConfigureMe
@SuppressFBWarnings(value = {"EI_EXPOSE_REP2", "EI_EXPOSE_REP"},
        justification = "This is the way configureMe works, it provides beans for access")
public class MattermostConfig extends BaseNotificationPluginConfig{

    /**
     * Mattermost site URL
     */
    @Configure
    private String host;
    /**
     * Username of mattermost user
     */
    @Configure
    private String username;
    /**
     * Password of mattermost user
     */
    @Configure
    private String password;
    /**
     * Mattermost team to send notifications
     */
    @Configure
    private String teamName;

    /**
     * Link to be included in the alert. Usually you will won't to link to moskito-control instance, for example:
     * https:///moskito-control/control/setApplication?application=${APPLICATION}
     */
    @Configure
    private String alertLink;

    /**
     * Base url path to thumb images for slack messages
     */
    @Configure
    private String baseImageUrlPath;

    /**
     * Configuration for slack channel
     * Links channel with applications
     */
    @Configure
    private MattermostChannelConfig[] channels;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAlertLink() {
        return alertLink;
    }

    public void setAlertLink(String alertLink) {
        this.alertLink = alertLink;
    }

    public String getBaseImageUrlPath() {
        return baseImageUrlPath;
    }

    public void setBaseImageUrlPath(String baseImageUrlPath) {
        this.baseImageUrlPath = baseImageUrlPath;
    }


    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public void setChannels(MattermostChannelConfig[] channels) {
        this.channels = channels;
    }

    @Override
    protected MattermostChannelConfig[] getProfileConfigs() {
        return channels;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy