001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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    }