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.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 }