001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portal.kernel.trash; 016 017 import java.util.List; 018 019 /** 020 * Represents the interface for registering handlers for those entities that can 021 * be moved to Trash. 022 * 023 * <p> 024 * The entities that can be registered are: 025 * </p> 026 * 027 * <ul> 028 * <li> 029 * {@link com.liferay.portlet.blogs.trash.BlogsEntryTrashHandler} 030 * </li> 031 * </ul> 032 * 033 * @author Alexander Chow 034 */ 035 public interface TrashHandlerRegistry { 036 037 /** 038 * Returns the trash handler associated with the class name. 039 * 040 * @param className class name of the TrashHandler 041 * @return the trash handler associated with the class name 042 */ 043 public TrashHandler getTrashHandler(String className); 044 045 /** 046 * Returns all of the trash handlers. 047 * 048 * @return the trash handlers 049 */ 050 public List<TrashHandler> getTrashHandlers(); 051 052 /** 053 * Registers the trash handler. 054 * 055 * @param trashHandler the TrashHandler to register 056 */ 057 public void register(TrashHandler trashHandler); 058 059 /** 060 * Unregisters the trash handler. 061 * 062 * @param trashHandler the trash handler to unregister 063 */ 064 public void unregister(TrashHandler trashHandler); 065 066 }