1 /**
2 * Copyright 2005-2015 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 * Represents a discrete task within the view lifecycle.
20 *
21 * @author Kuali Rice Team (rice.collab@kuali.org)
22 * @param <T> top level lifecycle element type this task applies to
23 */
24 public interface ViewLifecycleTask<T> extends Runnable {
25
26 /**
27 * Gets the top level lifecycle element type that this task applies to.
28 *
29 * <p>
30 * If an element is not a subclass of this type, then the task will not be performed on that
31 * element.
32 * </p>
33 *
34 * @return lifecycle element type
35 */
36 Class<T> getElementType();
37
38 /**
39 * Gets the phase this lifecycle task is a part of.
40 *
41 * @return lifecycle phase
42 */
43 LifecycleElementState getElementState();
44
45 /**
46 * @see #getElementState()
47 */
48 void setElementState(LifecycleElementState lifecycleElementState);
49
50 }