Quantcast

[sonar-dev] property validation?

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[sonar-dev] property validation?

Ann Campbell
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Patroklos Papapetrou
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Ann Campbell
It varies.
* Does the string look like a URL? A URL for a WSDL? (And even: Can I connect to the service?)
* Is the "ticket type" one of the types I recognize? (Ditto status)
* and so on...


On Sat, Jun 16, 2012 at 3:57 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Freddy Mallet
Indeed Ann, this is a missing feature. Feel free to create a JIRA ticket and to link it to http://jira.codehaus.org/browse/SONAR-3521

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Sat, Jun 16, 2012 at 8:17 PM, Ann Campbell <[hidden email]> wrote:
It varies.
* Does the string look like a URL? A URL for a WSDL? (And even: Can I connect to the service?)
* Is the "ticket type" one of the types I recognize? (Ditto status)
* and so on...



On Sat, Jun 16, 2012 at 3:57 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Patroklos Papapetrou
Hi Freddy
It would be great if we could annotate properties with annotations like
@URL
@Email
@Size 
etc.
Just like Hibernate uses similar annotations ... 
What do you think?
Regards
Patroklos

2012/6/17 Freddy Mallet <[hidden email]>
Indeed Ann, this is a missing feature. Feel free to create a JIRA ticket and to link it to http://jira.codehaus.org/browse/SONAR-3521

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Sat, Jun 16, 2012 at 8:17 PM, Ann Campbell <[hidden email]> wrote:
It varies.
* Does the string look like a URL? A URL for a WSDL? (And even: Can I connect to the service?)
* Is the "ticket type" one of the types I recognize? (Ditto status)
* and so on...



On Sat, Jun 16, 2012 at 3:57 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Simon Brandhof
It would be great if we could annotate properties with annotations like


Annotate annotations with another annotations ? :D
This improvement would probably add some new fields to the Property annotation.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Evgeny Mandrikov
In reply to this post by Patroklos Papapetrou
Hi,

Properties can be specified via annotations, so you'd like to annotate annotations ? :)


On Mon, Jun 18, 2012 at 4:20 PM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Freddy
It would be great if we could annotate properties with annotations like
@URL
@Email
@Size 
etc.
Just like Hibernate uses similar annotations ... 
What do you think?
Regards
Patroklos

2012/6/17 Freddy Mallet <[hidden email]>
Indeed Ann, this is a missing feature. Feel free to create a JIRA ticket and to link it to http://jira.codehaus.org/browse/SONAR-3521

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Sat, Jun 16, 2012 at 8:17 PM, Ann Campbell <[hidden email]> wrote:
It varies.
* Does the string look like a URL? A URL for a WSDL? (And even: Can I connect to the service?)
* Is the "ticket type" one of the types I recognize? (Ditto status)
* and so on...



On Sat, Jun 16, 2012 at 3:57 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************






--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Patroklos Papapetrou
Woaoh!!!

Immediate responses from Sonar devs :) Don't shoot the pianist !! :)
I forgot that properties were just annotations!!! :) Haven't used them for a while !!!
What I really meant was to add some attributes in @Property Annotation
For example
    @Property(
        key = GoogleCalendarPublisher.ACCOUNT_PROP,
        name = "Google Account Username",
        description = "[hidden email]",
        global = false, project = true, module = false , type = EMAIL, size =200),

or something similar :)
Patroklos

2012/6/18 Evgeny Mandrikov <[hidden email]>
Hi,

Properties can be specified via annotations, so you'd like to annotate annotations ? :)


On Mon, Jun 18, 2012 at 4:20 PM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Freddy
It would be great if we could annotate properties with annotations like
@URL
@Email
@Size 
etc.
Just like Hibernate uses similar annotations ... 
What do you think?
Regards
Patroklos

2012/6/17 Freddy Mallet <[hidden email]>
Indeed Ann, this is a missing feature. Feel free to create a JIRA ticket and to link it to http://jira.codehaus.org/browse/SONAR-3521

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Sat, Jun 16, 2012 at 8:17 PM, Ann Campbell <[hidden email]> wrote:
It varies.
* Does the string look like a URL? A URL for a WSDL? (And even: Can I connect to the service?)
* Is the "ticket type" one of the types I recognize? (Ditto status)
* and so on...



On Sat, Jun 16, 2012 at 3:57 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************






--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Patroklos Papapetrou
The best scenario would be to create our own annotations by inherit @Property but since this is not allowed in Java,I suppose we can live only with some new attributes :)

2012/6/18 Papapetrou P.Patroklos <[hidden email]>
Woaoh!!!

Immediate responses from Sonar devs :) Don't shoot the pianist !! :)
I forgot that properties were just annotations!!! :) Haven't used them for a while !!!
What I really meant was to add some attributes in @Property Annotation
For example
    @Property(
        key = GoogleCalendarPublisher.ACCOUNT_PROP,
        name = "Google Account Username",
        description = "[hidden email]",
        global = false, project = true, module = false , type = EMAIL, size =200),

or something similar :)
Patroklos

2012/6/18 Evgeny Mandrikov <[hidden email]>
Hi,

Properties can be specified via annotations, so you'd like to annotate annotations ? :)


On Mon, Jun 18, 2012 at 4:20 PM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Freddy
It would be great if we could annotate properties with annotations like
@URL
@Email
@Size 
etc.
Just like Hibernate uses similar annotations ... 
What do you think?
Regards
Patroklos

2012/6/17 Freddy Mallet <[hidden email]>
Indeed Ann, this is a missing feature. Feel free to create a JIRA ticket and to link it to http://jira.codehaus.org/browse/SONAR-3521

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Sat, Jun 16, 2012 at 8:17 PM, Ann Campbell <[hidden email]> wrote:
It varies.
* Does the string look like a URL? A URL for a WSDL? (And even: Can I connect to the service?)
* Is the "ticket type" one of the types I recognize? (Ditto status)
* and so on...



On Sat, Jun 16, 2012 at 3:57 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************






--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Simon Brandhof
I was thinking about a field like
@Property(..., validation = WsdlUrlValidation.class)

Plugins could provide their own validators via a new extension point.


On 18 June 2012 12:39, Papapetrou P.Patroklos <[hidden email]> wrote:
The best scenario would be to create our own annotations by inherit @Property but since this is not allowed in Java,I suppose we can live only with some new attributes :)

2012/6/18 Papapetrou P.Patroklos <[hidden email]>

Woaoh!!!

Immediate responses from Sonar devs :) Don't shoot the pianist !! :)
I forgot that properties were just annotations!!! :) Haven't used them for a while !!!
What I really meant was to add some attributes in @Property Annotation
For example
    @Property(
        key = GoogleCalendarPublisher.ACCOUNT_PROP,
        name = "Google Account Username",
        description = "[hidden email]",
        global = false, project = true, module = false , type = EMAIL, size =200),

or something similar :)
Patroklos

2012/6/18 Evgeny Mandrikov <[hidden email]>
Hi,

Properties can be specified via annotations, so you'd like to annotate annotations ? :)


On Mon, Jun 18, 2012 at 4:20 PM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Freddy
It would be great if we could annotate properties with annotations like
@URL
@Email
@Size 
etc.
Just like Hibernate uses similar annotations ... 
What do you think?
Regards
Patroklos

2012/6/17 Freddy Mallet <[hidden email]>
Indeed Ann, this is a missing feature. Feel free to create a JIRA ticket and to link it to http://jira.codehaus.org/browse/SONAR-3521

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Sat, Jun 16, 2012 at 8:17 PM, Ann Campbell <[hidden email]> wrote:
It varies.
* Does the string look like a URL? A URL for a WSDL? (And even: Can I connect to the service?)
* Is the "ticket type" one of the types I recognize? (Ditto status)
* and so on...



On Sat, Jun 16, 2012 at 3:57 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************






--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Patroklos Papapetrou
That's great
And I suppose that  WsdlUrlValidation.class (and our own validators) will implement a validation method 
for instance 
public boolean validate(String propertyValue)

Patroklos

2012/6/18 Simon Brandhof <[hidden email]>
I was thinking about a field like
@Property(..., validation = WsdlUrlValidation.class)

Plugins could provide their own validators via a new extension point.



On 18 June 2012 12:39, Papapetrou P.Patroklos <[hidden email]> wrote:
The best scenario would be to create our own annotations by inherit @Property but since this is not allowed in Java,I suppose we can live only with some new attributes :)

2012/6/18 Papapetrou P.Patroklos <[hidden email]>

Woaoh!!!

Immediate responses from Sonar devs :) Don't shoot the pianist !! :)
I forgot that properties were just annotations!!! :) Haven't used them for a while !!!
What I really meant was to add some attributes in @Property Annotation
For example
    @Property(
        key = GoogleCalendarPublisher.ACCOUNT_PROP,
        name = "Google Account Username",
        description = "[hidden email]",
        global = false, project = true, module = false , type = EMAIL, size =200),

or something similar :)
Patroklos

2012/6/18 Evgeny Mandrikov <[hidden email]>
Hi,

Properties can be specified via annotations, so you'd like to annotate annotations ? :)


On Mon, Jun 18, 2012 at 4:20 PM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Freddy
It would be great if we could annotate properties with annotations like
@URL
@Email
@Size 
etc.
Just like Hibernate uses similar annotations ... 
What do you think?
Regards
Patroklos

2012/6/17 Freddy Mallet <[hidden email]>
Indeed Ann, this is a missing feature. Feel free to create a JIRA ticket and to link it to http://jira.codehaus.org/browse/SONAR-3521

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Sat, Jun 16, 2012 at 8:17 PM, Ann Campbell <[hidden email]> wrote:
It varies.
* Does the string look like a URL? A URL for a WSDL? (And even: Can I connect to the service?)
* Is the "ticket type" one of the types I recognize? (Ditto status)
* and so on...



On Sat, Jun 16, 2012 at 3:57 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************






--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Ann Campbell
http://jira.codehaus.org/browse/SONAR-3589

Somewhere in the validation method, we need a way to return an error string rather than just a boolean. - Otherwise we leave the user wondering "I've tried 5 times. What the heck's wrong this time?" 

One way I've seen it handled in the past was to make one of the arguments look something like this:
 List<String> errorMessages

If a validation method returns false, then you'd know to spit out the messages to the users...



On Mon, Jun 18, 2012 at 7:03 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
That's great
And I suppose that  WsdlUrlValidation.class (and our own validators) will implement a validation method 
for instance 
public boolean validate(String propertyValue)

Patroklos

2012/6/18 Simon Brandhof <[hidden email]>
I was thinking about a field like
@Property(..., validation = WsdlUrlValidation.class)

Plugins could provide their own validators via a new extension point.



On 18 June 2012 12:39, Papapetrou P.Patroklos <[hidden email]> wrote:
The best scenario would be to create our own annotations by inherit @Property but since this is not allowed in Java,I suppose we can live only with some new attributes :)

2012/6/18 Papapetrou P.Patroklos <[hidden email]>

Woaoh!!!

Immediate responses from Sonar devs :) Don't shoot the pianist !! :)
I forgot that properties were just annotations!!! :) Haven't used them for a while !!!
What I really meant was to add some attributes in @Property Annotation
For example
    @Property(
        key = GoogleCalendarPublisher.ACCOUNT_PROP,
        name = "Google Account Username",
        description = "[hidden email]",
        global = false, project = true, module = false , type = EMAIL, size =200),

or something similar :)
Patroklos

2012/6/18 Evgeny Mandrikov <[hidden email]>
Hi,

Properties can be specified via annotations, so you'd like to annotate annotations ? :)


On Mon, Jun 18, 2012 at 4:20 PM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Freddy
It would be great if we could annotate properties with annotations like
@URL
@Email
@Size 
etc.
Just like Hibernate uses similar annotations ... 
What do you think?
Regards
Patroklos

2012/6/17 Freddy Mallet <[hidden email]>
Indeed Ann, this is a missing feature. Feel free to create a JIRA ticket and to link it to http://jira.codehaus.org/browse/SONAR-3521

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Sat, Jun 16, 2012 at 8:17 PM, Ann Campbell <[hidden email]> wrote:
It varies.
* Does the string look like a URL? A URL for a WSDL? (And even: Can I connect to the service?)
* Is the "ticket type" one of the types I recognize? (Ditto status)
* and so on...



On Sat, Jun 16, 2012 at 3:57 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************






--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_







--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] property validation?

Simon Brandhof
Yes, we already have the component http://docs.sonarsource.org/3.1/apidocs/index.html?org/sonar/api/utils/ValidationMessages.html to do that.


On 18 June 2012 14:10, Ann Campbell <[hidden email]> wrote:
http://jira.codehaus.org/browse/SONAR-3589

Somewhere in the validation method, we need a way to return an error string rather than just a boolean. - Otherwise we leave the user wondering "I've tried 5 times. What the heck's wrong this time?" 

One way I've seen it handled in the past was to make one of the arguments look something like this:
 List<String> errorMessages

If a validation method returns false, then you'd know to spit out the messages to the users...



On Mon, Jun 18, 2012 at 7:03 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
That's great
And I suppose that  WsdlUrlValidation.class (and our own validators) will implement a validation method 
for instance 
public boolean validate(String propertyValue)

Patroklos

2012/6/18 Simon Brandhof <[hidden email]>
I was thinking about a field like
@Property(..., validation = WsdlUrlValidation.class)

Plugins could provide their own validators via a new extension point.



On 18 June 2012 12:39, Papapetrou P.Patroklos <[hidden email]> wrote:
The best scenario would be to create our own annotations by inherit @Property but since this is not allowed in Java,I suppose we can live only with some new attributes :)

2012/6/18 Papapetrou P.Patroklos <[hidden email]>

Woaoh!!!

Immediate responses from Sonar devs :) Don't shoot the pianist !! :)
I forgot that properties were just annotations!!! :) Haven't used them for a while !!!
What I really meant was to add some attributes in @Property Annotation
For example
    @Property(
        key = GoogleCalendarPublisher.ACCOUNT_PROP,
        name = "Google Account Username",
        description = "[hidden email]",
        global = false, project = true, module = false , type = EMAIL, size =200),

or something similar :)
Patroklos

2012/6/18 Evgeny Mandrikov <[hidden email]>
Hi,

Properties can be specified via annotations, so you'd like to annotate annotations ? :)


On Mon, Jun 18, 2012 at 4:20 PM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Freddy
It would be great if we could annotate properties with annotations like
@URL
@Email
@Size 
etc.
Just like Hibernate uses similar annotations ... 
What do you think?
Regards
Patroklos

2012/6/17 Freddy Mallet <[hidden email]>
Indeed Ann, this is a missing feature. Feel free to create a JIRA ticket and to link it to http://jira.codehaus.org/browse/SONAR-3521

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Sat, Jun 16, 2012 at 8:17 PM, Ann Campbell <[hidden email]> wrote:
It varies.
* Does the string look like a URL? A URL for a WSDL? (And even: Can I connect to the service?)
* Is the "ticket type" one of the types I recognize? (Ditto status)
* and so on...



On Sat, Jun 16, 2012 at 3:57 AM, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Ann

What kind of validation you need to do ?
Regards
Patroklos

2012/6/15 Ann Campbell <[hidden email]>
Is it possible for me to do validation on user-entered property values before they're stored?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************






--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_







--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************


Loading...