I see a strange comment in the SecurityNamedServiceConfig interface:
/**
- Internal id of the config object.
-
- This method should be used by client code.
-
*/
String getId();
I assume that the second sentence should actually read: “This method should not be used by client code.” (since in general public methods are to be used by client code.) But I would appreciate a more detailed explanation of why there’s a public method on this interface that is not intended for general use. When I implement my own SecurityNamedServiceConfig what should I do about implementing these methods?
–
David Winslow
OpenGeo - http://opengeo.org/
Hey David,
Indeed, it should read “This method should not be used by client code.”. I guess that is a bit too strong a statement but the idea is the same as id;s for catalog and configuration objects. They are internally used to uniquely identify objects. Client code could make use of this as a read only property but i can’t think of a real use case for doing so… these objects are also identified uniquely by name which is typically how they are referenced.
As for what do when implementing this method, i actually recommend you one of the base subclasses as a starting point, namely BaseSecurityNamedServiceConfig or one of its subclasses. If you do need to implement the interface from scratch you just need to implement an id field on the object and make it gettable/settable via the getId() / setId() methods.
Feel free to clean up the javadocs in this regard.
-Justin
On Wed, May 9, 2012 at 8:17 AM, David Winslow <dwinslow@anonymised.com> wrote:
I see a strange comment in the SecurityNamedServiceConfig interface:
/**
- Internal id of the config object.
-
- This method should be used by client code.
-
*/
String getId();
I assume that the second sentence should actually read: “This method should not be used by client code.” (since in general public methods are to be used by client code.) But I would appreciate a more detailed explanation of why there’s a public method on this interface that is not intended for general use. When I implement my own SecurityNamedServiceConfig what should I do about implementing these methods?
–
David Winslow
OpenGeo - http://opengeo.org/
Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
–
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
Thanks, and sure I’ll touch up the javadocs.
–
David Winslow
OpenGeo - http://opengeo.org/
On Wed, May 9, 2012 at 10:22 AM, Justin Deoliveira <jdeolive@anonymised.com> wrote:
Hey David,
Indeed, it should read “This method should not be used by client code.”. I guess that is a bit too strong a statement but the idea is the same as id;s for catalog and configuration objects. They are internally used to uniquely identify objects. Client code could make use of this as a read only property but i can’t think of a real use case for doing so… these objects are also identified uniquely by name which is typically how they are referenced.
As for what do when implementing this method, i actually recommend you one of the base subclasses as a starting point, namely BaseSecurityNamedServiceConfig or one of its subclasses. If you do need to implement the interface from scratch you just need to implement an id field on the object and make it gettable/settable via the getId() / setId() methods.
Feel free to clean up the javadocs in this regard.
-Justin
On Wed, May 9, 2012 at 8:17 AM, David Winslow <dwinslow@anonymised.com> wrote:
I see a strange comment in the SecurityNamedServiceConfig interface:
/**
- Internal id of the config object.
-
- This method should be used by client code.
-
*/
String getId();
I assume that the second sentence should actually read: “This method should not be used by client code.” (since in general public methods are to be used by client code.) But I would appreciate a more detailed explanation of why there’s a public method on this interface that is not intended for general use. When I implement my own SecurityNamedServiceConfig what should I do about implementing these methods?
–
David Winslow
OpenGeo - http://opengeo.org/
Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
–
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.