From 94bb10f56d8f3f99ebfafcf826b8f109349fc7ec Mon Sep 17 00:00:00 2001 From: Raman Arora Date: Fri, 22 May 2020 13:54:17 -0400 Subject: [PATCH] Moved CallLogViewData to its own file. --- .../contentviewers/CallLogArtifactViewer.java | 121 --------------- .../contentviewers/CallLogViewData.java | 146 ++++++++++++++++++ 2 files changed, 146 insertions(+), 121 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/contentviewers/CallLogViewData.java diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/CallLogArtifactViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/CallLogArtifactViewer.java index cf3e39ecac..ce1937a961 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/CallLogArtifactViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/CallLogArtifactViewer.java @@ -378,127 +378,6 @@ public class CallLogArtifactViewer extends javax.swing.JPanel implements Artifac private javax.swing.JLabel toOrFromNumberLabel; // End of variables declaration//GEN-END:variables - /** - * Encapsulates the information to be displayed about the call log artifact. - */ - private final class CallLogViewData { - - // primary to/from number/adddress/accountId - String number; - String numberTypeDesignator; // to for from designator - String name = null; - String direction; - String dateTimeStr = null; - String duration = null; - Collection otherRecipients = new ArrayList<>(); - String dataSourceName = null; - String dataSourceDeviceId = null; - String localAccountId = null; // number/accountId of device owner, may not be always known - Map otherAttributes = new HashMap<>(); - - CallLogViewData(String number) { - this(number, null); - } - - CallLogViewData(String number, String direction) { - this.number = number; - this.direction = direction; - } - - String getNumber() { - return number; - } - - void setNumber(String number) { - this.number = number; - } - - public String getNumberDesignator() { - return numberTypeDesignator; - } - - public void setNumberDesignator(String numberDesignator) { - this.numberTypeDesignator = numberDesignator; - } - - String getName() { - return name; - } - - void setName(String name) { - this.name = name; - } - - String getDirection() { - return direction; - } - - void setDirection(String direction) { - this.direction = direction; - } - - String getDataSourceName() { - return dataSourceName; - } - - void setDataSourceName(String dataSourceName) { - this.dataSourceName = dataSourceName; - } - - String getDataSourceDeviceId() { - return dataSourceDeviceId; - } - - void setDataSourceDeviceId(String dataSourceDeviceId) { - this.dataSourceDeviceId = dataSourceDeviceId; - } - - String getDateTimeStr() { - return dateTimeStr; - } - - void setDateTimeStr(String dateTimeStr) { - this.dateTimeStr = dateTimeStr; - } - - String getDuration() { - return duration; - } - - void setDuration(String duration) { - this.duration = duration; - } - - Collection getOtherRecipients() { - return Collections.unmodifiableCollection(otherRecipients); - } - - void setOtherRecipients(Collection otherParticipants) { - if (otherParticipants != null) { - this.otherRecipients = new ArrayList<>(otherParticipants); - } - } - - public Map getOtherAttributes() { - return Collections.unmodifiableMap(otherAttributes); - } - - public void setOtherAttributes(Map otherAttributes) { - if (otherRecipients != null) { - this.otherAttributes = new HashMap<>(otherAttributes); - } - } - - public String getLocalAccountId() { - return localAccountId; - } - - public void setLocalAccountId(String localAccountId) { - this.localAccountId = localAccountId; - } - - } - @Override public void setArtifact(BlackboardArtifact artifact) { diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/CallLogViewData.java b/Core/src/org/sleuthkit/autopsy/contentviewers/CallLogViewData.java new file mode 100644 index 0000000000..df85070063 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/CallLogViewData.java @@ -0,0 +1,146 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2020 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.contentviewers; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * Encapsulates the information to be displayed about a call log artifact. + */ +final class CallLogViewData { + + // primary to/from number/adddress/accountId + private String number; + private String numberTypeDesignator; // to for from designator + private String name = null; + private String direction; + private String dateTimeStr = null; + private String duration = null; + private Collection otherRecipients = new ArrayList<>(); + private String dataSourceName = null; + private String dataSourceDeviceId = null; + private String localAccountId = null; // number/accountId of device owner, may not be always known + private Map otherAttributes = new HashMap<>(); + + CallLogViewData(String number) { + this(number, null); + } + + CallLogViewData(String number, String direction) { + this.number = number; + this.direction = direction; + } + + String getNumber() { + return number; + } + + void setNumber(String number) { + this.number = number; + } + + public String getNumberDesignator() { + return numberTypeDesignator; + } + + public void setNumberDesignator(String numberDesignator) { + this.numberTypeDesignator = numberDesignator; + } + + String getName() { + return name; + } + + void setName(String name) { + this.name = name; + } + + String getDirection() { + return direction; + } + + void setDirection(String direction) { + this.direction = direction; + } + + String getDataSourceName() { + return dataSourceName; + } + + void setDataSourceName(String dataSourceName) { + this.dataSourceName = dataSourceName; + } + + String getDataSourceDeviceId() { + return dataSourceDeviceId; + } + + void setDataSourceDeviceId(String dataSourceDeviceId) { + this.dataSourceDeviceId = dataSourceDeviceId; + } + + String getDateTimeStr() { + return dateTimeStr; + } + + void setDateTimeStr(String dateTimeStr) { + this.dateTimeStr = dateTimeStr; + } + + String getDuration() { + return duration; + } + + void setDuration(String duration) { + this.duration = duration; + } + + Collection getOtherRecipients() { + return Collections.unmodifiableCollection(otherRecipients); + } + + void setOtherRecipients(Collection otherParticipants) { + if (otherParticipants != null) { + this.otherRecipients = new ArrayList<>(otherParticipants); + } + } + + public Map getOtherAttributes() { + return Collections.unmodifiableMap(otherAttributes); + } + + public void setOtherAttributes(Map otherAttributes) { + if (otherRecipients != null) { + this.otherAttributes = new HashMap<>(otherAttributes); + } + } + + public String getLocalAccountId() { + return localAccountId; + } + + public void setLocalAccountId(String localAccountId) { + this.localAccountId = localAccountId; + } + +}