Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FE12DFCF for ; Thu, 13 Dec 2012 05:32:00 +0000 (UTC) Received: (qmail 28940 invoked by uid 500); 13 Dec 2012 05:32:00 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 28895 invoked by uid 500); 13 Dec 2012 05:32:00 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 28884 invoked by uid 99); 13 Dec 2012 05:32:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2012 05:32:00 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.149.83] (HELO na3sys009aog134.obsmtp.com) (74.125.149.83) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2012 05:31:53 +0000 Received: from mail-lb0-f197.google.com ([209.85.217.197]) (using TLSv1) by na3sys009aob134.postini.com ([74.125.148.12]) with SMTP ID DSNKUMloMpUF/uHNRAdyDqgzJCuu1HCeWq9I@postini.com; Wed, 12 Dec 2012 21:31:33 PST Received: by mail-lb0-f197.google.com with SMTP id go10so1146474lbb.0 for ; Wed, 12 Dec 2012 21:31:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=GPn35z1GAtTbqRk5Vg7uDe13yHIkJkbiICY06vIvuO8=; b=ZBbEbTo09hgjhLHAjG0t3roK23hwl5uOjJrtSYII+MJlXwa8PGLSl4S6AN/oQFQl3B mcGAQByH9CkWXMlZSP3gOVnlp7KDVc/HR9MFcpc55JcDMRe62ofpSjS05+4SubSRUZJ7 XlvT3nVg5G9iwfomh3FfQgYmJ15fLPLkulJXDFc7VUC/nVdWW99nG5oX0s72ebSQR+eG HpZJa4BbsfNwXDv/S+olsnIeYJjVezJi/ruVNKGsXIl1gB6Z5UDcmXwPoAjeVUOtUOTQ yWp0g/+T/ixkj9tkt99M/510Hg/8Y6gLpGWeyDooNtx8SziO5kr5E3HJA+M4ohF3xV79 cIyg== Received: by 10.180.81.232 with SMTP id d8mr880104wiy.14.1355376688962; Wed, 12 Dec 2012 21:31:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.81.232 with SMTP id d8mr880101wiy.14.1355376688882; Wed, 12 Dec 2012 21:31:28 -0800 (PST) Received: by 10.194.137.194 with HTTP; Wed, 12 Dec 2012 21:31:28 -0800 (PST) In-Reply-To: References: Date: Thu, 13 Dec 2012 00:31:28 -0500 Message-ID: Subject: Re: [DISCUSS] Api refactoring -- validation From: Chip Childers To: "cloudstack-dev@incubator.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlyj7xucDVto5dSQmIF9wmMZxXEixC2Y4zAOg00MBIJei//1/hL+BbQJHSC3rYDCdgUkb6wCSvaGo+wk+3/YKxPBOImeyPXIVHcWcNmv1UZn1GrQAb1eMIw0jP2jNdsx6xb9RdjG7nFgWtnpTukpExwJ+3LpUOo4ErhiVO8OJba4dDLaXoBn5Qqouxu8TSS2F1kiqJF X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Dec 12, 2012 at 6:16 PM, Fang Wang wrote: > Hi all, > > In our current API refactoring work, we plan to add a validation annotation to > Validate DB entity, validate some parameter range, etc. > We plan to add the @validate annotation to API commands. This might be a silly question, but why the command classes and not the Dao's? Is this to validate the database inputs? Or are we talking about cleaning up the API input validation logic? Thanks! > IT is suggested we could use Hibernate Validator. Anyone with experience with > Hibernate validator, how we could deploy it here? > > 1. is there a version we should definitely use? > 2. Which option is better to integrate into our maven? Add it as dependency or as a plugin? > 3. What is the latest version working with maven? > > Thanks for any input, > -Fang > >