1 /* 2 * Copyright (c) 2002-2023, City of 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.document.business; 35 36 import fr.paris.lutece.util.ReferenceList; 37 38 import java.util.Collection; 39 40 /** 41 * Interface for DocumentType DAO 42 */ 43 public interface IDocumentTypeDAO 44 { 45 /** 46 * Check if type has document 47 * 48 * @param strCode 49 * The code type 50 * @return bCheck the boolean 51 */ 52 boolean checkDocuments( String strCode ); 53 54 /** 55 * Delete a record from the table 56 * 57 * @param strCode 58 * the code type 59 */ 60 void delete( String strCode ); 61 62 /** 63 * Load the Referencelist of documentTypes 64 * 65 * @return listDocumentTypes 66 */ 67 ReferenceList getDocumentTypeList( ); 68 69 /** 70 * Insert a new record in the table. 71 * 72 * @param documentType 73 * The documentType object 74 */ 75 void insert( DocumentType documentType ); 76 77 /** 78 * Load the data of DocumentType from the table 79 * 80 * @param strDocumentTypeCode 81 * the code 82 * @return the instance of the DocumentType 83 */ 84 DocumentType load( String strDocumentTypeCode ); 85 86 /** 87 * Reorder attributes 88 * 89 * @param nIdAttribute1 90 * the attribute order 91 * @param nOrderAttribute1 92 * the attribute order 93 * @param nIdAttribute2 94 * the attribute order 95 * @param nOrderAttribute2 96 * the attribute order 97 */ 98 void reorderAttributes( int nIdAttribute1, int nOrderAttribute1, int nIdAttribute2, int nOrderAttribute2 ); 99 100 /** 101 * Load the list of documentTypes 102 * 103 * @return The Collection of the DocumentTypes 104 */ 105 Collection<DocumentType> selectDocumentTypeList( ); 106 107 /** 108 * Update the record in the table 109 * 110 * @param documentType 111 * The reference of documentType 112 */ 113 void store( DocumentType documentType ); 114 115 /** 116 * Sets the admin stylesheet 117 * 118 * @param baXslAdmin 119 * The stylesheet 120 * @param strCodeType 121 * The code type 122 */ 123 void setAdminStyleSheet( byte [ ] baXslAdmin, String strCodeType ); 124 125 /** 126 * Sets the content service stylesheet 127 * 128 * @param baXslContent 129 * The stylesheet 130 * @param strCodeType 131 * The code type 132 */ 133 void setContentStyleSheet( byte [ ] baXslContent, String strCodeType ); 134 }