1 /* 2 * Copyright (c) 2009 The JOMC Project 3 * Copyright (c) 2005 Christian Schulte <cs@jomc.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 10 * o Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 13 * o Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in 15 * the documentation and/or other materials provided with the 16 * distribution. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE JOMC PROJECT AND CONTRIBUTORS "AS IS" 19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE JOMC PROJECT OR 22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 25 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 27 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 28 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * 30 * $Id: ModelValidator.java 1285 2010-01-15 07:48:39Z schulte2005 $ 31 * 32 */ 33 package org.jomc.model; 34 35 /** 36 * Object management and configuration model validator interface. 37 * 38 * @author <a href="mailto:cs@jomc.org">Christian Schulte</a> 39 * @version $Id: ModelValidator.java 1285 2010-01-15 07:48:39Z schulte2005 $ 40 */ 41 public interface ModelValidator 42 { 43 44 /** 45 * Validates a given list of modules. 46 * 47 * @param context The context to use for validating {@code modules}. 48 * @param modules The list of modules to validate. 49 * 50 * @return Validation report. 51 * 52 * @throws NullPointerException if {@code context} or {@code modules} is {@code null}. 53 * @throws ModelException if validation fails. 54 * 55 * @see ModelValidationReport#isModelValid() 56 */ 57 ModelValidationReport validateModel( ModelContext context, Modules modules ) 58 throws NullPointerException, ModelException; 59 60 }