Class FileImporterDescriptor
- java.lang.Object
-
- org.nuxeo.ecm.platform.filemanager.service.extension.FileImporterDescriptor
-
- All Implemented Interfaces:
Descriptor
public class FileImporterDescriptor extends Object implements Descriptor
- Author:
- akalogeropoulos
-
-
Field Summary
Fields Modifier and Type Field Description protected String
className
Deprecated.since 11.1.static List<String>
DEFAULT_FILTER
protected String
docType
protected String
filter
protected List<String>
filters
protected Class<? extends FileImporter>
klass
protected String
name
-
Fields inherited from interface org.nuxeo.runtime.model.Descriptor
UNIQUE_DESCRIPTOR_ID
-
-
Constructor Summary
Constructors Constructor Description FileImporterDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected <T> T
defaultValue(T value, T defaultValue)
boolean
doesRemove()
During merge if a descriptor whose doesRemove() returns true is encountered, the merge chain is reset and started again on next descriptor.String
getClassName()
Deprecated.since 11.1.String
getDocType()
Returns the configured document type to be created when using the importerString
getFilter()
List<String>
getFilters()
String
getId()
The descriptor id, descriptors with same id are merged.String
getName()
Integer
getOrder()
boolean
isEnabled()
boolean
isMerge()
Returnstrue
if thisFileImporterDescriptor
should be merged with an existing one,false
otherwise.Descriptor
merge(Descriptor o)
Returns a descriptor representingother
merged intothis
FileImporter
newInstance()
void
setClassName(String className)
Deprecated.since 11.1.void
setFilter(String filter)
void
setFilters(List<String> filters)
void
setName(String name)
-
-
-
Field Detail
-
name
protected String name
-
className
@Deprecated(since="11.1") protected String className
Deprecated.since 11.1.
-
klass
protected Class<? extends FileImporter> klass
- Since:
- 11.1
-
docType
protected String docType
-
filter
protected String filter
-
-
Method Detail
-
getName
public String getName()
-
setName
public void setName(String name)
-
getClassName
@Deprecated(since="11.1") public String getClassName()
Deprecated.since 11.1. Useklass
.
-
setClassName
@Deprecated(since="11.1") public void setClassName(String className)
Deprecated.since 11.1. Useklass
.
-
getDocType
public String getDocType()
Returns the configured document type to be created when using the importer- Since:
- 5.5
-
getFilter
public String getFilter()
-
setFilter
public void setFilter(String filter)
-
isEnabled
public boolean isEnabled()
-
getOrder
public Integer getOrder()
-
isMerge
public boolean isMerge()
Returnstrue
if thisFileImporterDescriptor
should be merged with an existing one,false
otherwise.- Since:
- 5.5
-
newInstance
public FileImporter newInstance()
- Since:
- 11.1
-
getId
public String getId()
Description copied from interface:Descriptor
The descriptor id, descriptors with same id are merged.To forbid multiple descriptors use UNIQUE_DESCRIPTOR_ID.
To forbid merge use a unique value, non-overriden
toString()
for exemple.- Specified by:
getId
in interfaceDescriptor
-
merge
public Descriptor merge(Descriptor o)
Description copied from interface:Descriptor
Returns a descriptor representingother
merged intothis
Default implementation returns
other
.- Specified by:
merge
in interfaceDescriptor
- Returns:
- the merged descriptor
-
defaultValue
protected <T> T defaultValue(T value, T defaultValue)
-
doesRemove
public boolean doesRemove()
Description copied from interface:Descriptor
During merge if a descriptor whose doesRemove() returns true is encountered, the merge chain is reset and started again on next descriptor.If the last descriptor of same id doesRemove() return true, the descriptor for this id will be
null
.- Specified by:
doesRemove
in interfaceDescriptor
-
-