1 /*
2 * Copyright 2011 FatWire Corporation. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package com.fatwire.gst.foundation.include;
17
18 import com.fatwire.assetapi.data.AssetId;
19 import com.fatwire.gst.foundation.facade.runtag.render.CallTemplate.Style;
20
21 /**
22 * Service to include Templates, SiteEntries and CSElements.
23 *
24 * @author Dolf Dijkstra
25 * @since Apr 13, 2011
26 */
27 public interface IncludeService {
28
29 /**
30 * Creates a IncludeTemplate and registers this under the name for retrieval
31 * in the View layer by that name.
32 *
33 * @param name the name of the Include for reference in the View layer
34 * @param asset the asset to render.
35 * @param tname the template name.
36 * @return the created IncludeTemplate
37 */
38 IncludeTemplate template(String name, AssetId asset, String tname);
39
40 /**
41 * Creates a IncludePage and registers this under the name for retrieval in
42 * the View layer by that name.
43 *
44 * @param name the name of the Include for reference in the View layer.
45 * @param pagename the name of the SiteCatalog entry to call.
46 * @param style
47 * @return the created IncludePage
48 */
49 IncludePage page(String name, String pagename, Style style);
50
51 /**
52 * Creates a IncludeElement and registers this under the name for retrieval
53 * in the View layer by that name.
54 *
55 * @param name the name of the Include for reference in the View layer.
56 * @param elementname the name of the element to call.
57 * @return the created IncludeElement
58 */
59 IncludeElement element(String name, String elementname);
60 }