Skip to content

Package: Fingerprint$FingerprintBuilder

Fingerprint$FingerprintBuilder

Coverage

1: /*
2: * *********************************************************************************************************************
3: *
4: * SolidBlue 3: Data safety
5: * http://tidalwave.it/projects/solidblue3
6: *
7: * Copyright (C) 2023 - 2023 by Tidalwave s.a.s. (http://tidalwave.it)
8: *
9: * *********************************************************************************************************************
10: *
11: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
12: * the License. You may obtain a copy of the License at
13: *
14: * http://www.apache.org/licenses/LICENSE-2.0
15: *
16: * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
17: * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
18: * specific language governing permissions and limitations under the License.
19: *
20: * *********************************************************************************************************************
21: *
22: * git clone https://bitbucket.org/tidalwave/solidblue3j-src
23: * git clone https://github.com/tidalwave-it/solidblue3j-src
24: *
25: * *********************************************************************************************************************
26: */
27: package it.tidalwave.datamanager.model;
28:
29:
30: import jakarta.annotation.Nonnull;
31: import java.time.LocalDateTime;
32: import it.tidalwave.util.As;
33: import it.tidalwave.util.Id;
34: import lombok.AllArgsConstructor;
35: import lombok.Builder;
36: import lombok.EqualsAndHashCode;
37: import lombok.Getter;
38: import lombok.ToString;
39: import lombok.experimental.Delegate;
40: import static lombok.AccessLevel.PRIVATE;
41:
42: /***********************************************************************************************************************
43: *
44: * A fingerprint computed for a {@link ManagedFile}.
45: *
46: * @stereotype Model
47: * @author Fabrizio Giudici
48: *
49: **********************************************************************************************************************/
50: @Builder @Getter @EqualsAndHashCode @ToString @AllArgsConstructor(access = PRIVATE)
51: public final class Fingerprint implements As
52: {
53: @Delegate @ToString.Exclude @EqualsAndHashCode.Exclude
54: private final As asDelegate = As.forObject(this);
55:
56: @Nonnull
57: private final Id id;
58:
59: @Nonnull
60: private final String name;
61:
62: @Nonnull
63: private final String algorithm;
64:
65: @Nonnull
66: private final String fingerprint;
67:
68: @Nonnull
69: private final LocalDateTime timestamp;
70: }