01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/metaobj/tags/sakai_2-4-1/metaobj-api/api/src/java/org/sakaiproject/metaobj/shared/mgt/StructuredArtifactValidationService.java $
03: * $Id: StructuredArtifactValidationService.java 9469 2006-05-15 14:52:05Z chmaurer@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.metaobj.shared.mgt;
21:
22: import java.util.List;
23:
24: import org.sakaiproject.metaobj.shared.model.ElementBean;
25:
26: /**
27: * Created by IntelliJ IDEA.
28: * User: John Ellis
29: * Date: Aug 18, 2005
30: * Time: 2:49:14 PM
31: * To change this template use File | Settings | File Templates.
32: */
33:
34: /**
35: * This interface allows for the validation of ElementBean objects
36: */
37: public interface StructuredArtifactValidationService {
38:
39: /**
40: * Validate this element from the root.
41: *
42: * @param element filled in element to be validated.
43: * @return list of ValidationError objects. If this list is
44: * returned empty, then the element validated successfully
45: * @see org.sakaiproject.metaobj.shared.model.ValidationError
46: */
47: public List validate(ElementBean element);
48:
49: /**
50: * Validate this element from the root.
51: *
52: * @param element filled in element to be validated.
53: * @param parentName this is the name of the parent of this object.
54: * All fields that have errors will have this name prepended with a "."
55: * @return list of ValidationError objects. If this list is
56: * returned empty, then the element validated successfully
57: * @see org.sakaiproject.metaobj.shared.model.ValidationError
58: */
59: public List validate(ElementBean element, String parentName);
60:
61: }
|