Interface IImportManager
public interface IImportManager
Manages importers and import templates, and executes imports.
Importers are contributable using deployment.
- Author:
- Jiri Banszel, POLARION SOFTWARE
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateTemplate
(IImporterDescriptor importerDescriptor, String templateName, InputStream content) Deprecated.void
deleteTemplate
(IImporterDescriptor importerDescriptor, String templateName) Deprecated.void
deleteTemplate
(IImporterDescriptor importerDescriptor, String templateName, IContextId contextId) Returns import info by id ornull
if it is not found.Returns descriptor with the given id.Returns descriptors of all registered importers (sorted lexicographically by label).getImporterDescriptors
(String importType) Returns descriptors of all registered importers (sorted lexicographically by label) that supports the export type (seeEXPORT_TYPE*
constants inIImportConfiguration
and its sub-interfaces.getImports
(IUser user) Returns all imports started by the user (newer imports first), that were not removed yet.getTemplate
(IImporterDescriptor importerDescriptor, String templateName) Deprecated.getTemplate
(IImporterDescriptor importerDescriptor, String templateName, IContextId contextId) Returns template with the given name ornull
if such a template does not exist (not even inherited one).getTemplates
(IImporterDescriptor importerDescriptor) Deprecated.getTemplates
(IImporterDescriptor importerDescriptor, IContextId contextId) Returns templates available for import with the given importer (sorted lexicographically by name) in the given context (so the returned list of templates contains templates inherited from other contexts).void
removeImportInfo
(IImportInfo importInfo) Removes finished import info.setTemplateContent
(IImporterDescriptor importerDescriptor, String templateName, IContextId contextId, InputStream content, boolean overwrite) Creates or updates a template.startImport
(IImporterDescriptor importerDescriptor, IImportConfiguration config) Starts the import.
-
Field Details
-
IMP_MSPROJECT
Id of importer from MS Project XML file.- See Also:
-
IMP_WORD
Id of importer from Word document.- Since:
- 3.5.0
- See Also:
-
IMP_WORD_ROUND_TRIP
Id of importer from Word round-trip document.- Since:
- 3.5.0
- See Also:
-
IMP_EXCEL_ROUND_TRIP
- Since:
- 3.5.1
- See Also:
-
IMP_EXCEL
- Since:
- 3.5.2
- See Also:
-
-
Method Details
-
getImporterDescriptors
Collection<IImporterDescriptor> getImporterDescriptors()Returns descriptors of all registered importers (sorted lexicographically by label).- Returns:
- collection of
IImporterDescriptor
-
getImporterDescriptors
Returns descriptors of all registered importers (sorted lexicographically by label) that supports the export type (seeEXPORT_TYPE*
constants inIImportConfiguration
and its sub-interfaces.- Parameters:
importType
-- Returns:
- collection of
IImporterDescriptor
- Since:
- 3.5.0
-
getImporterDescriptor
Returns descriptor with the given id.- Parameters:
id
-- Returns:
- the
ImportDescriptor
for the givenid
ornull
if it does not exist
-
startImport
Starts the import.- Parameters:
importerDescriptor
-config
-- Returns:
- import info
- See Also:
-
removeImportInfo
Removes finished import info.- Parameters:
importInfo
-- Throws:
IllegalArgumentException
- if the import is not finished yet
-
getImports
Returns all imports started by the user (newer imports first), that were not removed yet. Ifuser
isnull
, all imports are returned.- Returns:
- list of
IImportInfo
-
getImport
Returns import info by id ornull
if it is not found.- Parameters:
importId
-
-
getTemplates
Deprecated. -
getTemplates
Collection<IImportTemplate> getTemplates(IImporterDescriptor importerDescriptor, IContextId contextId) Returns templates available for import with the given importer (sorted lexicographically by name) in the given context (so the returned list of templates contains templates inherited from other contexts).- Parameters:
importerDescriptor
-contextId
-- Returns:
- collection of
IImportTemplate
- Throws:
IllegalArgumentException
- if the importer does not support templates- Since:
- 3.5.0
- See Also:
-
getTemplate
@Deprecated IImportTemplate getTemplate(IImporterDescriptor importerDescriptor, String templateName) Deprecated. -
getTemplate
IImportTemplate getTemplate(IImporterDescriptor importerDescriptor, String templateName, IContextId contextId) Returns template with the given name ornull
if such a template does not exist (not even inherited one).- Parameters:
importerDescriptor
-templateName
-contextId
-- Returns:
IImportTemplate
- Throws:
IllegalArgumentException
- if the importer does not support templates- Since:
- 3.5.0
- See Also:
-
createTemplate
@Deprecated IImportTemplate createTemplate(IImporterDescriptor importerDescriptor, String templateName, InputStream content) - Parameters:
importerDescriptor
-templateName
-content
-- Throws:
IllegalArgumentException
- if the importer does not support templates- See Also:
-
setTemplateContent
IImportTemplate setTemplateContent(IImporterDescriptor importerDescriptor, String templateName, IContextId contextId, InputStream content, boolean overwrite) Creates or updates a template.- Parameters:
importerDescriptor
-templateName
-content
-- Throws:
IllegalArgumentException
- if the importer does not support templates- Since:
- 3.5.0
- See Also:
-
deleteTemplate
Deprecated. -
deleteTemplate
void deleteTemplate(IImporterDescriptor importerDescriptor, String templateName, IContextId contextId) - Parameters:
importerDescriptor
-templateName
-contextId
-- Throws:
IllegalArgumentException
- if the importer does not support templates- Since:
- 3.5.0
- See Also:
-
setTemplateContent(IImporterDescriptor, String, IContextId, InputStream, boolean)