1 /** 2 * Copyright 2005-2016 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.uif.lifecycle; 17 18 /** 19 * Abstract base lifecycle processor implementation. 20 * 21 * @author Kuali Rice Team (rice.collab@kuali.org) 22 */ 23 public abstract class ViewLifecycleProcessorBase implements ViewLifecycleProcessor { 24 25 /** 26 * The view lifecycle to be processed. 27 */ 28 private final ViewLifecycle lifecycle; 29 30 /** 31 * Creates a new processor for a lifecycle. 32 * 33 * @param lifecycle The lifecycle to process. 34 */ 35 ViewLifecycleProcessorBase(ViewLifecycle lifecycle) { 36 this.lifecycle = lifecycle; 37 } 38 39 /** 40 * {@inheritDoc} 41 */ 42 @Override 43 public ViewLifecycle getLifecycle() { 44 return lifecycle; 45 } 46 47 /** 48 * Reports a phase as active on the current thread. 49 * 50 * <p> 51 * Since each {@link ViewLifecycle} instance is specific to a thread, only one phase may be 52 * active at a time. 53 * </p> 54 * 55 * @param phase The phase to report as active, or null when the active phase has been 56 * completed. 57 * @see #getActivePhase() 58 */ 59 abstract void setActivePhase(ViewLifecyclePhase phase); 60 61 }