PILLUTLAAVINASH / google-enterprise-connector-manager

Automatically exported from code.google.com/p/google-enterprise-connector-manager
0 stars 0 forks source link

Read properties from disk for getPopulatedConfigForm. #160

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I think we should make two changes to getPopulatedConfigForm:

1. Don't pass the cached properties to getPopulatedConfigForm, but read them 
again from the 
disk. The change here is just not using the properties field in the 
InstanceInfo.getConnectorConfig method. Whether this method should set the 
cached properties 
is another topic for discussion, and a more esoteric one.

The rationale here is that editing the properties file, which admittedly should 
be rare, currently 
requires restarting Tomcat, which should also be rare. Especially as we add 
multiple connector 
instances and multiple connector types, we should be more careful about 
requiring Tomcat 
restarts, and avoiding them when possible.

2. Pass the ConnectorFactory to getPopulatedConfigForm. We probably want a new 
interface for 
this, to avoid breaking existing connectors.

The rationale here is it makes it easier to migrate configuration properties 
from 
connectorInstance.xml to the form. Right now it's possible to move property 
values from 
connectorInstance.xml, but you have to do it in validateConfig, which is less 
obvious to the user. 
That means instead of seeing the migrated properties immediately, the user has 
to click Save 
Configuration, then validateConfig can do the migration and return a new form 
with the edited 
properties.

Original issue reported on code.google.com by jl1615@gmail.com on 18 Jun 2009 at 1:59

GoogleCodeExporter commented 8 years ago

Original comment by Brett.Mi...@gmail.com on 30 Jun 2009 at 12:13

GoogleCodeExporter commented 8 years ago
Moved part 2 to issue 185. This issue is just part 1.

Original comment by jl1615@gmail.com on 19 Sep 2009 at 4:30

GoogleCodeExporter commented 8 years ago
We do not want to write through to the properties field cache. We want the user 
to be able to pick up manual 
edits from the disk when editing the connector instance in the admin console, 
but we do not want manual 
edits to change the properties used to instantiate the connector until the user 
saves the configuration in the 
admin console.

The only wrinkle I can see is the use of getConnectorConfig from the servlets. 
SetConnectorConfigHandler 
uses it to replace sensitive data that was removed from the form in 
GetConnectorConfigToEdit. We really want 
the data that was removed, which we said above we explicitly did not cache. We 
do not really want data that 
might have been manually edited on disk since then, although that's better than 
the current situation, I think. 
SetSchedule uses it to check whether the connector exists. That call doesn't 
get through to the InstanceInfo 
getConnectorConfig() method if the connector does not exist, and it doesn't 
matter what it returns if it does 
exist.

Original comment by jl1615@gmail.com on 24 Oct 2009 at 3:45

GoogleCodeExporter commented 8 years ago

Original comment by mar...@google.com on 4 Dec 2009 at 10:54

GoogleCodeExporter commented 8 years ago
Fixed 27 June 2010 in Connector Manager revision r2529

Original comment by Brett.Mi...@gmail.com on 27 Jun 2010 at 8:09

GoogleCodeExporter commented 8 years ago
I think this is going to be fixed in 2.8.

Original comment by jla...@google.com on 21 Jun 2011 at 2:24