public class TemplateEngine extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TEMPLATE_ASSOCIATIONS_EXTENSION_ID |
static String |
TEMPLATES_EXTENSION_ID |
Modifier and Type | Method and Description |
---|---|
static List<Element> |
getChildrenOfElement(Element element)
Returns the Children of the Element.
|
static List<Element> |
getChildrenOfElementByTag(Element element,
String tag)
Returns the child elements by Tag
|
static TemplateEngine |
getDefault()
create the singleton instance, check for null condition of
TEMPLATE_ENGINE.
|
TemplateCore |
getFirstTemplate(String projectType)
Equivalent to calling the overloaded version of getFirstTemplate with null arguments for
toolChain and usageFilter.
|
TemplateCore |
getFirstTemplate(String projectType,
String toolChain,
String usageFilter)
Returns the first template defined for the specified parameters
|
static Map<String,String> |
getSharedDefaults() |
TemplateCore |
getTemplateById(String templateId) |
Map<String,List<TemplateInfo>> |
getTemplateInfoMap() |
TemplateInfo[] |
getTemplateInfos() |
TemplateInfo[] |
getTemplateInfos(String projectType) |
TemplateInfo[] |
getTemplateInfos(String projectType,
String toolChain) |
TemplateInfo[] |
getTemplateInfos(String projectType,
String toolChain,
String usageFilter)
Gets an array of template info objects matching the criteria passed as parameters.
|
TemplateCore[] |
getTemplates()
Returns all the TemplateCore objects, no filtering is done.
|
TemplateCore[] |
getTemplates(String projectType) |
TemplateCore[] |
getTemplates(String projectType,
String toolChain) |
TemplateCore[] |
getTemplates(String projectType,
String toolChain,
String usageFilter)
This method will be called by Container UIs (Wizard, PropertyPage,
PreferencePage).
|
URL |
getTemplateSchemaURL()
Returns the Template Schema URL
|
void |
updateSharedDefaults(TemplateCore template)
update The SharedDefaults Map.
|
public static String TEMPLATES_EXTENSION_ID
public static String TEMPLATE_ASSOCIATIONS_EXTENSION_ID
public TemplateCore[] getTemplates()
public TemplateCore getFirstTemplate(String projectType, String toolChain, String usageFilter)
projectType
- may not be nulltoolChain
- may be null to indicate no tool-chain filteringusageFilter
- a regex in java.util.regex.Pattern format, may be null to indicate no filteringPattern
public TemplateCore getFirstTemplate(String projectType)
getFirstTemplate(String, String, String)
public TemplateCore[] getTemplates(String projectType, String toolChain, String usageFilter)
public TemplateCore[] getTemplates(String projectType, String toolChain)
public TemplateCore[] getTemplates(String projectType)
public TemplateCore getTemplateById(String templateId)
public void updateSharedDefaults(TemplateCore template)
template
- public static TemplateEngine getDefault()
public TemplateInfo[] getTemplateInfos(String projectType, String toolChain, String usageFilter)
projectType
- may not be nulltoolChain
- may be null to indicate no tool-chainusageFilter
- a usage string which is matched against the filter from the template, may be null
to indicate no usage filteringpublic TemplateInfo[] getTemplateInfos(String projectType, String toolChain)
public TemplateInfo[] getTemplateInfos(String projectType)
public TemplateInfo[] getTemplateInfos()
public Map<String,List<TemplateInfo>> getTemplateInfoMap()
public URL getTemplateSchemaURL() throws IOException
IOException
public static List<Element> getChildrenOfElement(Element element)
element
- Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.