Skip navigation links


com.fatwire.services.dao
Interface TemplateDao

All Superinterfaces:
DataAccessObject

public interface TemplateDao
extends DataAccessObject

The Template Data Access Object is the interface providing access to template related data.


Method Summary
 java.util.List<ArgumentBean> getArguments(AssetId assetId)
          Returns a list containing the arguments associated with a template for the specified asset type.
 java.lang.String getPageName(java.lang.String templateName, java.lang.String assetType, java.lang.Long site)
          Returns the Site Catalog pagename corresponding to a template.
 java.util.List<ArgumentBean> getTemplateArguments(java.lang.String templateName, java.lang.String assetType)
          Returns a list containing the arguments associated with a template for the specified asset type.
 java.util.List<TemplateBean> getTemplates(TypeBean type, java.lang.Long site, java.util.List<TemplateBean.Type> templateTypes)
          Returns the templates which can be applied for the the given asset type and sub-type.

 

Methods inherited from interface com.fatwire.services.dao.DataAccessObject
getResponse, getService, setService

 

Method Detail

getTemplates

java.util.List<TemplateBean> getTemplates(TypeBean type,
                                          java.lang.Long site,
                                          java.util.List<TemplateBean.Type> templateTypes)
                                          throws DataAccessException
Returns the templates which can be applied for the the given asset type and sub-type. It will also include typeless templates (templates that can apply to various asset types). The returned list will be filtered based on the site, template type, and will contain the union of all templates available for each type.
Parameters:
type - the asset type and sub-type for which the templates are to be retrieved.
site - the site for which the templates are to be retrieved.
templateTypes - list of all the template types which need to be included.
Returns:
a TemplateBean instance providing all the templates.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

getTemplateArguments

java.util.List<ArgumentBean> getTemplateArguments(java.lang.String templateName,
                                                  java.lang.String assetType)
                                                  throws DataAccessException
Returns a list containing the arguments associated with a template for the specified asset type.
Parameters:
templateBean - the template for which the arguments need to be retrieved.
type - the asset type for which the templates are to be retrieved.
Returns:
a list containing the arguments associated with this template and the asset type.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

getPageName

java.lang.String getPageName(java.lang.String templateName,
                             java.lang.String assetType,
                             java.lang.Long site)
                             throws DataAccessException
Returns the Site Catalog pagename corresponding to a template.

Note that the template is identified by the Template asset name and the applicable asset type. For typeless templates, the assetType parameter should be set to null.

Parameters:
template - The template name (i.e. Template asset name) for which the Site Catalog pagename is to be retrieved.
assetType - The asset type applicable to the template (null for a typeless template)
site - The site id for which the templates are to be retrieved.
Returns:
a String representing the pagename associated with this template for the specified site.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

getArguments

java.util.List<ArgumentBean> getArguments(AssetId assetId)
                                          throws DataAccessException
Returns a list containing the arguments associated with a template for the specified asset type.
Parameters:
AssetId - AssetId of template,cselement,siteentry for which the arguments need to be retrieved.
Returns:
a list containing the arguments associated with this template and the asset type.
Throws:
DataAccessException - wraps any exception underlying the service call.

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.