Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
0c8b8a85
Commit
0c8b8a85
authored
7 years ago
by
Richard Cordovano
Browse files
Options
Downloads
Patches
Plain Diff
Update CommunicationsManager use of deprecated SleuthkitCase methods
parent
d6b0aa5f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/java/src/org/sleuthkit/datamodel/CommunicationsManager.java
+44
-44
44 additions, 44 deletions
...va/src/org/sleuthkit/datamodel/CommunicationsManager.java
with
44 additions
and
44 deletions
bindings/java/src/org/sleuthkit/datamodel/CommunicationsManager.java
+
44
−
44
View file @
0c8b8a85
...
...
@@ -204,7 +204,7 @@ public Account.Type addAccountType(String accountTypeName, String displayName) t
}
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquire
Exclusiv
eLock
();
db
.
acquire
SingleUserCaseWrit
eLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
try
{
...
...
@@ -244,7 +244,7 @@ public Account.Type addAccountType(String accountTypeName, String displayName) t
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
release
Exclusiv
eLock
();
db
.
release
SingleUserCaseWrit
eLock
();
}
}
...
...
@@ -290,7 +290,7 @@ public AccountFileInstance createAccountFileInstance(Account.Type accountType, S
public
Account
getAccount
(
Account
.
Type
accountType
,
String
accountUniqueID
)
throws
TskCoreException
{
Account
account
=
null
;
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquireS
hare
dLock
();
db
.
acquireS
ingleUserCaseRea
dLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
try
{
...
...
@@ -308,7 +308,7 @@ public Account getAccount(Account.Type accountType, String accountUniqueID) thro
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
releaseS
hare
dLock
();
db
.
releaseS
ingleUserCaseRea
dLock
();
}
return
account
;
...
...
@@ -403,7 +403,7 @@ private Account getOrCreateAccount(Account.Type accountType, String accountUniqu
if
(
null
==
account
)
{
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquire
Exclusiv
eLock
();
db
.
acquire
SingleUserCaseWrit
eLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
try
{
...
...
@@ -420,7 +420,7 @@ private Account getOrCreateAccount(Account.Type accountType, String accountUniqu
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
release
Exclusiv
eLock
();
db
.
release
SingleUserCaseWrit
eLock
();
}
}
...
...
@@ -473,7 +473,7 @@ BlackboardArtifact getOrCreateAccountFileInstanceArtifact(BlackboardArtifact.ART
private
BlackboardArtifact
getAccountFileInstanceArtifact
(
BlackboardArtifact
.
ARTIFACT_TYPE
artifactType
,
Account
.
Type
accountType
,
String
accountUniqueID
,
Content
sourceObj
)
throws
TskCoreException
{
BlackboardArtifact
accountArtifact
=
null
;
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquireS
hare
dLock
();
db
.
acquireS
ingleUserCaseRea
dLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
...
...
@@ -511,7 +511,7 @@ private BlackboardArtifact getAccountFileInstanceArtifact(BlackboardArtifact.ART
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
releaseS
hare
dLock
();
db
.
releaseS
ingleUserCaseRea
dLock
();
}
return
accountArtifact
;
...
...
@@ -519,7 +519,7 @@ private BlackboardArtifact getAccountFileInstanceArtifact(BlackboardArtifact.ART
private
void
addAccountFileInstanceMapping
(
long
accountId
,
long
accountInstanceId
)
throws
TskCoreException
{
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquire
Exclusiv
eLock
();
db
.
acquire
SingleUserCaseWrit
eLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
...
...
@@ -536,7 +536,7 @@ private void addAccountFileInstanceMapping(long accountId, long accountInstanceI
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
release
Exclusiv
eLock
();
db
.
release
SingleUserCaseWrit
eLock
();
}
}
...
...
@@ -555,7 +555,7 @@ public Account.Type getAccountType(String accountTypeName) throws TskCoreExcepti
return
this
.
typeNameToAccountTypeMap
.
get
(
accountTypeName
);
}
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquireS
hare
dLock
();
db
.
acquireS
ingleUserCaseRea
dLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
...
...
@@ -575,7 +575,7 @@ public Account.Type getAccountType(String accountTypeName) throws TskCoreExcepti
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
releaseS
hare
dLock
();
db
.
releaseS
ingleUserCaseRea
dLock
();
}
}
...
...
@@ -593,7 +593,7 @@ public Account.Type getAccountType(String accountTypeName) throws TskCoreExcepti
private
Account
getAccount
(
long
account_id
)
throws
TskCoreException
{
Account
account
=
null
;
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquireS
hare
dLock
();
db
.
acquireS
ingleUserCaseRea
dLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
...
...
@@ -618,7 +618,7 @@ private Account getAccount(long account_id) throws TskCoreException {
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
releaseS
hare
dLock
();
db
.
releaseS
ingleUserCaseRea
dLock
();
}
return
account
;
...
...
@@ -641,7 +641,7 @@ private Account getAccount(long account_id) throws TskCoreException {
*/
private
void
addAccountsRelationship
(
long
account1_id
,
long
account2_id
,
long
relationship_source_obj_id
,
long
dateTime
,
int
relationship_type
,
long
data_source_obj_id
)
throws
TskCoreException
{
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquire
Exclusiv
eLock
();
db
.
acquire
SingleUserCaseWrit
eLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
...
...
@@ -658,7 +658,7 @@ private void addAccountsRelationship(long account1_id, long account2_id, long re
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
release
Exclusiv
eLock
();
db
.
release
SingleUserCaseWrit
eLock
();
}
}
...
...
@@ -676,7 +676,7 @@ private void addAccountsRelationship(long account1_id, long account2_id, long re
*/
public
List
<
AccountDeviceInstance
>
getAccountDeviceInstancesWithCommunications
(
CommunicationsFilter
filter
)
throws
TskCoreException
{
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquireS
hare
dLock
();
db
.
acquireS
ingleUserCaseRea
dLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
...
...
@@ -761,7 +761,7 @@ public List<AccountDeviceInstance> getAccountDeviceInstancesWithCommunications(C
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
releaseS
hare
dLock
();
db
.
releaseS
ingleUserCaseRea
dLock
();
}
}
...
...
@@ -788,7 +788,7 @@ public long getCommunicationsCount(AccountDeviceInstance accountDeviceInstance,
String
datasource_obj_ids_list
=
StringUtils
.
buildCSVString
(
ds_ids
);
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquireS
hare
dLock
();
db
.
acquireS
ingleUserCaseRea
dLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
...
...
@@ -836,7 +836,7 @@ public long getCommunicationsCount(AccountDeviceInstance accountDeviceInstance,
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
releaseS
hare
dLock
();
db
.
releaseS
ingleUserCaseRea
dLock
();
}
}
...
...
@@ -889,7 +889,7 @@ public Set<BlackboardArtifact> getCommunications(Set<AccountDeviceInstance> acco
}
CaseDbConnection
connection
=
db
.
getConnection
();
db
.
acquireS
hare
dLock
();
db
.
acquireS
ingleUserCaseRea
dLock
();
Statement
s
=
null
;
ResultSet
rs
=
null
;
...
...
@@ -948,7 +948,7 @@ public Set<BlackboardArtifact> getCommunications(Set<AccountDeviceInstance> acco
closeResultSet
(
rs
);
closeStatement
(
s
);
connection
.
close
();
db
.
releaseS
hare
dLock
();
db
.
releaseS
ingleUserCaseRea
dLock
();
}
}
...
...
@@ -1133,7 +1133,7 @@ public long getSecond() {
// List<Long> getAccountInstanceIds(long account_id) throws TskCoreException {
// ArrayList<Long> accountInstanceIDs = new ArrayList<Long>();
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1150,7 +1150,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
// }
// /**
...
...
@@ -1165,7 +1165,7 @@ public long getSecond() {
// String query = "SELECT DISTINCT value_text FROM blackboard_attributes "
// + "WHERE attribute_type_id = " + BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ACCOUNT_TYPE.getTypeID();
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1185,7 +1185,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
// }
// /**
...
...
@@ -1201,7 +1201,7 @@ public long getSecond() {
// public List<Account> getAccounts(Account.Type accountType) throws TskCoreException {
// ArrayList<Account> accounts = new ArrayList<Account>();
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1221,7 +1221,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
// }
// /**
...
...
@@ -1249,7 +1249,7 @@ public long getSecond() {
// */
// List<Account> getAccountsWithRelationship(long accountID) throws TskCoreException {
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1276,7 +1276,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
// }
// /**
...
...
@@ -1291,7 +1291,7 @@ public long getSecond() {
// */
// public List<MessageFolder> getMessageFolders(long srcObjID) throws TskCoreException {
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1321,7 +1321,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
//
// }
...
...
@@ -1340,7 +1340,7 @@ public long getSecond() {
// */
// public List<MessageFolder> getMessageFolders(long srcObjID, MessageFolder parentfolder) throws TskCoreException {
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1369,7 +1369,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
//
// }
...
...
@@ -1385,7 +1385,7 @@ public long getSecond() {
// */
// public List<BlackboardArtifact> getMessages(MessageFolder parentfolder) throws TskCoreException {
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1420,7 +1420,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
//
// }
...
...
@@ -1449,7 +1449,7 @@ public long getSecond() {
// */
// List<BlackboardArtifact.Type> getRelationshipTypes(long account1_id, long account2_id) throws TskCoreException {
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1480,7 +1480,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
// }
// /**
...
...
@@ -1494,7 +1494,7 @@ public long getSecond() {
// */
// public List<BlackboardArtifact> getRelationships(long account1_id, long account2_id) throws TskCoreException {
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1528,7 +1528,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
// }
// /**
...
...
@@ -1544,7 +1544,7 @@ public long getSecond() {
// */
// public List<BlackboardArtifact> getRelationshipsOfType(long account1_id, long account2_id, BlackboardArtifact.Type artifactType) throws TskCoreException {
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1577,7 +1577,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
// }
// /**
...
...
@@ -1595,7 +1595,7 @@ public long getSecond() {
// List<Long> ds_ids = db.getDataSourceObjIds(deviceId);
// String datasource_obj_ids_list = buildCSVString(ds_ids);
// CaseDbConnection connection = db.getConnection();
// db.acquireS
hare
dLock();
// db.acquireS
ingleUserCaseRea
dLock();
// Statement s = null;
// ResultSet rs = null;
//
...
...
@@ -1622,7 +1622,7 @@ public long getSecond() {
// closeResultSet(rs);
// closeStatement(s);
// connection.close();
// db.releaseS
hare
dLock();
// db.releaseS
ingleUserCaseRea
dLock();
// }
// }
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment