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.template;
016    
017    import java.util.List;
018    
019    /**
020     * @author Juan Fern??ndez
021     */
022    public interface TemplateHandlerRegistry {
023    
024            public long[] getClassNameIds();
025    
026            /**
027             * Returns the template handler associated with the class name ID.
028             *
029             * @param  classNameId the class name ID of the template
030             * @return the template handler associated with the class name ID
031             */
032            public TemplateHandler getTemplateHandler(long classNameId);
033    
034            /**
035             * Returns the template handler associated with the class name.
036             *
037             * @param  className the class name of the template
038             * @return the template handler associated with the class name
039             */
040            public TemplateHandler getTemplateHandler(String className);
041    
042            /**
043             * Returns all the template handlers.
044             *
045             * @return the template handlers
046             */
047            public List<TemplateHandler> getTemplateHandlers();
048    
049            /**
050             * Registers the template handler.
051             *
052             * @param templateHandler the template handler to register
053             */
054            public void register(TemplateHandler templateHandler);
055    
056            /**
057             * Unregisters the template handler.
058             *
059             * @param templateHandler the template handler to unregister
060             */
061            public void unregister(TemplateHandler templateHandler);
062    
063    }