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.lookup;
17
18 import org.kuali.rice.krad.bo.BusinessObject;
19
20 import java.util.Collection;
21
22 /**
23 * Classes that implement this interface will refresh
24 */
25 public interface SelectiveReferenceRefresher {
26 /**
27 * Returns a list of references that must be refreshed after a lookup performed on an attribute is performed.
28 *
29 * A lookup on an attribute may cause many attribute values to be updated upon return from lookup. Generally,
30 * the returned attributes are the PK of the BO being looked up. For example,
31 * a lookup on an account number attribute will cause the chart of accounts code and account code to be returned.
32 *
33 * These returned attributes may cause other references on the page to be returned. For example, an account number lookup
34 * may cause the chart code to change, and if there is also an ObjectCode reference in the BO, then any change in the chart code will cause the
35 * referenced ObjectCode BO to be changed.
36 *
37 * @param attributeName the name of the attribute with a quickfinder of the maintained BO.
38 *
39 * @return a list of reference names that could be affected by lookup return values
40 */
41 public Collection<String> getAffectedReferencesFromLookup(BusinessObject baseBO, String attributeName, String collectionPrefix);
42 }