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.templateparser;
016    
017    import java.util.Map;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public abstract class BaseTransformerListener implements TransformerListener {
023    
024            @Override
025            public String getLanguageId() {
026                    return _languageId;
027            }
028    
029            @Override
030            public Map<String, String> getTokens() {
031                    return _tokens;
032            }
033    
034            @Override
035            public boolean isTemplateDriven() {
036                    return _templateDriven;
037            }
038    
039            @Override
040            public abstract String onOutput(String s);
041    
042            @Override
043            public abstract String onScript(String s);
044    
045            @Override
046            public abstract String onXml(String s);
047    
048            @Override
049            public void setLanguageId(String languageId) {
050                    _languageId = languageId;
051            }
052    
053            @Override
054            public void setTemplateDriven(boolean templateDriven) {
055                    _templateDriven = templateDriven;
056            }
057    
058            @Override
059            public void setTokens(Map<String, String> tokens) {
060                    _tokens = tokens;
061            }
062    
063            private String _languageId;
064            private boolean _templateDriven;
065            private Map<String, String> _tokens;
066    
067    }