Package wt.inf.template
Interface ContainerTemplateService
- All Known Implementing Classes:
StandardContainerTemplateService
Methods for manipulating templates.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptiongetContainerTemplate(WTContainerRef parent, String name, Class containerClass) Gets a template given a name and a container class object.getContainerTemplate(WTContainerRef parent, String name, Class containerClass, boolean lookupFlag, String locale) Gets a template given a name and a container class.getContainerTemplate(WTContainerRef parent, String name, String containerClassName) Gets a template given a name and a fully qualified container class name.getContainerTemplate(WTContainerRef parent, String name, String containerClassName, boolean lookupFlag, String locale) Gets a template given a name and a contaienr class name.getContainerTemplate(ContainerTemplateDefinition definition) Gets the latest iteration of a template given a container definition.getContainerTemplateRef(WTContainerRef parent, String name, Class containerClass) Gets a template given a name and container class object.getContainerTemplateRef(WTContainerRef parent, String name, Class containerClass, boolean lookup, String locale) Gets a template given a name and a fully qualified container class name.getContainerTemplateRef(WTContainerRef parent, String name, String containerClassName) Gets a template given a name and a fully qualified container class name.getContainerTemplateRef(WTContainerRef parent, String name, String containerClassName, boolean lookupflag, String locale) Gets a template given a name and a fully qualified container class name.getContainerTemplateRef(ContainerTemplateDefinition definition) Gets the latest iteration of a template given a container definition.getEnabledTemplateMasters(LookupSpec lookupSpec) Returns all template masters residing in the passed in container, the locale is the server side locale
Supported API: truegetEnabledTemplateMasters(LookupSpec lookupSpec, Class containerClass) Returns all enabled template masters that reside in the passed in LookupSpec
Supported API: truegetEnabledTemplateMasters(LookupSpec lookupSpec, Class containerClass, Locale clientLocale) Returns all enabled template masters that reside in the passed in container, the result set is ordered by name corresponding to the passed in Locale.getEnabledTemplateMasters(WTContainerRef parentContainer) returns all template masters residing in the passed in container, the locale is the server side locale
Supported API: truegetEnabledTemplateMasters(WTContainerRef parentContainer, Class containerClass) Returns all enabled template masters that reside in the passed in container, the result set is ordered by name corresponding to the passed in Locale.getEnabledTemplateMasters(WTContainerRef parentContainer, Class containerClass, Locale clientLocale) Returns all enabled template masters that reside in the passed in container, the result set is ordered by name corresponding to the passed in Locale.getEnabledTemplateMasters(WTContainerRef parentContainer, String containerClassName) Returns all enabled template masters that reside in the passed in container class name, the result set is ordered by name corresponding to the passed in Locale.getEnabledTemplateMasters(WTContainerRef parentContainer, String containerClassName, boolean includeSuperTypes) Returns all enabled template masters that reside in the passed in container class name, the result set is ordered by name corresponding to the passed in Locale.
-
Method Details
-
getEnabledTemplateMasters
QueryResult getEnabledTemplateMasters(WTContainerRef parentContainer, Class containerClass) throws WTException Returns all enabled template masters that reside in the passed in container, the result set is ordered by name corresponding to the passed in Locale.
Supported API: true- Parameters:
parentContainer-containerClass-- Returns:
- QueryResult
- Throws:
WTException
-
getEnabledTemplateMasters
QueryResult getEnabledTemplateMasters(WTContainerRef parentContainer, String containerClassName) throws WTException Returns all enabled template masters that reside in the passed in container class name, the result set is ordered by name corresponding to the passed in Locale.
Supported API: true- Parameters:
parentContainer-containerClassName- class name for modeled container types. For sub types this is internal name of the type. Ex:- For Program the parameter should be 'com.ptc.Program'- Returns:
- QueryResult
- Throws:
WTException
-
getEnabledTemplateMasters
QueryResult getEnabledTemplateMasters(WTContainerRef parentContainer, String containerClassName, boolean includeSuperTypes) throws WTException Returns all enabled template masters that reside in the passed in container class name, the result set is ordered by name corresponding to the passed in Locale. If containerClassName is an OOTB sub types (QMS, UDI, Program) the results exclude their base super type (Library, Project2)
Supported API: true- Parameters:
parentContainer-containerClassName- class name for modeled container types. For sub types this is internal name of the type. Ex:- For Program the parameter should be 'com.ptc.Program'includeSuperTypes- boolean value to indicate to return templates for super types of container class name- Returns:
- QueryResult
- Throws:
WTException
-
getEnabledTemplateMasters
QueryResult getEnabledTemplateMasters(LookupSpec lookupSpec, Class containerClass) throws WTException Returns all enabled template masters that reside in the passed in LookupSpec
Supported API: true- Parameters:
lookupSpec-containerClass-- Returns:
- QueryResult
- Throws:
WTException
-
getEnabledTemplateMasters
QueryResult getEnabledTemplateMasters(WTContainerRef parentContainer, Class containerClass, Locale clientLocale) throws WTException Returns all enabled template masters that reside in the passed in container, the result set is ordered by name corresponding to the passed in Locale.
Supported API: true- Parameters:
parentContainer-containerClass-clientLocale-- Returns:
- QueryResult
- Throws:
WTException
-
getEnabledTemplateMasters
QueryResult getEnabledTemplateMasters(LookupSpec lookupSpec, Class containerClass, Locale clientLocale) throws WTException Returns all enabled template masters that reside in the passed in container, the result set is ordered by name corresponding to the passed in Locale.
Supported API: true- Parameters:
lookupSpec-containerClass-clientLocale-- Returns:
- QueryResult
- Throws:
WTException
-
getEnabledTemplateMasters
returns all template masters residing in the passed in container, the locale is the server side locale
Supported API: true- Parameters:
parentContainer-- Returns:
- QueryResult
- Throws:
WTException
-
getEnabledTemplateMasters
Returns all template masters residing in the passed in container, the locale is the server side locale
Supported API: true- Parameters:
lookupSpec-- Returns:
- QueryResult
- Throws:
WTException
-
getContainerTemplateRef
WTContainerTemplateRef getContainerTemplateRef(WTContainerRef parent, String name, Class containerClass) throws WTException Gets a template given a name and container class object. If a template matching the passed in criteria is not found in the target container, a lookup is performed.
Supported API: true- Parameters:
parent-name-containerClass- An Exception will be thrown if the class is not a subclass of WTContainer- Returns:
- WTContainerTemplateRef
- Throws:
WTException
-
getContainerTemplateRef
WTContainerTemplateRef getContainerTemplateRef(WTContainerRef parent, String name, Class containerClass, boolean lookup, String locale) throws WTException Gets a template given a name and a fully qualified container class name. This also for restricting the scope of the search to the passed in container, and to a specific locale.
Supported API: true- Parameters:
parent-name-containerClass-lookup- If set to false the search is restricted to the target container, if set to true, a lookup is performed.locale- This may be null or an empty string.- Returns:
- WTContainerTemplateRef
- Throws:
WTException
-
getContainerTemplateRef
WTContainerTemplateRef getContainerTemplateRef(WTContainerRef parent, String name, String containerClassName) throws WTException Gets a template given a name and a fully qualified container class name. If the template is not found, a lookup is performed.
Supported API: true- Parameters:
parent-name-containerClassName- An Exception will be thrown if this is not the class name of a subclass of WTContainer- Returns:
- WTContainerTemplateRef
- Throws:
WTException
-
getContainerTemplateRef
WTContainerTemplateRef getContainerTemplateRef(WTContainerRef parent, String name, String containerClassName, boolean lookupflag, String locale) throws WTException Gets a template given a name and a fully qualified container class name.
Supported API: true- Parameters:
parent-name-containerClassName-lookupflag- If the flag is set to false the search is restricted to the target contaner.locale-- Returns:
- WTContainerTemplateRef
- Throws:
WTException
-
getContainerTemplateRef
WTContainerTemplateRef getContainerTemplateRef(ContainerTemplateDefinition definition) throws WTException Gets the latest iteration of a template given a container definition.
Supported API: true- Parameters:
definition- Either a WTContainerTemplate or a WTContainerTemplateMaster object- Returns:
- WTContainerTemplateRef
- Throws:
WTException
-
getContainerTemplate
WTContainerTemplate getContainerTemplate(WTContainerRef parent, String name, String containerClassName) throws WTException Gets a template given a name and a fully qualified container class name. If a template matching this criteria is not found in the target container a lookup will be performed.
Supported API: true- Parameters:
parent-name-containerClassName-- Returns:
- WTContainerTemplate
- Throws:
WTException
-
getContainerTemplate
WTContainerTemplate getContainerTemplate(WTContainerRef parent, String name, String containerClassName, boolean lookupFlag, String locale) throws WTException Gets a template given a name and a contaienr class name. This signature allows for filtering by container and locale. By specifying the lookup flag to false, the search is restricted to the passed in template. If it is set to true a lookup is performed that will return the first match to the passed in criteria.
Supported API: true- Parameters:
parent-name-containerClassName-lookupFlag- If set to true a lookup is performed.locale- If you are only interested in a specific locale pass in a locale this will filter the query, other wise this value may be null or an empty string- Returns:
- WTContainerTemplate
- Throws:
WTException
-
getContainerTemplate
WTContainerTemplate getContainerTemplate(WTContainerRef parent, String name, Class containerClass) throws WTException Gets a template given a name and a container class object. A lookup will be performed if the container matching the passed in criteria is not in the target container
Supported API: true- Parameters:
parent-name-containerClass-- Returns:
- WTContainerTemplate
- Throws:
WTException
-
getContainerTemplate
Gets the latest iteration of a template given a container definition.
Supported API: true- Parameters:
definition- Either a WTContainerTemplate or a WTContainerTemplateMaster object- Returns:
- WTContainerTemplate
- Throws:
WTException
-
getContainerTemplate
WTContainerTemplate getContainerTemplate(WTContainerRef parent, String name, Class containerClass, boolean lookupFlag, String locale) throws WTException Gets a template given a name and a container class. This signature allows for filtering by container and locale
Supported API: true- Parameters:
parent-name-containerClass-lookupFlag- If set to true a lookup is performed.locale- If you are only interested in a specific locale pass in a locale this will filter the query, other wise this value may be null or an empty string- Returns:
- WTContainerTemplate
- Throws:
WTException
-