1/*
2 * Copyright (C) 2010 Google Inc.
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
17package org.clearsilver;
18
19/**
20 * A factory for constructing new CS and HDF objects.  Allows applications to
21 * provide subclasses of HDF or CS to be used by the Java Clearsilver
22 * templating system.
23 */
24public interface ClearsilverFactory {
25
26  /**
27   * Create a new CS object.
28   * @param hdf the HDF object to use in constructing the CS object.
29   * @return a new CS object
30   */
31  public CS newCs(HDF hdf);
32
33  /**
34   * Create a new CS object.
35   * @param hdf the HDF object to use in constructing the CS object.
36   * @param globalHdf the global HDF object to use in constructing the
37   * CS object.
38   * @return a new CS object
39   */
40  public CS newCs(HDF hdf, HDF globalHdf);
41
42  /**
43   * Create a new HDF object.
44   * @return a new HDF object
45   */
46  public HDF newHdf();
47}
48