Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
DomainSearchArtifactsRequest.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2020 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.discovery.search;
20 
21 import java.util.Objects;
22 import org.openide.util.NbBundle;
23 import org.sleuthkit.datamodel.SleuthkitCase;
24 import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
25 
30 
31  private final SleuthkitCase sleuthkitCase;
32  private final String domain;
33  private final ARTIFACT_TYPE artifactType;
34 
42  public DomainSearchArtifactsRequest(SleuthkitCase sleuthkitCase,
43  String domain, ARTIFACT_TYPE artifactType) {
44  this.sleuthkitCase = sleuthkitCase;
45  this.domain = domain;
46  this.artifactType = artifactType;
47  }
48 
54  public SleuthkitCase getSleuthkitCase() {
55  return sleuthkitCase;
56  }
57 
63  public String getDomain() {
64  return domain;
65  }
66 
72  public ARTIFACT_TYPE getArtifactType() {
73  return artifactType;
74  }
75 
76  @Override
77  public boolean equals(Object other) {
78  if (other == this) {
79  return true;
80  }
81  if (!(other instanceof DomainSearchArtifactsRequest)) {
82  return false;
83  }
84  DomainSearchArtifactsRequest otherRequest = (DomainSearchArtifactsRequest) other;
85  return this.sleuthkitCase == otherRequest.getSleuthkitCase()
86  && this.domain.equals(otherRequest.getDomain())
87  && this.artifactType == otherRequest.getArtifactType();
88  }
89 
90  @Override
91  public int hashCode() {
92  return 79 * 5 + Objects.hash(this.domain, this.artifactType);
93  }
94 
95  @NbBundle.Messages({
96  "# {0} - domain",
97  "# {1} - artifactType",
98  "DomainSearchArtifactsRequest.toString.text=Domain: {0} ArtifactType: {1}"})
99  @Override
100  public String toString() {
101  return Bundle.DomainSearchArtifactsRequest_toString_text(domain, artifactType.getDisplayName());
102  }
103 }
DomainSearchArtifactsRequest(SleuthkitCase sleuthkitCase, String domain, ARTIFACT_TYPE artifactType)

Copyright © 2012-2022 Basis Technology. Generated on: Tue Oct 4 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.