1 2 /* 3 * Copyright (c) 2002-2021, City of Paris 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 10 * 1. Redistributions of source code must retain the above copyright notice 11 * and the following disclaimer. 12 * 13 * 2. Redistributions in binary form must reproduce the above copyright notice 14 * and the following disclaimer in the documentation and/or other materials 15 * provided with the distribution. 16 * 17 * 3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its 18 * contributors may be used to endorse or promote products derived from 19 * this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 * POSSIBILITY OF SUCH DAMAGE. 32 * 33 * License 1.0 34 */ 35 package fr.paris.lutece.plugins.elasticdata.modules.workflow.business; 36 37 import java.util.List; 38 39 import fr.paris.lutece.plugins.elasticdata.business.AbstractDataObject; 40 41 public class WorkflowDataObject extends AbstractDataObject 42 { 43 44 private String _strId; 45 private int _nIdResource; 46 private int _nIdWorkflow; 47 private String _strWorkflowName; 48 private String _strLastWorkflowState; 49 private List<WorkflowResourceHistory> _listWorkflows; 50 private String _strConnectionId; 51 private Long _lDateLastUpdate; 52 53 54 /** 55 * Returns the id id 56 * 57 * @return The id id 58 */ 59 public String getId( ) 60 { 61 return _strId; 62 } 63 64 /** 65 * Sets the id id 66 * 67 * @param strId 68 * The id id 69 */ 70 public void setId( String strId ) 71 { 72 _strId = strId; 73 } 74 75 /** 76 * Sets the resource id 77 * 78 * @param strId 79 * The resource id 80 */ 81 public void setIdResource( int nIdResource ) 82 { 83 _nIdResource = nIdResource; 84 } 85 86 /** 87 * Returns the resource id 88 * 89 * @return The resource id 90 */ 91 public int getIdResource( ) 92 { 93 return _nIdResource; 94 } 95 96 97 public int getIdWorkflow( ) 98 { 99 return _nIdWorkflow; 100 } 101 102 public void setIdWorkflow( int nIdWorkflow ) 103 { 104 _nIdWorkflow = nIdWorkflow; 105 } 106 107 // set listResource; 108 public void setWorkflows( List<WorkflowResourceHistory> listWorkflows ) 109 { 110 _listWorkflows = listWorkflows; 111 } 112 113 // get listResource; 114 115 public List<WorkflowResourceHistory> getWorkflows( ) 116 { 117 return _listWorkflows; 118 } 119 120 /** 121 * Returns the last Workflow state 122 * 123 * @return The Last Workflow state 124 */ 125 public String getLastWorkflowState( ) 126 { 127 return _strLastWorkflowState; 128 } 129 130 /** 131 * Sets the Last Workflow state 132 * 133 * @param strLastWorkflowState 134 * The Workflow state 135 */ 136 public void setLastWorkflowState( String strLastWorkflowState ) 137 { 138 _strLastWorkflowState = strLastWorkflowState; 139 } 140 141 /** 142 * Returns the connection id 143 * 144 * @return The connection id 145 */ 146 public String getConnectionId( ) 147 { 148 return _strConnectionId; 149 } 150 151 /** 152 * Sets the connection id 153 * 154 * @param strConnectionId 155 * The connection id 156 */ 157 158 public void setConnectionId( String strConnectionId ) 159 { 160 _strConnectionId = strConnectionId; 161 } 162 163 164 /** 165 * Returns the workflow name 166 * 167 * @return The workflow name 168 */ 169 public String getWorkflowName( ) 170 { 171 return _strWorkflowName; 172 } 173 174 /** 175 * Sets the workflow name 176 * 177 * @param strWorkflowName 178 * The workflow name 179 */ 180 public void setWorkflowName( String strWorkflowName ) 181 { 182 _strWorkflowName = strWorkflowName; 183 } 184 185 /** 186 * Returns the date last update 187 * 188 * @return The date last update 189 */ 190 public Long getDateLastUpdate( ) 191 { 192 return _lDateLastUpdate; 193 } 194 195 /** 196 * Sets the date last update 197 * 198 * @param lDateLastUpdate 199 * The date last update 200 */ 201 public void setDateLastUpdate( Long lDateLastUpdate ) 202 { 203 _lDateLastUpdate = lDateLastUpdate; 204 } 205 }