Hi,
another issue that came up with JDBCConfig is that we found it breaks when dealing with derived properties.
There are two types of derived properties:
- computed ones, that lack a getter, such as “prefixedName()”
- delegated ones, that lack a field, and point directly to the value in another object, for example LayerInfo enabled/advertised
For the derived ones, I wanted to use PublishedInfo/LayerInfo/LayerGroupInfo/.prefixedName… but JDBCConfig does not
see it, because it does not have a getter, whilst it sees the ResoruceInfo one because there is a deprecated getPrefixedName()
method.
For the time being, to move forward, I’ve added getPrefixedName() to PublishedInfo too (and subclasses), but I guess it would
be best if we had a way to declare these derived properties that only have a getter, to allow filtering/sorting on them.
Maybe we could have a derived_properties.properties, in the same spirit as nested_properties.properties?
The delegated ones are nasty… JDBCConfig saves LayerInfo enabled/advertised in the db at the time of import,
and then the GUI only touches ResourceInfo advertised/enabled, so the code saving them only saves the change
in ResourceInfo, but not in LayerInfo.
For these it would be nice to just have nested_properties.propertise handle the case such as:
LayerInfo.enabled=ResourceInfo.enabled
LayerInfo.advertised=ResourceInfo.advertised
since in the end we are accessing a nested property.
One final nasty case is title, which is exposed as a property in PublishedInfo, and it is direct in LayerGroupInfo,
but when it comes to layers, there is a direct property that is never used, and we actually live off the title of the nested
resource.
I guess a delegation declaration such as:
LayerInfo.title=ResourceInfo.title
would do the trick, and we can kill LayerInfo own title? It does not seem anything is using it anyways
Cheers
Andrea
···
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.