View Javadoc
1   /*
2    * Copyright (c) 2002-2021, 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.workflowcore.business.resource;
35  
36  import fr.paris.lutece.plugins.workflowcore.business.action.Action;
37  import fr.paris.lutece.plugins.workflowcore.business.workflow.Workflow;
38  
39  import java.sql.Timestamp;
40  
41  /**
42   *
43   * ResourceHistory
44   *
45   */
46  public class ResourceHistory
47  {
48      private int _nId;
49      private int _nIdResource;
50      private String _strResourceType;
51      private Workflow _workflow;
52      private Action _action;
53      private Timestamp _tCreationDate;
54      private String _strUserAccessCode;
55      private ResourceUserHistory _resourceUserHistory;
56  
57      /**
58       * return the id of the resource history
59       * 
60       * @return the id of the resource history
61       */
62      public int getId( )
63      {
64          return _nId;
65      }
66  
67      /**
68       * set the id of the resource history
69       * 
70       * @param idHistory
71       *            the id of the resource history
72       */
73      public void setId( int idHistory )
74      {
75          _nId = idHistory;
76      }
77  
78      /**
79       *
80       * @return the workflow associated
81       */
82      public Workflow getWorkflow( )
83      {
84          return _workflow;
85      }
86  
87      /**
88       * set the the workflow associated
89       * 
90       * @param workflow
91       *            the workflow associated
92       */
93      public void setWorkFlow( Workflow workflow )
94      {
95          _workflow = workflow;
96      }
97  
98      /**
99       * Returns the action performed on the resource
100      * 
101      * @return The action performed on the resource
102      */
103     public Action getAction( )
104     {
105         return _action;
106     }
107 
108     /**
109      * Set the action performed on the resource
110      * 
111      * @param action
112      *            The action
113      */
114     public void setAction( Action action )
115     {
116         _action = action;
117     }
118 
119     /**
120      * return the id of the resource
121      * 
122      * @return the id of the resource
123      */
124     public int getIdResource( )
125     {
126         return _nIdResource;
127     }
128 
129     /**
130      * set the id of the resource
131      * 
132      * @param idResource
133      *            the id of the resource
134      */
135     public void setIdResource( int idResource )
136     {
137         _nIdResource = idResource;
138     }
139 
140     /**
141      * return the resource type
142      * 
143      * @return resource type
144      */
145     public String getResourceType( )
146     {
147         return _strResourceType;
148     }
149 
150     /**
151      * set the resource type
152      * 
153      * @param resourceType
154      *            the resource type
155      */
156     public void setResourceType( String resourceType )
157     {
158         _strResourceType = resourceType;
159     }
160 
161     /**
162      *
163      * @return the creation date
164      */
165     public Timestamp getCreationDate( )
166     {
167         return _tCreationDate;
168     }
169 
170     /**
171      * set the creation date
172      * 
173      * @param dateCreation
174      *            the creation date
175      */
176     public void setCreationDate( Timestamp dateCreation )
177     {
178         _tCreationDate = dateCreation;
179     }
180 
181     /**
182      * Returns the user access code
183      *
184      * @return The User acces code
185      */
186     public String getUserAccessCode( )
187     {
188         return _strUserAccessCode;
189     }
190 
191     /**
192      * Sets the User acces code
193      *
194      * @param strEventUser
195      *            The User acces code
196      */
197     public void setUserAccessCode( String strEventUser )
198     {
199         _strUserAccessCode = strEventUser;
200     }
201 
202     /**
203      * return the user history object
204      * 
205      * @return resource user history object
206      */
207     public ResourceUserHistory getResourceUserHistory( )
208     {
209         return _resourceUserHistory;
210     }
211 
212     /**
213      * set the resource user history object
214      * 
215      * @param resourceUserHistory
216      *            the resource user history object
217      */
218     public void setResourceUserHistory( ResourceUserHistory resourceUserHistory )
219     {
220         this._resourceUserHistory = resourceUserHistory;
221     }
222 }