001 /**
002 * Copyright 2005-2014 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.rice.krad.lookup;
017
018 import org.kuali.rice.krad.bo.BusinessObject;
019
020 import java.util.Collection;
021
022 /**
023 * Classes that implement this interface will refresh
024 */
025 public interface SelectiveReferenceRefresher {
026 /**
027 * Returns a list of references that must be refreshed after a lookup performed on an attribute is performed.
028 *
029 * A lookup on an attribute may cause many attribute values to be updated upon return from lookup. Generally,
030 * the returned attributes are the PK of the BO being looked up. For example,
031 * a lookup on an account number attribute will cause the chart of accounts code and account code to be returned.
032 *
033 * These returned attributes may cause other references on the page to be returned. For example, an account number lookup
034 * 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
035 * referenced ObjectCode BO to be changed.
036 *
037 * @param attributeName the name of the attribute with a quickfinder of the maintained BO.
038 *
039 * @return a list of reference names that could be affected by lookup return values
040 */
041 public Collection<String> getAffectedReferencesFromLookup(BusinessObject baseBO, String attributeName, String collectionPrefix);
042 }