On 01/29/2010 07:53 AM, Pavel Zuna wrote:
John Dennis wrote:
In this scheme the you don't need to keep state, you don't need to
special case any code, you can use the existing normalize and validate
mechanisms.
The problem here is that validate/normalize can only be used on final
values passed to commands. Both validate and normalize are called on the
client and then again on the server. Files need to be loaded on the
client, so you can't do it in a method that is shared.

A File Command class validates by assuring the file is readable, it's normalize reads the contents. Then it calls the matching Str command class with the data it read. The Str class validate and normalizes the string data unaware it originated from a file. On the server side it never sees the File Command parameter, only Str parameter. Think of the File Command as a temporary command parameter which generates the resulting Str parameter.

--
John Dennis <jden...@redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to