View Javadoc

1   package net.sourceforge.blogentis.utils.impl;
2   
3   //-----------------------------------------------------------------------
4   //Blogentis - a blog publishing platform.
5   //Copyright (C) 2004 Tassos Bassoukos <abassouk@gmail.com>
6   //
7   //This library is free software; you can redistribute it and/or
8   //modify it under the terms of the GNU Lesser General Public
9   //License as published by the Free Software Foundation; either
10  //version 2.1 of the License, or (at your option) any later version.
11  //
12  //This library is distributed in the hope that it will be useful,
13  //but WITHOUT ANY WARRANTY; without even the implied warranty of
14  //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  //Lesser General Public License for more details.
16  //
17  //You should have received a copy of the GNU Lesser General Public
18  //License along with this library; if not, write to the Free Software
19  //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  //-----------------------------------------------------------------------
21  //
22  //$Id: BlogImpl.java,v 1.1 2004/10/28 10:45:51 tassos Exp $
23  //
24  
25  import java.util.List;
26  
27  import org.apache.torque.TorqueException;
28  import org.apache.torque.util.Criteria;
29  
30  import net.sourceforge.blogentis.om.BaseConfigurablePeer;
31  import net.sourceforge.blogentis.om.Blog;
32  import net.sourceforge.blogentis.om.StoredBlog;
33  import net.sourceforge.blogentis.utils.MappedConfiguration;
34  
35  /***
36   * @author abas
37   */
38  public class BlogImpl
39          implements Blog {
40  
41      protected StoredBlog blog = null;
42      protected MappedConfiguration configuration = null;
43  
44      public BlogImpl(StoredBlog sb) {
45          blog = sb;
46      }
47  
48      public int getBlogId() {
49          return blog.getBlogId();
50      }
51  
52      public BaseConfigurablePeer getConfigurablePeer() {
53          return blog.getConfigurablePeer();
54      }
55  
56      public String getDescription() {
57          return blog.getDescription();
58      }
59  
60      public String getName() {
61          return blog.getName();
62      }
63  
64      public List getSections()
65              throws TorqueException {
66          return blog.getSections();
67      }
68  
69      public List getSections(Criteria criteria)
70              throws TorqueException {
71          return blog.getSections(criteria);
72      }
73  
74      public String getTitle() {
75          return blog.getTitle();
76      }
77  
78      public synchronized MappedConfiguration getConfiguration() {
79          if (configuration == null) {
80              configuration = new MappedConfiguration(blog);
81          }
82          return configuration;
83      }
84  }