1 /**
2 * Copyright 2005-2014 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 *
27 */
28 public enum MetadataMergeAction {
29 /**
30 * The default behavior. Unset attributes will be left alone.
31 */
32 MERGE,
33 /**
34 * If a match is found (same data object or attribute name), the existing object will be replaced completely by this
35 * one.
36 */
37 REPLACE,
38 /**
39 * If a match is found (same data object or attribute name), the existing object will be removed. (Any attribute
40 * except that forming the key (type or attribute name) can be left unset.)
41 */
42 REMOVE,
43 /**
44 * If a match is found (same data object or attribute name), the existing object will be left alone. The metadata
45 * object will only be included if there is not already an existing object.
46 */
47 NO_OVERRIDE
48 }