19 package org.sleuthkit.datamodel;
21 import java.util.ArrayList;
22 import java.util.List;
23 import java.util.Objects;
24 import java.util.Optional;
25 import java.util.ResourceBundle;
26 import org.apache.commons.lang3.StringUtils;
41 private static final ResourceBundle bundle = ResourceBundle.getBundle(
"org.sleuthkit.datamodel.Bundle");
43 private final long id;
47 private final String realmName;
49 private final String realmAddr;
50 private String signature;
51 private final Host host;
53 private final RealmDbStatus dbStatus;
68 this.realmName = realmName;
69 this.realmAddr = realmAddr;
70 this.signature = signature;
72 this.scopeConfidence = scopeConfidence;
73 this.dbStatus = dbStatus;
94 List<String> namesList =
new ArrayList<>();
95 if (!Objects.isNull(realmName)) {
96 namesList.add(realmName);
108 return Optional.ofNullable(realmAddr);
116 String getSignature() {
126 return Optional.ofNullable(host);
135 return scopeConfidence;
143 RealmDbStatus getDbStatus() {
163 UNKNOWN(0, bundle.getString(
"OsAccountRealm.Unknown.text")),
164 LOCAL(1, bundle.getString(
"OsAccountRealm.Local.text")),
165 DOMAIN(2, bundle.getString(
"OsAccountRealm.Domain.text"));
167 private final int id;
168 private final String name;
202 if (scopeType.ordinal() == typeId) {
218 KNOWN(0, bundle.getString(
"OsAccountRealm.Known.text")),
219 INFERRED(1, bundle.getString(
"OsAccountRealm.Inferred.text"));
221 private final int id;
222 private final String name;
256 if (statusType.ordinal() == typeId) {
272 boolean setSignature(String signature) {
273 if (StringUtils.isNotBlank(signature)) {
274 this.signature = signature;
288 DELETED(2,
"Deleted");
290 private final int id;
291 private final String name;
293 RealmDbStatus(
int id, String name) {
306 static RealmDbStatus fromID(
int typeId) {
307 for (RealmDbStatus type : RealmDbStatus.values()) {
308 if (type.ordinal() == typeId) {
ScopeConfidence getScopeConfidence()
RealmScope(int id, String name)
ScopeConfidence(int id, String name)
static RealmScope fromID(int typeId)
Optional< String > getRealmAddr()
static ScopeConfidence fromID(int typeId)
Optional< Host > getScopeHost()
List< String > getRealmNames()