Clover Coverage Report - Pebble 2.5-SNAPSHOT
Coverage timestamp: Sat Jun 12 2010 09:39:29 EST
0   99   0   -
0   13   -   0
0     -  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  StaticPageDAO       Line # 46 0 - 0 0 - -1.0
 
No Tests
 
1    /*
2    * Copyright (c) 2003-2006, Simon Brown
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions are met:
7    *
8    * - Redistributions of source code must retain the above copyright
9    * notice, this list of conditions and the following disclaimer.
10    *
11    * - Redistributions in binary form must reproduce the above copyright
12    * notice, this list of conditions and the following disclaimer in
13    * the documentation and/or other materials provided with the
14    * distribution.
15    *
16    * - Neither the name of Pebble nor the names of its contributors may
17    * be used to endorse or promote products derived from this software
18    * without specific prior written permission.
19    *
20    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21    * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22    * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23    * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24    * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25    * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26    * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27    * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28    * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29    * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30    * POSSIBILITY OF SUCH DAMAGE.
31    */
32    package net.sourceforge.pebble.dao;
33   
34    import net.sourceforge.pebble.domain.Blog;
35    import net.sourceforge.pebble.domain.BlogEntry;
36    import net.sourceforge.pebble.domain.StaticPage;
37   
38    import java.util.List;
39    import java.util.Collection;
40   
41    /**
42    * Interface for the static page data access object.
43    *
44    * @author Simon Brown
45    */
 
46    public interface StaticPageDAO {
47   
48    /**
49    * Loads the static pages for a given blog.
50    *
51    * @param blog the owning Blog instance
52    * @return a Collection of StaticPage instances
53    * @throws PersistenceException if static pages cannot be loaded
54    */
55    public Collection<StaticPage> loadStaticPages(Blog blog) throws PersistenceException;
56   
57    /**
58    * Loads a specific static page.
59    *
60    * @param blog the owning Blog
61    * @param pageId the page ID
62    * @return a StaticPage instance
63    * @throws PersistenceException if the static page cannot be loaded
64    */
65    public StaticPage loadStaticPage(Blog blog, String pageId) throws PersistenceException;
66   
67    /**
68    * Stores the specified static page.
69    *
70    * @param staticPage the static page to store
71    * @throws PersistenceException if something goes wrong storing the static page
72    */
73    public void storeStaticPage(StaticPage staticPage) throws PersistenceException;
74   
75    /**
76    * Removes the specified static page.
77    *
78    * @param staticPage the static page to remove
79    * @throws PersistenceException if something goes wrong removing the page
80    */
81    public void removeStaticPage(StaticPage staticPage) throws PersistenceException;
82   
83    /**
84    * Locks the specified static page.
85    *
86    * @param staticPage the static page to lock
87    * @return true if the page could be locked, false otherwise
88    */
89    public boolean lock(StaticPage staticPage);
90   
91    /**
92    * Unlocks the specified static page.
93    *
94    * @param staticPage the static page to unlock
95    * @return true if the page could be unlocked, false otherwise
96    */
97    public boolean unlock(StaticPage staticPage);
98   
99    }