Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FORGE-1745: Fix crazy Templates API (Breaks backwards compatibility) …
…And solve FreemarkerTemplate proxy issue.
- Loading branch information
1 parent
d5edebd
commit b6dd963
Showing
21 changed files
with
303 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
templates/api/src/main/java/org/jboss/forge/addon/templates/TemplateFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.addon.templates; | ||
|
||
import org.jboss.forge.addon.resource.Resource; | ||
|
||
/** | ||
* Creates a {@link TemplateProcessor} based on a {@link Template} | ||
* | ||
* @author <a href="ggastald@redhat.com">George Gastaldi</a> | ||
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> | ||
*/ | ||
public interface TemplateFactory | ||
{ | ||
/** | ||
* Create a {@link TemplateProcessor} for the supplied {@link Resource} and {@link Template} type. | ||
*/ | ||
Template create(Resource<?> template, Class<? extends Template> type); | ||
} |
28 changes: 0 additions & 28 deletions
28
templates/api/src/main/java/org/jboss/forge/addon/templates/TemplateProcessor.java
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
templates/api/src/main/java/org/jboss/forge/addon/templates/TemplateProcessorFactory.java
This file was deleted.
Oops, something went wrong.
20 changes: 9 additions & 11 deletions
20
...eemarker/src/main/java/org/jboss/forge/addon/templates/freemarker/FreemarkerTemplate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
package org.jboss.forge.addon.templates.freemarker; | ||
|
||
import org.jboss.forge.addon.resource.Resource; | ||
import org.jboss.forge.addon.templates.AbstractTemplate; | ||
import org.jboss.forge.addon.templates.Template; | ||
|
||
/** | ||
* An abstract representation of a Freemarker template. Consumers of this class create instances of it with | ||
* {@link Resource} instances to wrap Freemarker template resources. This class is used to distinguish Freemarker | ||
* templates from other templates. | ||
* | ||
* A Freemarker {@link Template}. | ||
* | ||
* @author Vineet Reynolds | ||
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> | ||
*/ | ||
public class FreemarkerTemplate extends AbstractTemplate | ||
public interface FreemarkerTemplate extends Template | ||
{ | ||
public FreemarkerTemplate(Resource<?> resource) | ||
{ | ||
super(resource); | ||
} | ||
/** | ||
* Get the Freemarker engine template Configuration. | ||
*/ | ||
public freemarker.template.Configuration getFreemarkerConfig(); | ||
} |
Oops, something went wrong.