*/
@Override
public synchronized ConfigureResponse getConfigForm(Locale locale)
throws ConnectorNotFoundException, InstantiatorException {
Configuration config = getConnectorConfiguration();
ConnectorType connectorType = typeInfo.getConnectorType();
try {
ConfigureResponse response;
// If config is null, the connector was deleted behind our back.
// Treat this a new connector configuration.
if (config == null) {
response = connectorType.getConfigForm(locale);
if (response != null) {
return new ExtendedConfigureResponse(response,
getConnectorInstancePrototype(name, typeInfo));
}
} else {
if (LOGGER.isLoggable(Level.CONFIG)) {
LOGGER.config("GET POPULATED CONFIG FORM: locale = " + locale
+ ", configuration = "
+ SecurityUtils.getMaskedMap(config.getMap()));
}
response =
connectorType.getPopulatedConfigForm(config.getMap(), locale);
if (response != null) {
return new ExtendedConfigureResponse(response, config);
}
}
return response;