1 /* 2 * Copyright (c) 2002-2018, 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.appointment.modules.resource.business; 35 36 import java.io.Serializable; 37 38 import javax.validation.constraints.Min; 39 import javax.validation.constraints.NotNull; 40 import javax.validation.constraints.Size; 41 42 /** 43 * Class to describe an association between an appointment form and a resource type 44 */ 45 public class AppointmentFormResourceType implements Serializable 46 { 47 private static final long serialVersionUID = -6423365056677937203L; 48 private int _nId; 49 @Min( value = 1, message = "#i18n{module.appointment.resource.model.entity.appointmentFormResourceType.attribute.idAppointmentForm.min}" ) 50 private int _nIdAppointmentForm; 51 @Size( min = 1, max = 255, message = "#i18n{module.appointment.resource.model.entity.appointmentFormResourceType.attribute.description.size}" ) 52 @NotNull( message = "#i18n{module.appointment.resource.model.entity.appointmentFormResourceType.attribute.description.notNull}" ) 53 private String _strDescription; 54 @Size( min = 1, max = 255, message = "#i18n{module.appointment.resource.model.entity.appointmentFormResourceType.attribute.resourceTypeName.size}" ) 55 private String _strResourceTypeName; 56 private boolean _bIsAppointmentAdminUser; 57 private boolean _bIsLocation; 58 59 /** 60 * Get the id of the appointment form resource type 61 * 62 * @return The id of the appointment form resource type 63 */ 64 public int getId( ) 65 { 66 return _nId; 67 } 68 69 /** 70 * Set the id of the appointment form resource type 71 * 72 * @param nId 73 * The id of the appointment form resource type 74 */ 75 public void setId( int nId ) 76 { 77 this._nId = nId; 78 } 79 80 /** 81 * Get the id of the appointment form 82 * 83 * @return The id of the appointment form 84 */ 85 public int getIdAppointmentForm( ) 86 { 87 return _nIdAppointmentForm; 88 } 89 90 /** 91 * Set the id of the appointment form 92 * 93 * @param nIdAppointmentForm 94 * The id of the appointment form 95 */ 96 public void setIdAppointmentForm( int nIdAppointmentForm ) 97 { 98 this._nIdAppointmentForm = nIdAppointmentForm; 99 } 100 101 /** 102 * Get the description of the the appointment form resource type 103 * 104 * @return The description of the the appointment form resource type 105 */ 106 public String getDescription( ) 107 { 108 return _strDescription; 109 } 110 111 /** 112 * Set the description of the the appointment form resource type 113 * 114 * @param strDescription 115 * The description of the the appointment form resource type 116 */ 117 public void setDescription( String strDescription ) 118 { 119 this._strDescription = strDescription; 120 } 121 122 /** 123 * Get the resource type name 124 * 125 * @return The resource type name 126 */ 127 public String getResourceTypeName( ) 128 { 129 return _strResourceTypeName; 130 } 131 132 /** 133 * Set the resource type name 134 * 135 * @param strResourceTypeName 136 * The resource type name 137 */ 138 public void setResourceTypeName( String strResourceTypeName ) 139 { 140 this._strResourceTypeName = strResourceTypeName; 141 } 142 143 /** 144 * Check if this resource should be bound to the admin user id property of the appointment or not 145 * 146 * @return True if this resource should be bound to the admin user id property of the appointment, false otherwise 147 */ 148 public boolean getIsAppointmentAdminUser( ) 149 { 150 return _bIsAppointmentAdminUser; 151 } 152 153 /** 154 * Set whether this resource should be bound to the admin user id property of the appointment 155 * 156 * @param bIsAppointmentAdminUser 157 * True if this resource should be bound to the admin user id property of the appointment, false otherwise 158 */ 159 public void setIsAppointmentAdminUser( boolean bIsAppointmentAdminUser ) 160 { 161 this._bIsAppointmentAdminUser = bIsAppointmentAdminUser; 162 } 163 164 /** 165 * Check if this resource defines the location of the appointment 166 * 167 * @return True if this resource defines the location of the appointment 168 */ 169 public boolean getIsLocation( ) 170 { 171 return _bIsLocation; 172 } 173 174 /** 175 * Set whether this resource defines the location of the appointment 176 * 177 * @param bIsLocation 178 * True if this resource defines the location of the appointment, false otherwise 179 */ 180 public void setIsLocation( boolean bIsLocation ) 181 { 182 this._bIsLocation = bIsLocation; 183 } 184 }