001/** 002 * Copyright 2005-2016 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 */ 016package org.kuali.rice.krad.uif.lifecycle; 017 018import org.kuali.rice.krad.uif.component.Component; 019import org.kuali.rice.krad.uif.util.LifecycleElement; 020import org.kuali.rice.krad.uif.util.LifecycleElement; 021import org.kuali.rice.krad.uif.view.View; 022 023import java.util.List; 024 025/** 026 * Encapsulates the concept of creating {@link ViewLifecyclePhase} instances during a the view 027 * lifecycle build process. 028 * 029 * @author Kuali Rice Team (rice.collab@kuali.org) 030 * @see ViewLifecycleBuild 031 */ 032public interface ViewLifecyclePhaseBuilder { 033 034 /** 035 * Creates a lifecycle phase instance for the given view. 036 * 037 * @param view view instance the phase should be built for 038 * @param viewPhase View phase to build an instance for 039 * @return pre-process phase instance 040 * @see ViewLifecycle#getView() 041 */ 042 ViewLifecyclePhase buildPhase(View view, String viewPhase, List<String> refreshPaths); 043 044 /** 045 * Creates a lifecycle phase instance for a specific component in the current lifecycle. 046 * 047 * @param viewPhase view phase to build an instance for 048 * @param element lifecycle element to build an instance for 049 * @param parent parent component 050 * @param parentPath path relative to the parent component referring to the lifecycle element 051 * @return phase instance 052 */ 053 ViewLifecyclePhase buildPhase(String viewPhase, LifecycleElement element, Component parent, String parentPath, 054 List<String> refreshPaths); 055 056}