View Javadoc

    1   /* Copyright 2004, 2005 Acegi Technology Pty Limited
    2    *
    3    * Licensed under the Apache License, Version 2.0 (the "License");
    4    * you may not use this file except in compliance with the License.
    5    * You may obtain a copy of the License at
    6    *
    7    *     http://www.apache.org/licenses/LICENSE-2.0
    8    *
    9    * Unless required by applicable law or agreed to in writing, software
    10   * distributed under the License is distributed on an "AS IS" BASIS,
    11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12   * See the License for the specific language governing permissions and
    13   * limitations under the License.
    14   */
    15
    16  package org.acegisecurity.domain.validation;
    17
    18  import org.springframework.validation.Validator;
    19
    20
    21  /***
    22   * <code>ValidationRegistryManager</code> implementations are able to
    23   * authoritatively return a <code>Validator</code> instance that is suitable
    24   * for a given domain object.
    25   *
    26   * <p>
    27   * Implementations are free to implement their own strategy for maintaining the
    28   * list of <code>Validator</code>s, or create them on-demand if preferred.
    29   * This interface is non-prescriptive.
    30   * </p>
    31   *
    32   * @author Matthew E. Porter
    33   * @author Ben Alex
    34   * @version $Id: ValidationRegistryManager.java,v 1.2 2005/11/17 00:55:50 benalex Exp $
    35   */
    36  public interface ValidationRegistryManager {
    37      //~ Methods ================================================================
    38
    39      /***
    40       * Obtains the <code>Validator</code> that applies for a given domain
    41       * object class.
    42       *
    43       * @param domainClass that a <code>Validator</code> is required for
    44       *
    45       * @return the <code>Validator</code>, or <code>null</code> if no
    46       *         <code>Validator</code> is known for the indicated
    47       *         <code>domainClass</code>
    48       */
    49      public Validator findValidator(Class domainClass);
    50  }