From 06621fe17e4ba71afe255cdc987805d7899bc553 Mon Sep 17 00:00:00 2001 From: Bon-Yong Lee Date: Tue, 11 Dec 2012 10:03:15 +0900 Subject: [PATCH] [Title] Fix invalid copy in web-template using cli [Desc.] [Issue] --- .../common/verrari/template/StandardTemplate.java | 33 +++++++++++++++++----- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/StandardTemplate.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/StandardTemplate.java index 3c157ef..e49a8fc 100755 --- a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/StandardTemplate.java +++ b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/StandardTemplate.java @@ -70,7 +70,6 @@ import org.tizen.common.verrari.Storage; import org.tizen.common.verrari.Template; import org.tizen.common.verrari.TemplateException; import org.tizen.common.verrari.engine.TemplateEngineFactory; -import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateTransformer; import org.tizen.common.verrari.exception.InvalidMapperException; import org.tizen.common.verrari.exception.UnsupportedVersionException; import org.tizen.common.verrari.realm.StandardRealm; @@ -103,8 +102,14 @@ implements Template */ protected final HashMap attrs = new HashMap(); + /** + * Dictionaries for i18n + */ protected final HashMap bundles = new HashMap(); + /** + * Default dictionary for i18n + */ protected ResourceBundle defaultBundle; /** @@ -116,7 +121,7 @@ implements Template * template engine */ protected ITemplateEngine engine = null; - + /** * template list to start */ @@ -246,8 +251,7 @@ implements Template throws TemplateException, IOException { this.engine = TemplateEngineFactory.getInstance().create(); - final TemplateManager templates = new TemplateManager(); - templates.setTransformer( new FreemarkerTemplateTransformer() ); + TemplateManager templates = new TemplateManager(); final String excludes = attrs.get( ATTR_EXCLUDE ); final String includes = attrs.get( ATTR_INCLUDE ); @@ -293,6 +297,12 @@ implements Template engine.setTemplateProvider( templates ); } + /** + * Load {@link Manifest} contents from {@link InputStream} + * + * @param in stream to read + * @throws IOException when can't read from in + */ protected void loadAttribute( @@ -313,7 +323,16 @@ implements Template } - public String getMessage( final String key ) + /** + * + * @param key + * @return + */ + public + String + getMessage( + final String key + ) { logger.trace( "Key :{}", key ); Locale locale = Locale.getDefault(); @@ -410,11 +429,11 @@ implements Template } } } - catch (IOException e) + catch ( final IOException e ) { throw new TemplateException( e ); } - catch (Exception e) + catch ( final Exception e ) { throw new TemplateException( e ); } -- 2.7.4