View Javadoc
1   /*
2    * Copyright (c) 2002-2014, Mairie de Paris
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
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software 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 HOLDERS 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   * License 1.0
33   */
34  package fr.paris.lutece.plugins.calendar.business.stylesheet;
35  
36  import fr.paris.lutece.portal.business.stylesheet.StyleSheet;
37  import fr.paris.lutece.portal.service.plugin.Plugin;
38  
39  import java.util.Collection;
40  
41  
42  /**
43   * 
44   * @author LEVY
45   */
46  public interface ICalendarStyleSheetDAO
47  {
48      /**
49       * Delete the StyleSheet from the database whose identifier is specified
50       * in parameter
51       * @param nIdStylesheet the identifier of the StyleSheet to delete
52       * @param plugin Plugin
53       */
54      void delete( int nIdStylesheet, Plugin plugin );
55  
56      /**
57       * Insert a new record in the table.
58       * @param stylesheet The StyleSheet object
59       * @param strExtension the export file extension
60       * @param plugin Plugin
61       */
62      void insert( StyleSheet stylesheet, String strExtension, Plugin plugin );
63  
64      /**
65       * Load the data of Stylesheet from the table
66       * @param nIdStylesheet the identifier of the Stylesheet to load
67       * @param plugin Plugin
68       * @return stylesheet
69       */
70      StyleSheet load( int nIdStylesheet, Plugin plugin );
71  
72      /**
73       * Load the list of stylesheet
74       * @param plugin Plugin
75       * @return the list of the StyleSheet in form of a collection of StyleSheet
76       *         objects
77       */
78      Collection<StyleSheet> selectStyleSheetList( Plugin plugin );
79  
80      /**
81       * Update the record in the table
82       * @param stylesheet The stylesheet to store
83       * @param plugin Plugin
84       */
85      void store( StyleSheet stylesheet, Plugin plugin );
86  
87      /**
88       * Insertion of the extension of an export file in the database
89       * @param nId The id
90       * @param strExtension the extension file
91       * @param plugin Plugin
92       */
93      void insertExtension( int nId, String strExtension, Plugin plugin );
94  
95      /**
96       * Select the extension file related to the export stylesheet
97       * @param nId the identifier of the stylesheet
98       * @param plugin Plugin
99       * @return the extension file
100      */
101     String selectExtension( int nId, Plugin plugin );
102 
103     /**
104      * Update the the extension file whose identifier is specified in parameter
105      * @param nId the stylesheet id
106      * @param strExtension the new extension file
107      * @param plugin Plugin
108      */
109     void updateExtension( int nId, String strExtension, Plugin plugin );
110 }