DocumentFormatConfiguration
Leave feedback
On this page
Inheritance: java.lang.Object
public class DocumentFormatConfiguration
Represents a type reference for DocumentFormatInstance -derived class and supported file extensions list for faster format detection.
Learn more
- More details about GroupDocs.Redaction configuration: Extend supported extensions list
- More details about implementing custom formats: Create custom format handler
The following example demonstrates how to set properties for a custom format configuration.
DocumentFormatConfiguration adobePhotoshopSettings = new DocumentFormatConfiguration();
adobePhotoshopSettings.setExtensionFilter(".psd");
adobePhotoshopSettings.setDocumentType(MyAdobePhotoshopFormatInstance.class);
| Constructor | Description |
|---|---|
| DocumentFormatConfiguration() | Initializes a new instance of DocumentFormatConfiguration class. |
| Method | Description |
|---|---|
| getExtensionFilter() | Gets or sets a comma (",") delimited list of file extensions (for example “.pdf”), case insensitive. |
| setExtensionFilter(String value) | Gets or sets a comma (",") delimited list of file extensions (for example “.pdf”), case insensitive. |
| getDocumentType() | Gets or sets the type of a class, inheriting from DocumentFormatInstance. |
| setDocumentType(Class value) | Gets or sets the type of a class, inheriting from DocumentFormatInstance. |
| getInitializationData() | Gets or sets data, required for DocumentFormatInstance initialization. |
| setInitializationData(System.Collections.Generic.Dictionary<String,String> value) | Gets or sets data, required for DocumentFormatInstance initialization. |
| supportsExtension(String fileExtension) | Checks if a given file extension can be handled as DocumentType. |
public DocumentFormatConfiguration()
Initializes a new instance of DocumentFormatConfiguration class.
public final String getExtensionFilter()
Gets or sets a comma (",") delimited list of file extensions (for example “.pdf”), case insensitive.
Returns: java.lang.String
public final void setExtensionFilter(String value)
Gets or sets a comma (",") delimited list of file extensions (for example “.pdf”), case insensitive.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String |
public final Class getDocumentType()
Gets or sets the type of a class, inheriting from DocumentFormatInstance.
Returns: java.lang.Class
public final void setDocumentType(Class value)
Gets or sets the type of a class, inheriting from DocumentFormatInstance.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.Class |
public final System.Collections.Generic.Dictionary<String,String> getInitializationData()
Gets or sets data, required for DocumentFormatInstance initialization.
Returns: com.aspose.ms.System.Collections.Generic.Dictionary<java.lang.String,java.lang.String>
public final void setInitializationData(System.Collections.Generic.Dictionary<String,String> value)
Gets or sets data, required for DocumentFormatInstance initialization.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | com.aspose.ms.System.Collections.Generic.Dictionary<java.lang.String,java.lang.String> |
public final boolean supportsExtension(String fileExtension)
Checks if a given file extension can be handled as DocumentType.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileExtension | java.lang.String | File extension, format is “.ext” |
Returns: boolean - True if the extension is listed in ExtensionFilter
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.