1 /* 2 * Copyright (c) 2002-2017, 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.directory.business; 35 36 import fr.paris.lutece.portal.service.rbac.RBACResource; 37 38 import java.util.List; 39 40 /** 41 * 42 * class DirectoryXsl 43 * 44 */ 45 public class DirectoryXsl implements RBACResource 46 { 47 /** 48 * The resource type 49 */ 50 public static final String RESOURCE_TYPE = "DIRECTORY_XSL_FORMAT_TYPE"; 51 private int _nIdDirectoryXsl; 52 private String _strTitle; 53 private String _strDescription; 54 private String _strExtension; 55 private File _file; 56 private Category _category; 57 private List<DirectoryAction> _listActions; 58 59 /** 60 * 61 * @return the id of the directory xsl 62 */ 63 public int getIdDirectoryXsl( ) 64 { 65 return _nIdDirectoryXsl; 66 } 67 68 /** 69 * set the id of the directory xsl 70 * 71 * @param idExport 72 * the id of the directory xsl 73 */ 74 public void setIdDirectoryXsl( int idExport ) 75 { 76 _nIdDirectoryXsl = idExport; 77 } 78 79 /** 80 * 81 * @return the description of the directory xsl 82 */ 83 public String getDescription( ) 84 { 85 return _strDescription; 86 } 87 88 /** 89 * set the description of the directory xsl 90 * 91 * @param description 92 * the description of the directory xsl 93 */ 94 public void setDescription( String description ) 95 { 96 _strDescription = description; 97 } 98 99 /** 100 * 101 * @return the title of the directory xsl 102 */ 103 public String getTitle( ) 104 { 105 return _strTitle; 106 } 107 108 /** 109 * set the title of the directory xsl 110 * 111 * @param title 112 * the title of the directory xsl 113 */ 114 public void setTitle( String title ) 115 { 116 _strTitle = title; 117 } 118 119 /** 120 * 121 * @return the xsl file of the directory xsl 122 */ 123 public File getFile( ) 124 { 125 return _file; 126 } 127 128 /** 129 * set the xsl file of the directory xsl 130 * 131 * @param file 132 * the xsl file of the directory xsl 133 */ 134 public void setFile( File file ) 135 { 136 _file = file; 137 } 138 139 /** 140 * {@inheritDoc} 141 */ 142 @Override 143 public String getResourceTypeCode( ) 144 { 145 return RESOURCE_TYPE; 146 } 147 148 /** 149 * {@inheritDoc} 150 */ 151 @Override 152 public String getResourceId( ) 153 { 154 return "" + _nIdDirectoryXsl; 155 } 156 157 /** 158 * get the extension of the output file generate by the xsl 159 * 160 * @return the extension of the out put file 161 */ 162 public String getExtension( ) 163 { 164 return _strExtension; 165 } 166 167 /** 168 * set the extension of the output file generate by the xsl 169 * 170 * @param extension 171 * the extension of the out put file 172 */ 173 public void setExtension( String extension ) 174 { 175 _strExtension = extension; 176 } 177 178 /** 179 * 180 * @return the category of the xsl 181 */ 182 public Category getCategory( ) 183 { 184 return _category; 185 } 186 187 /** 188 * set the category of the xsl 189 * 190 * @param category 191 * the category of the xsl 192 */ 193 public void setCategory( Category category ) 194 { 195 _category = category; 196 } 197 198 /** 199 * 200 * @return a list of action can be use for the directoryXsl 201 */ 202 public List<DirectoryAction> getActions( ) 203 { 204 return _listActions; 205 } 206 207 /** 208 * set a list of action can be use for the directoryXsl 209 * 210 * @param directoryActions 211 * a list of action must be use for the directoryXsl 212 */ 213 public void setActions( List<DirectoryAction> directoryActions ) 214 { 215 _listActions = directoryActions; 216 } 217 }