Hi Emanuele,
I just reviewed the updated patch, and things are getting closer.
I am worried however that behavior changes are creeping in here. I thought we agreed this would issue in particular would be a 100% refactor, ie no behavior changes. I realize that things will need to change but I think we should get the new api on first, and tehn worry about the little details of things that have to change. I fear that if we don't stick to that this change will be riddled with regressions.
I also saw that you just posted a new patch to some of this might be irrelevant.
Here is what I found this time around:
general stuff
-------------
* I see a break of code conventions with some if statements:
if(LOGGER.isLoggable(Level.FINER))
LOGGER.finer("AUTO DEFAULT NAMESPACE: " + namespace);
Please ensure you always use curly braces. Also the logging guard in this case seems rather unnecessary, although I know it is just habit.
* I see a lot of commented out code. Just remove it, it makes the patch cleaner to review.
CatalogDAO
----------
* Still no javadocs
* needsIdRemapping() ? What is the purpose of this method. Seems to expose implementation details uncessarily. Some explanation is required.
CatalogImpl
-----------
* add(WorkspaceInfo):
- Yes validate already contains this check, the check can probably be removed
* setDefaultWorkspace(WorkspaceInfo)
- Remove the check, the contract of setDefaultWorkspace states that the ws does not need to be previously added to the catalog
* postSave(CatatlogInfo)
- Why is the call to proxy.commit() commented out?
* CatalogSync
- Why a separate class for this? Why not just keep it as Catalog.sync() and just call through to the dao.
MemoryCatalogDAO
----------------
* The save() methods seems to duplicate each other. The old catalog factored this out into a common method. Again a pure refactor would have maintained this I would think.
* getLayersByRsource():
- Some checks seems to be commented out? Were these checks added by you, I actually could not find them in the original CatalogImpl class.
-Justin
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.