View Javadoc
1   /*
2    * Copyright (c) 2002-2024, 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.identitystore.service.indexer.elastic.index.model;
35  
36  import com.fasterxml.jackson.annotation.JsonInclude;
37  
38  import java.sql.Timestamp;
39  import java.util.HashMap;
40  import java.util.Map;
41  
42  @JsonInclude( JsonInclude.Include.NON_NULL )
43  public class IdentityObject
44  {
45      private String connectionId;
46      private String customerId;
47      private Timestamp creationDate;
48      private Timestamp lastUpdateDate;
49      private Timestamp expirationDate;
50      private boolean monParisActive;
51      private Map<String, AttributeObject> attributes = new HashMap<>( );
52  
53      public IdentityObject(String connectionId, String customerId, Timestamp creationDate, Timestamp lastUpdateDate, Timestamp expirationDate, boolean monParisActive,
54                            Map<String, AttributeObject> attributes)
55      {
56          this.connectionId = connectionId;
57          this.customerId = customerId;
58          this.creationDate = creationDate;
59          this.lastUpdateDate = lastUpdateDate;
60          this.expirationDate = expirationDate;
61          this.attributes.putAll( attributes );
62          this.monParisActive = monParisActive;
63      }
64  
65      public IdentityObject( )
66      {
67  
68      }
69  
70      public String getConnectionId( )
71      {
72          return connectionId;
73      }
74  
75      public void setConnectionId( String connectionId )
76      {
77          this.connectionId = connectionId;
78      }
79  
80      public String getCustomerId( )
81      {
82          return customerId;
83      }
84  
85      public void setCustomerId( String customerId )
86      {
87          this.customerId = customerId;
88      }
89  
90      public Timestamp getCreationDate( )
91      {
92          return creationDate;
93      }
94  
95      public void setCreationDate( Timestamp creationDate )
96      {
97          this.creationDate = creationDate;
98      }
99  
100     public Timestamp getLastUpdateDate( )
101     {
102         return lastUpdateDate;
103     }
104 
105     public void setLastUpdateDate( Timestamp lastUpdateDate )
106     {
107         this.lastUpdateDate = lastUpdateDate;
108     }
109 
110     public Timestamp getExpirationDate() {
111         return expirationDate;
112     }
113 
114     public void setExpirationDate(Timestamp expirationDate) {
115         this.expirationDate = expirationDate;
116     }
117 
118     public boolean isMonParisActive( )
119     {
120         return monParisActive;
121     }
122 
123     public void setMonParisActive( boolean monParisActive )
124     {
125         this.monParisActive = monParisActive;
126     }
127 
128     public Map<String, AttributeObject> getAttributes( )
129     {
130         return attributes;
131     }
132 
133     public void setAttributes( Map<String, AttributeObject> attributes )
134     {
135         this.attributes = attributes;
136     }
137 }