public class ImportSourceConfigurationFacadeImpl extends Object implements ImportSourceConfigurationFacade
| Constructor and Description |
|---|
ImportSourceConfigurationFacadeImpl(com.riadalabs.jira.plugins.insight.services.core.ImportSourceConfigurationService importSourceConfigurationService,
com.riadalabs.jira.plugins.insight.services.imports.common.DefaultImportService defaultImportService,
com.riadalabs.jira.plugins.insight.services.util.ErrorMessageTranslator errorMessageTranslator) |
| Modifier and Type | Method and Description |
|---|---|
ImportSource |
createPredefinedConfiguration(Integer importSourceId,
ObjectTypeBean optionalParent)
Create the template configuration as specified by the component.
|
void |
createPredefinedStructure(Integer importSourceId,
ObjectTypeBean optionalParent)
Creates a predefined structure based on the import component used.
|
void |
deleteImportSource(Integer importSourceId)
Deletes an Import Source
|
void |
deleteImportSourceOT(Integer importSourceOT)
Deletes an Import Source OT
|
void |
deleteImportSourceOTAttr(Integer importSourceOTAttr)
Deletes an Import Source OTA
|
List<ImportSource> |
findImportSourcesByModule(String moduleKey)
Finds import sources for a specific import module type (each integration module specifies it's own type with a
module key e.g.
|
List<ImportSource> |
findImportSourcesBySchema(Integer objectSchemaId)
Finds all import source configurations by the given object schema id.
|
List<ImportSource> |
findImportSourcesForObjectTypeId(Integer objectTypeId)
Finds all the import sources where the specified object type id is used in any object type mapping
configuration.
|
ImportSource |
loadImportSource(Integer importSourceId)
Loads the ImportSource from the database and validates it if it is ready to be synchronised.
|
ImportSourceOT |
loadImportSourceOT(Integer importSourceOTId)
Load a specific import source OT configuration item.
|
ImportSourceOTAttr |
loadImportSourceOTAttr(Integer importSourceOTAttrId)
Load a specific import source OT Attr configuration item.
|
ImportSource |
loadImportSourceWithMaskedPasswords(Integer importSourceId)
Loads the ImportSource from the database and validate if it is ready to be synchronised.
|
List<String> |
passwordFieldNamesInModuleConfig(Integer importSourceId)
Retrieves a list of all the keys (the json names) in the
ImportSource.getJsonConfiguration() that
represents a password field for the given import source. |
Progress |
startImportSource(int importSourceId)
Start an import given the id of the configuration.
|
Progress |
startImportSourceForSpecificOTs(int importSourceId,
List<Integer> importSourceOTIds)
Start an import given the id of the configuration but only import a specific number of object types.
|
ImportSource |
storeImportSource(ImportSource importSource)
Store the entire import source together with all attached ImportSourceOTs and ImportSourceOTAs.
|
ImportSourceOT |
storeImportSourceOT(ImportSourceOT importSourceOT)
Store a single import source OT configuration item together with all ImportSourceOTAs.
|
ImportSourceOTAttr |
storeImportSourceOTAttr(ImportSourceOTAttr importSourceOTAttr)
Store a single import source OTAttr configuration item together with all ImportSourceOTAs.
|
public ImportSourceConfigurationFacadeImpl(com.riadalabs.jira.plugins.insight.services.core.ImportSourceConfigurationService importSourceConfigurationService,
com.riadalabs.jira.plugins.insight.services.imports.common.DefaultImportService defaultImportService,
com.riadalabs.jira.plugins.insight.services.util.ErrorMessageTranslator errorMessageTranslator)
public List<ImportSource> findImportSourcesBySchema(Integer objectSchemaId) throws InsightException
ImportSourceConfigurationFacadefindImportSourcesBySchema in interface ImportSourceConfigurationFacadeImportSourceConfigurationFacade.loadImportSource(Integer)InsightExceptionpublic List<ImportSource> findImportSourcesForObjectTypeId(Integer objectTypeId) throws InsightException
ImportSourceConfigurationFacadefindImportSourcesForObjectTypeId in interface ImportSourceConfigurationFacadeImportSourceOT
configuration with the ObjectTypeBean specified by the argument. The import sources in the list will have
all passwords masked see ImportSourceConfigurationFacade.loadImportSource(Integer)InsightExceptionpublic List<ImportSource> findImportSourcesByModule(String moduleKey) throws InsightException
ImportSourceConfigurationFacadefindImportSourcesByModule in interface ImportSourceConfigurationFacadeImportSourceConfigurationFacade.loadImportSource(Integer)InsightExceptionpublic ImportSource loadImportSource(Integer importSourceId) throws InsightException
ImportSourceConfigurationFacadeValidationInsightException
rather than returning an Invalid import source. Note that the validation state of the import source will be
persisted to the database. I.e. a call to this function will update the stored import source with the current
validation statusloadImportSource in interface ImportSourceConfigurationFacadeImportSource.getJsonConfiguration() removed. In other words
all password fields (both name and value in the json config) will be missing. To get the password fields (names
and masked values) use the ImportSourceConfigurationFacade.loadImportSourceWithMaskedPasswords(Integer) instead.InsightException - / ValidationInsightException if the ImportSource is not valid.public List<String> passwordFieldNamesInModuleConfig(Integer importSourceId) throws InsightException
ImportSourceConfigurationFacadeImportSource.getJsonConfiguration() that
represents a password field for the given import source. The password fields are masked in the fetched import
source as described in ImportSourceConfigurationFacade.loadImportSourceWithMaskedPasswords(Integer)passwordFieldNamesInModuleConfig in interface ImportSourceConfigurationFacadeInsightExceptionpublic ImportSource loadImportSourceWithMaskedPasswords(Integer importSourceId) throws InsightException
ImportSourceConfigurationFacadeValidationInsightException
rather than returning an Invalid import source. Note that the validation state of the import source will be
persisted to the database. I.e. a call to this function will update the stored import source with the current
validation statusloadImportSourceWithMaskedPasswords in interface ImportSourceConfigurationFacadeImportSource.getJsonConfiguration() masked. In other words
doing a call like storeImportSource(loadImportSourceWithMaskedPasswords(1)) will overwrite the stored passwords
in the database with masked values leading to an invalid configurationInsightExceptionpublic ImportSourceOT loadImportSourceOT(Integer importSourceOTId) throws InsightException
ImportSourceConfigurationFacadeloadImportSourceOT in interface ImportSourceConfigurationFacadeInsightExceptionpublic ImportSourceOTAttr loadImportSourceOTAttr(Integer importSourceOTAttrId) throws InsightException
ImportSourceConfigurationFacadeloadImportSourceOTAttr in interface ImportSourceConfigurationFacadeInsightExceptionpublic ImportSource storeImportSource(ImportSource importSource) throws InsightException
ImportSourceConfigurationFacadestoreImportSource in interface ImportSourceConfigurationFacadeimportSource - the import source that will be persisted. If the ImportSource.getId() != null an
existing import source will be updated. When an import source is sent to be updated and the ImportSource.getJsonConfiguration() do not have any of the configured password fields present (i.e the json name
of the password field is not present at all) the already saved password from the database will be used. In other
words in all cases when the passwords are not to be updated the passwords should not be present at all in the
ImportSource.getJsonConfiguration()ImportSourceConfigurationFacade.loadImportSource(Integer)InsightExceptionpublic ImportSourceOT storeImportSourceOT(ImportSourceOT importSourceOT) throws InsightException
ImportSourceConfigurationFacadestoreImportSourceOT in interface ImportSourceConfigurationFacadeInsightExceptionpublic ImportSourceOTAttr storeImportSourceOTAttr(ImportSourceOTAttr importSourceOTAttr) throws InsightException
ImportSourceConfigurationFacadestoreImportSourceOTAttr in interface ImportSourceConfigurationFacadeInsightExceptionpublic void deleteImportSource(Integer importSourceId) throws InsightException
ImportSourceConfigurationFacadedeleteImportSource in interface ImportSourceConfigurationFacadeInsightExceptionpublic void deleteImportSourceOT(Integer importSourceOT) throws InsightException
ImportSourceConfigurationFacadedeleteImportSourceOT in interface ImportSourceConfigurationFacadeInsightExceptionpublic void deleteImportSourceOTAttr(Integer importSourceOTAttr) throws InsightException
ImportSourceConfigurationFacadedeleteImportSourceOTAttr in interface ImportSourceConfigurationFacadeInsightExceptionpublic void createPredefinedStructure(Integer importSourceId, ObjectTypeBean optionalParent) throws InsightException
ImportSourceConfigurationFacadecreatePredefinedStructure in interface ImportSourceConfigurationFacadeoptionalParent - if this structure should be inserted under a specific parent. If left as null the object
type tree will be created on the top levelInsightExceptionpublic ImportSource createPredefinedConfiguration(Integer importSourceId, ObjectTypeBean optionalParent) throws InsightException
ImportSourceConfigurationFacadecreatePredefinedConfiguration in interface ImportSourceConfigurationFacadeoptionalParent - if this structure should be inserted under a specific parent. If left as null the object
type tree will be created on the top levelImportSourceConfigurationFacade.loadImportSource(Integer)InsightExceptionpublic Progress startImportSource(int importSourceId) throws InsightException
ImportSourceConfigurationFacadestartImportSource in interface ImportSourceConfigurationFacadeInsightExceptionpublic Progress startImportSourceForSpecificOTs(int importSourceId, List<Integer> importSourceOTIds) throws InsightException
ImportSourceConfigurationFacadestartImportSourceForSpecificOTs in interface ImportSourceConfigurationFacadeInsightExceptionCopyright © 2024 Atlassian. All rights reserved.