Package com.helger.photon.exchange
Enum EExchangeFileType
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,com.helger.commons.text.display.IHasDisplayText,Serializable,Comparable<EExchangeFileType>,java.lang.constant.Constable
public enum EExchangeFileType
extends Enum<EExchangeFileType>
implements com.helger.commons.id.IHasID<String>, com.helger.commons.text.display.IHasDisplayText
Defines common file types for import/export.
- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract IExportergetDisplayText(Locale aContentLocale) getExportAsText(Locale aContentLocale) static EExchangeFileTypegetFromIDOrDefault(String sID, EExchangeFileType eDefault) static EExchangeFileTypegetFromIDOrNull(String sID) getID()com.helger.commons.mime.IMimeTypegetSaveAsText(Locale aContentLocale) booleanbooleanstatic EExchangeFileTypeReturns the enum constant of this type with the specified name.static EExchangeFileType[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface com.helger.commons.text.display.IHasDisplayText
getAsHasText
-
Enum Constant Details
-
CSV
-
XLS
-
XLSX
-
XML
-
TXT
-
JSON
-
JSON_SIMPLE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getID
- Specified by:
getIDin interfacecom.helger.commons.id.IHasID<String>
-
getFileExtension
- Returns:
- The desired file extension including the leading dot.
-
getMimeType
- Returns:
- The MIMe type for created files.
-
isLineBased
public boolean isLineBased()- Returns:
trueif this file type is line based. This is e.g. the case for CSV or Excel files.
-
getDisplayText
- Specified by:
getDisplayTextin interfacecom.helger.commons.text.display.IHasDisplayText
-
getExportAsText
-
getSaveAsText
-
createExporter
-
isExporterAvailable
public boolean isExporterAvailable() -
getFromIDOrNull
-
getFromIDOrDefault
@Nullable public static EExchangeFileType getFromIDOrDefault(@Nullable String sID, @Nullable EExchangeFileType eDefault)
-