]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.cms/src/org/argeo/cms/auth/CmsSessionId.java
Use Argeo TP Core v2.1.25 and Argeo TP Extras v2.1.13.
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / auth / CmsSessionId.java
1 package org.argeo.cms.auth;
2
3 import java.util.UUID;
4
5 import org.argeo.cms.CmsException;
6
7 public class CmsSessionId {
8 private final UUID uuid;
9
10 public CmsSessionId(UUID value) {
11 if (value == null)
12 throw new CmsException("value cannot be null");
13 this.uuid = value;
14 }
15
16 public UUID getUuid() {
17 return uuid;
18 }
19
20 @Override
21 public int hashCode() {
22 return uuid.hashCode();
23 }
24
25 @Override
26 public boolean equals(Object obj) {
27 return obj instanceof CmsSessionId && ((CmsSessionId) obj).getUuid().equals(uuid);
28 }
29
30 @Override
31 public String toString() {
32 return "Node Session " + uuid;
33 }
34
35 }