com.anrisoftware.sscontrol.security.spamassassin.linux.ReportSafeModeAttributeRenderer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sscontrol-security-spamassassin Show documentation
Show all versions of sscontrol-security-spamassassin Show documentation
SpamAssassin perl-based spam filter using text analysis. - http://www.spamassassin.org/
The newest version!
/*
* Copyright 2014-2015 Erwin Müller
*
* This file is part of sscontrol-security-spamassassin.
*
* sscontrol-security-spamassassin is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* sscontrol-security-spamassassin is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
* for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with sscontrol-security-spamassassin. If not, see .
*/
package com.anrisoftware.sscontrol.security.spamassassin.linux;
import java.util.Locale;
import com.anrisoftware.resources.templates.api.AttributeRenderer;
import com.anrisoftware.sscontrol.security.spamassassin.ReportSafeMode;
/**
* Renders the report safe mode.
*/
@SuppressWarnings("serial")
public class ReportSafeModeAttributeRenderer implements AttributeRenderer {
@Override
public String toString(Object o, String formatString, Locale locale) {
return toString((ReportSafeMode) o);
}
private String toString(ReportSafeMode o) {
switch (o) {
case off:
return "0";
case mimeAttachement:
return "1";
case plainAttachement:
return "2";
}
return null;
}
@Override
public Class> getAttributeType() {
return ReportSafeMode.class;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy