View Javadoc
1   /**
2    * Copyright 2005-2015 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.data.metadata;
17  
18  import org.kuali.rice.krad.data.provider.CompositeMetadataProvider;
19  
20  /**
21   * A component of {@link MetadataCommon} which specifies what to do when a duplicate data object, attribute, collection
22   * or reference is encountered during the merging performed by the {@link CompositeMetadataProvider}.
23   * 
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  public enum MetadataMergeAction {
27  	/**
28  	 * The default behavior. Unset attributes will be left alone.
29  	 */
30  	MERGE,
31  	/**
32  	 * If a match is found (same data object or attribute name), the existing object will be replaced completely by this
33  	 * one.
34  	 */
35  	REPLACE,
36  	/**
37  	 * If a match is found (same data object or attribute name), the existing object will be removed. (Any attribute
38  	 * except that forming the key (type or attribute name) can be left unset.)
39  	 */
40  	REMOVE,
41  	/**
42  	 * If a match is found (same data object or attribute name), the existing object will be left alone. The metadata
43  	 * object will only be included if there is not already an existing object.
44  	 */
45  	NO_OVERRIDE
46  }