ReportOutputType.javaprojectforge-business/src/main/java/org/projectforge/business/fibu/kost/reporting/ReportOutputType.java containing Java code for the Financial Accounting layer.Package: org.projectforge.business.fibu.kost.reporting
Enums: ReportOutputType
Methods (3): getOrdinal, getType, getKey
Fields (1): key
Imports: 1 packages
package org.projectforge.business.fibu.kost.reporting;
import org.apache.commons.lang3.StringUtils;
public enum ReportOutputType
{
PDF("pdf");
private String key;
/**
* @see #ordinal()
*/
public int getOrdinal()
{
return ordinal();
}
/**
* @param s Key or toString value of the type, e. g. "pdf" or "PDF".
* @return Matching ReportOutputType.
* @throws UnsupportedOperationException if no type match.
*/
public static ReportOutputType getType(String s)
{
if (StringUtils.isEmpty(s)) {
return null;
}
for (ReportOutputType type : ReportOutputType.values()) {
if (s.equals(type.toString()) || s.equals(type.getKey())) {
return type;
}
}
throw new UnsupportedOperationException("Unknown reporting type: '" + s + "'");
}
/**
* The key will be used e. g. for i18n.
*
* @return
*/
public String getKey()
{
return key;
}
ReportOutputType(String key)
{
this.key = key;
}
}
868d6abb7 2025 -> 2026 63081666f Source file headers: 2024-> 2025. b6092df09 Copyright 2023 -> 2024 ab45d51fa Copyright 2001-2022 -> 2001-2023. 5f7ef41b8 Copyright 2021 -> 2022