You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by SvS <Du...@solcon.nl> on 2013/10/02 10:26:57 UTC
Validation of input Apache Karaf Web Console Configuration
Hi,
Is it possible to validate the configuration input (Apache Karaf Web Console
Configuration) and to send a response back to the user.
Thanks,
Sam.
--
View this message in context: http://karaf.922171.n3.nabble.com/Validation-of-input-Apache-Karaf-Web-Console-Configuration-tp4029805.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Validation of input Apache Karaf Web Console Configuration
Posted by Achim Nierbeck <bc...@googlemail.com>.
One more thing,
when using MetaType for Pax-Web
I used the following [1], but as you can see I added all fields as String
since
the web-console doesn't handle it right if the field is non string and it
doesn't convert those appropriate for the Configuration-Admin
regards, Achim
[1] -
https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-runtime/src/main/resources/OSGI-INF/metatype/metatype.xml
2013/10/2 Achim Nierbeck <bc...@googlemail.com>
> Well if you're using the Felix based WebConsole which is default for Karaf
> you'll need to use this.
> Though I'm not sure if it already does some validation for the input
> fields. It helps though for rendering.
>
> regards, Achim
>
>
> 2013/10/2 SvS <Du...@solcon.nl>
>
>> Do you mean that it is necessary to specify and implement a specific AD
>> (Attribute Definition) type for the metatype service?
>>
>> For example:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <metatype:MetaData
>> xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0">
>> <OCD description=".....>
>> <AD id="fileLocationUri" type="Uri" .../>
>>
>> ....
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Validation-of-input-Apache-Karaf-Web-Console-Configuration-tp4029805p4029809.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
> Commiter & Project Lead
> blog <http://notizblog.nierbeck.de/>
>
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>
Re: Validation of input Apache Karaf Web Console Configuration
Posted by Achim Nierbeck <bc...@googlemail.com>.
Well if you're using the Felix based WebConsole which is default for Karaf
you'll need to use this.
Though I'm not sure if it already does some validation for the input
fields. It helps though for rendering.
regards, Achim
2013/10/2 SvS <Du...@solcon.nl>
> Do you mean that it is necessary to specify and implement a specific AD
> (Attribute Definition) type for the metatype service?
>
> For example:
> <?xml version="1.0" encoding="UTF-8"?>
> <metatype:MetaData
> xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0">
> <OCD description=".....>
> <AD id="fileLocationUri" type="Uri" .../>
>
> ....
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Validation-of-input-Apache-Karaf-Web-Console-Configuration-tp4029805p4029809.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>
Re: Validation of input Apache Karaf Web Console Configuration
Posted by SvS <Du...@solcon.nl>.
Do you mean that it is necessary to specify and implement a specific AD
(Attribute Definition) type for the metatype service?
For example:
<?xml version="1.0" encoding="UTF-8"?>
<metatype:MetaData
xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0">
<OCD description=".....>
<AD id="fileLocationUri" type="Uri" .../>
....
--
View this message in context: http://karaf.922171.n3.nabble.com/Validation-of-input-Apache-Karaf-Web-Console-Configuration-tp4029805p4029809.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Validation of input Apache Karaf Web Console Configuration
Posted by Achim Nierbeck <bc...@googlemail.com>.
You most likely are looking for the Meta-Type Service which is used to tell
the configuration admin perspective how to render certain variables.
It might also be used to for Validation, though I'm not sure the
Web-Console plugin does interpret all of the information available for
this.
regards, Achim
2013/10/2 Jean-Baptiste Onofré <jb...@nanthrax.net>
> Hi Sam,
>
> what do you mean by "validation" ?
>
> Could you explain your use case ?
>
> Thanks
> Regards
> JB
>
>
> On 10/02/2013 10:26 AM, SvS wrote:
>
>> Hi,
>>
>> Is it possible to validate the configuration input (Apache Karaf Web
>> Console
>> Configuration) and to send a response back to the user.
>>
>> Thanks,
>> Sam.
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.**
>> com/Validation-of-input-**Apache-Karaf-Web-Console-**
>> Configuration-tp4029805.html<http://karaf.922171.n3.nabble.com/Validation-of-input-Apache-Karaf-Web-Console-Configuration-tp4029805.html>
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>
Re: Validation of input Apache Karaf Web Console Configuration
Posted by SvS <Du...@solcon.nl>.
Hi JB,
Thanks for the quick response!
In the configuration a URI is required for a file location. The input can be
an invalid URI. (The input is validated.) I would like to inform the user
(of the Apache Karaf Web Console Configuration) about the invalid input.
Thanks,
Sam.
--
View this message in context: http://karaf.922171.n3.nabble.com/Validation-of-input-Apache-Karaf-Web-Console-Configuration-tp4029805p4029808.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Validation of input Apache Karaf Web Console Configuration
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Sam,
what do you mean by "validation" ?
Could you explain your use case ?
Thanks
Regards
JB
On 10/02/2013 10:26 AM, SvS wrote:
> Hi,
>
> Is it possible to validate the configuration input (Apache Karaf Web Console
> Configuration) and to send a response back to the user.
>
> Thanks,
> Sam.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Validation-of-input-Apache-Karaf-Web-Console-Configuration-tp4029805.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com