Class FileItemDescriptor
- java.lang.Object
-
- de.xima.fc.workflow.processor.value.wrapper.RecordValueDescriptorWrapper
-
- de.xima.fc.workflow.processor.value.common.FileItemDescriptor
-
- All Implemented Interfaces:
IRecordValueDescriptor
,IValueDescriptor<Map<String,?>,IRecordValueBuilder>
,Serializable
public final class FileItemDescriptor extends RecordValueDescriptorWrapper
AIValueDescriptor
for the metadata of a file, consisting of a file name, base name, extension, and file size.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.xima.fc.workflow.processor.value.wrapper.RecordValueDescriptorWrapper
delegate
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E extends IFileEntity<?,?> & IFileSizeProviding>
Map<String,Object>valueFileItem(E file)
Creates a value that conforms to theFileItemDescriptor
value descriptor.static <E extends IFileEntity<?,?> & IFileSizeProviding>
Map<String,Object>valueFileItem(E file, Map<String,Object> mimeType)
Creates a value that conforms to theFileItemDescriptor
value descriptor.static Map<String,Object>
valueFileItem(File file)
Creates a value that conforms to theFileItemDescriptor
value descriptor.static Map<String,Object>
valueFileItem(String fileName, long fileSizeBytes)
Creates a value that conforms to theFileItemDescriptor
value descriptor.static Map<String,Object>
valueFileItem(String fileName, String mimeType, long fileSizeBytes)
Creates a value that conforms to theFileItemDescriptor
value descriptor.static Map<String,Object>
valueFileItem(String fileName, Map<String,Object> mimeType, long fileSizeBytes)
Creates a value that conforms to theFileItemDescriptor
value descriptor.static Map<String,Object>
valueFileItem(String fileName, javax.activation.MimeType mimeType, long fileSizeBytes)
Creates a value that conforms to theFileItemDescriptor
value descriptor.static Map<String,Object>
valueFileItem(Path file)
Creates a value that conforms to theFileItemDescriptor
value descriptor.static Map<String,Object>
valueFileItem(Path file, String mimeType)
Creates a value that conforms to theFileItemDescriptor
value descriptor.static Map<String,Object>
valueFileItem(Path file, Map<String,Object> mimeType)
Creates a value that conforms to theFileItemDescriptor
value descriptor.static Map<String,Object>
valueFileItem(Path file, javax.activation.MimeType mimeType)
Creates a value that conforms to theFileItemDescriptor
value descriptor.-
Methods inherited from class de.xima.fc.workflow.processor.value.wrapper.RecordValueDescriptorWrapper
acceptsValue, asAny, asBoolean, asConst, asFloat, asInteger, asLargeString, asList, asList, asMap, asMap, asNull, asRecord, asString, asTuple, asUnion, asUnion, asVoid, builder, configure, getBaseType, getDefaultValue, getDescription, getFullType, getJavaClass, getKnownProperties, getKnownProperties, getRecordValueDescriptors, intersect, is, toString, unwrap, withDefaultValue, withDescription
-
-
-
-
Method Detail
-
valueFileItem
public static Map<String,Object> valueFileItem(Path file, Map<String,Object> mimeType)
Creates a value that conforms to theFileItemDescriptor
value descriptor.- Parameters:
file
- A file.mimeType
- Mime type of the file, seeMimeTypeDescriptor.valueMimeType(MimeType)
.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
valueFileItem
public static Map<String,Object> valueFileItem(Path file)
Creates a value that conforms to theFileItemDescriptor
value descriptor. Guesses the mime type.- Parameters:
file
- A file.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
valueFileItem
public static Map<String,Object> valueFileItem(File file)
Creates a value that conforms to theFileItemDescriptor
value descriptor. Guesses the mime type.- Parameters:
file
- A file.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
valueFileItem
public static <E extends IFileEntity<?,?> & IFileSizeProviding> Map<String,Object> valueFileItem(E file, Map<String,Object> mimeType)
Creates a value that conforms to theFileItemDescriptor
value descriptor.- Parameters:
file
- A file.mimeType
- Mime type of the file, seeMimeTypeDescriptor.valueMimeType(MimeType)
.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
valueFileItem
public static <E extends IFileEntity<?,?> & IFileSizeProviding> Map<String,Object> valueFileItem(E file)
Creates a value that conforms to theFileItemDescriptor
value descriptor. Guesses the mime type.- Parameters:
file
- A file.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
valueFileItem
public static Map<String,Object> valueFileItem(Path file, javax.activation.MimeType mimeType)
Creates a value that conforms to theFileItemDescriptor
value descriptor.- Parameters:
file
- A file.mimeType
- Mime type of the file.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
valueFileItem
public static Map<String,Object> valueFileItem(Path file, String mimeType)
Creates a value that conforms to theFileItemDescriptor
value descriptor.- Parameters:
file
- A file.mimeType
- Mime type of the file.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
valueFileItem
public static Map<String,Object> valueFileItem(String fileName, Map<String,Object> mimeType, long fileSizeBytes)
Creates a value that conforms to theFileItemDescriptor
value descriptor.- Parameters:
fileName
- Name of the file.mimeType
- Mime type of the file, seeMimeTypeDescriptor.valueMimeType(MimeType)
.fileSizeBytes
- File size in bytes.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
valueFileItem
public static Map<String,Object> valueFileItem(String fileName, javax.activation.MimeType mimeType, long fileSizeBytes)
Creates a value that conforms to theFileItemDescriptor
value descriptor.- Parameters:
fileName
- Name of the file.mimeType
- Mime type of the file.fileSizeBytes
- File size in bytes.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
valueFileItem
public static Map<String,Object> valueFileItem(String fileName, String mimeType, long fileSizeBytes)
Creates a value that conforms to theFileItemDescriptor
value descriptor.- Parameters:
fileName
- Name of the file.mimeType
- Mime type of the file.fileSizeBytes
- File size in bytes.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
valueFileItem
public static Map<String,Object> valueFileItem(String fileName, long fileSizeBytes)
Creates a value that conforms to theFileItemDescriptor
value descriptor. Guesses the mime type.- Parameters:
fileName
- Name of the file.fileSizeBytes
- File size in bytes.- Returns:
- A file item value conforming to
FileItemDescriptor
.
-
-