001 /** 002 * Copyright 2005-2012 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.kew.plugin; 017 018 /** 019 * An interface representing an Entity that can be reloaded. Calls to reload should only be executed if 020 * this Reloadable has flagged itself as reloadable according to the isReloadable() method. 021 * 022 * <p>If invocations of isReloadable() return false then calls to reload() should be 023 * no-ops. 024 * 025 * @author Kuali Rice Team (rice.collab@kuali.org) 026 */ 027 public interface Reloadable { 028 029 /** 030 * Indicates whether or not this Reloadable currently supports being reloaded. 031 * If this method returns false then calls to reload() are effectively no-ops. 032 * 033 * @return true if this Reloadable can be reloaded, false otherwise 034 */ 035 public boolean isReloadable(); 036 037 public boolean isReloadNeeded(); 038 039 /** 040 * Reloads the Reloadable. If isReloadable() returns false then this method 041 * should be a no-op. 042 */ 043 public void reload() throws Exception; 044 045 }