mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Merge branch 'develop' into 6428_persona_additional_fields
This commit is contained in:
commit
ba38f92882
@ -153,7 +153,7 @@ public class PersonaAccount {
|
||||
|
||||
CentralRepository.getInstance().executeInsertSQL(insertClause);
|
||||
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CLAUSE
|
||||
+ "WHERE persona_id = " + persona.getId()
|
||||
+ " AND account_type_id = " + account.getAccountType().getAccountTypeId()
|
||||
+ " AND account_unique_identifier = \"" + account.getIdentifier() + "\"";
|
||||
@ -226,7 +226,7 @@ public class PersonaAccount {
|
||||
};
|
||||
|
||||
// Query clause to select from persona_accounts table to create PersonaAccount(s)
|
||||
private static final String PERSONA_ACCOUNTS_QUERY_CALUSE = "SELECT persona_accounts.id as persona_accounts_id, justification, confidence_id, date_added, persona_accounts.examiner_id as pa_examiner_id, pa_examiner.login_name as pa_examiner_login_name, pa_examiner.display_name as pa_examiner_display_name,"
|
||||
private static final String PERSONA_ACCOUNTS_QUERY_CLAUSE = "SELECT persona_accounts.id as persona_accounts_id, justification, confidence_id, date_added, persona_accounts.examiner_id as pa_examiner_id, pa_examiner.login_name as pa_examiner_login_name, pa_examiner.display_name as pa_examiner_display_name,"
|
||||
+ " personas.id as persona_id, personas.uuid, personas.name, personas.comment, personas.created_date, personas.modified_date, personas.status_id, "
|
||||
+ " personas.examiner_id as persona_examiner_id, persona_examiner.login_name as persona_examiner_login_name, persona_examiner.display_name as persona_examiner_display_name, "
|
||||
+ " accounts.id as account_id, account_type_id, account_unique_identifier,"
|
||||
@ -252,7 +252,7 @@ public class PersonaAccount {
|
||||
CentralRepository cr = CentralRepository.getInstance();
|
||||
|
||||
if (cr != null) {
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CLAUSE
|
||||
+ " WHERE persona_accounts.persona_id = " + personaId;
|
||||
|
||||
PersonaAccountsQueryCallback queryCallback = new PersonaAccountsQueryCallback();
|
||||
@ -275,7 +275,7 @@ public class PersonaAccount {
|
||||
* persona_account.
|
||||
*/
|
||||
public static Collection<PersonaAccount> getPersonaAccountsForAccount(long accountId) throws CentralRepoException {
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CLAUSE
|
||||
+ " WHERE persona_accounts.account_id = " + accountId
|
||||
+ " AND personas.status_id != " + Persona.PersonaStatus.DELETED.getStatusId();
|
||||
|
||||
@ -304,7 +304,7 @@ public class PersonaAccount {
|
||||
* persona_account.
|
||||
*/
|
||||
public static Collection<PersonaAccount> getPersonaAccountsForIdentifierLike(String accountIdentifierSubstring) throws CentralRepoException {
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CLAUSE
|
||||
+ " WHERE LOWER(accounts.account_unique_identifier) LIKE LOWER('%" + accountIdentifierSubstring + "%')"
|
||||
+ " AND personas.status_id != " + Persona.PersonaStatus.DELETED.getStatusId();
|
||||
|
||||
@ -330,7 +330,7 @@ public class PersonaAccount {
|
||||
* @throws CentralRepoException
|
||||
*/
|
||||
public static Collection<PersonaAccount> getPersonaAccountsForAccount(Account account) throws CentralRepoException {
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CLAUSE
|
||||
+ " WHERE LOWER(accounts.account_unique_identifier) LIKE LOWER('%" + account.getTypeSpecificID() + "%')"
|
||||
+ " AND type_name = '" + account.getAccountType().getTypeName() + "' "
|
||||
+ " AND personas.status_id != " + Persona.PersonaStatus.DELETED.getStatusId();
|
||||
|
@ -9,8 +9,6 @@ PersonaManagerTopComponent.resultsTable.toolTipText=
|
||||
PersonaManagerTopComponent.searchAccountRadio.text=Account
|
||||
PersonaManagerTopComponent.searchNameRadio.text=Name
|
||||
PersonaManagerTopComponent.searchField.text=
|
||||
AddAccountDialog.cancelBtn.text=Cancel
|
||||
AddAccountDialog.okBtn.text=OK
|
||||
PersonaManagerTopComponent.editBtn.text=Edit Persona
|
||||
PersonaDetailsDialog.cancelBtn.text=Cancel
|
||||
PersonaDetailsDialog.okBtn.text=OK
|
||||
@ -29,28 +27,6 @@ PersonaDetailsPanel.nameLbl.text=Name:
|
||||
AddAliasDialog.accountsLbl.text=Account:
|
||||
AddAliasDialog.okBtn.text=OK
|
||||
AddAliasDialog.cancelBtn.text=Cancel
|
||||
AddMetadataDialog.cancelBtn.text=Cancel
|
||||
AddMetadataDialog.okBtn.text=OK
|
||||
AddMetadataDialog.nameLbl.text=Name:
|
||||
AddMetadataDialog.nameTextField.text=
|
||||
AddMetadataDialog.valueLbl.text=Value:
|
||||
AddMetadataDialog.valueTextField.text=
|
||||
AddMetadataDialog.justificationLbl.text=Justification:
|
||||
AddMetadataDialog.justificationTextField.text=
|
||||
AddMetadataDialog.confidenceLbl.text=Confidence:
|
||||
AddAliasDialog.justificationLbl.text=Justification:
|
||||
AddAliasDialog.okBtn.text_1=OK
|
||||
AddAliasDialog.cancelBtn.text_1=Cancel
|
||||
AddAliasDialog.confidenceLbl.text=Confidence:
|
||||
AddAliasDialog.justificationTextField.text=
|
||||
AddAliasDialog.aliasLbl.text=Alias:
|
||||
AddAliasDialog.aliasTextField.text=
|
||||
AddAccountDialog.justificationTextField.text=
|
||||
AddAccountDialog.justificationLbl.text=Justification:
|
||||
AddAccountDialog.confidenceLbl.text=Confidence:
|
||||
AddAccountDialog.typeLbl.text=Type:
|
||||
AddAccountDialog.identiferLbl.text=Identifier:
|
||||
AddAccountDialog.identifierTextField.text=
|
||||
PersonaManagerTopComponent.deleteBtn.text=Delete Persona
|
||||
PersonaDetailsPanel.casesLbl.text=Cases found in:
|
||||
PersonaDetailsPanel.deleteAliasBtn.text=Delete
|
||||
@ -70,3 +46,27 @@ PersonaDetailsPanel.examinerLbl.text=Created by:
|
||||
PersonaDetailsPanel.examinerField.text=
|
||||
PersonaDetailsPanel.creationDateLbl.text=Created on:
|
||||
PersonaDetailsPanel.creationDateField.text=
|
||||
PersonaAccountDialog.confidenceLbl.text=Confidence:
|
||||
PersonaAccountDialog.justificationTextField.text=
|
||||
PersonaAccountDialog.justificationLbl.text=Justification:
|
||||
PersonaAccountDialog.typeLbl.text=Type:
|
||||
PersonaAccountDialog.identifierTextField.text=
|
||||
PersonaAccountDialog.identiferLbl.text=Identifier:
|
||||
PersonaAccountDialog.okBtn.text=OK
|
||||
PersonaAccountDialog.cancelBtn.text=Cancel
|
||||
PersonaAliasDialog.cancelBtn.text_1=Cancel
|
||||
PersonaAliasDialog.confidenceLbl.text=Confidence:
|
||||
PersonaAliasDialog.justificationTextField.text=
|
||||
PersonaAliasDialog.justificationLbl.text=Justification:
|
||||
PersonaAliasDialog.aliasTextField.text=
|
||||
PersonaAliasDialog.aliasLbl.text=Alias:
|
||||
PersonaAliasDialog.okBtn.text_1=OK
|
||||
PersonaMetadataDialog.confidenceLbl.text=Confidence:
|
||||
PersonaMetadataDialog.justificationTextField.text=
|
||||
PersonaMetadataDialog.justificationLbl.text=Justification:
|
||||
PersonaMetadataDialog.valueTextField.text=
|
||||
PersonaMetadataDialog.valueLbl.text=Value:
|
||||
PersonaMetadataDialog.nameTextField.text=
|
||||
PersonaMetadataDialog.nameLbl.text=Name:
|
||||
PersonaMetadataDialog.okBtn.text=OK
|
||||
PersonaMetadataDialog.cancelBtn.text=Cancel
|
||||
|
@ -19,6 +19,20 @@ CTL_OpenPersonaManager=Persona Manager
|
||||
CTL_PersonaManagerTopComponentAction=Persona Manager
|
||||
CTL_PersonaDetailsTopComponent=Persona Details
|
||||
OpenPersonasAction.displayName=Persona Manager
|
||||
PersonaAccountDialog.title.text=Add Account
|
||||
PersonaAccountDialog_dup_msg=This account is already added to the persona
|
||||
PersonaAccountDialog_dup_Title=Account add failure
|
||||
PersonaAccountDialog_get_types_exception_msg=Failed to access central repository
|
||||
PersonaAccountDialog_get_types_exception_Title=Central Repository failure
|
||||
PersonaAccountDialog_identifier_empty_msg=The identifier field cannot be empty
|
||||
PersonaAccountDialog_identifier_empty_Title=Empty identifier
|
||||
PersonaAccountDialog_search_empty_msg=Account not found for given identifier and type
|
||||
PersonaAccountDialog_search_empty_Title=Account not found
|
||||
PersonaAccountDialog_search_failure_msg=Central Repository account search failed
|
||||
PersonaAccountDialog_search_failure_Title=Account add failure
|
||||
PersonaAliasDialog.title.text=Add Alias
|
||||
PersonaAliasDialog_dup_msg=This alias has already been added to this persona
|
||||
PersonaAliasDialog_dup_Title=Alias add failure
|
||||
PersonaDetailsDialogCreateTitle=Create Persona
|
||||
PersonaDetailsDialogEditTitle=Edit Persona
|
||||
PersonaDetailsDialogViewTitle=View Persona
|
||||
@ -26,6 +40,8 @@ PersonaDetailsPanel_CentralRepoErr_msg=Failure to write to Central Repository
|
||||
PersonaDetailsPanel_CentralRepoErr_Title=Central Repository failure
|
||||
PersonaDetailsPanel_EmptyComment_msg=Persona comment cannot be empty
|
||||
PersonaDetailsPanel_EmptyComment_Title=Empty persona comment
|
||||
PersonaDetailsPanel_empty_justification_msg=The justification field cannot be empty
|
||||
PersonaDetailsPanel_empty_justification_Title=Empty justification
|
||||
PersonaDetailsPanel_EmptyName_msg=Persona name cannot be empty
|
||||
PersonaDetailsPanel_EmptyName_Title=Empty persona name
|
||||
PersonaDetailsPanel_load_exception_msg=Failed to load persona
|
||||
@ -40,8 +56,6 @@ PersonaManagerTopComponent.resultsTable.toolTipText=
|
||||
PersonaManagerTopComponent.searchAccountRadio.text=Account
|
||||
PersonaManagerTopComponent.searchNameRadio.text=Name
|
||||
PersonaManagerTopComponent.searchField.text=
|
||||
AddAccountDialog.cancelBtn.text=Cancel
|
||||
AddAccountDialog.okBtn.text=OK
|
||||
PersonaManagerTopComponent.editBtn.text=Edit Persona
|
||||
PersonaDetailsDialog.cancelBtn.text=Cancel
|
||||
PersonaDetailsDialog.okBtn.text=OK
|
||||
@ -60,28 +74,6 @@ PersonaDetailsPanel.nameLbl.text=Name:
|
||||
AddAliasDialog.accountsLbl.text=Account:
|
||||
AddAliasDialog.okBtn.text=OK
|
||||
AddAliasDialog.cancelBtn.text=Cancel
|
||||
AddMetadataDialog.cancelBtn.text=Cancel
|
||||
AddMetadataDialog.okBtn.text=OK
|
||||
AddMetadataDialog.nameLbl.text=Name:
|
||||
AddMetadataDialog.nameTextField.text=
|
||||
AddMetadataDialog.valueLbl.text=Value:
|
||||
AddMetadataDialog.valueTextField.text=
|
||||
AddMetadataDialog.justificationLbl.text=Justification:
|
||||
AddMetadataDialog.justificationTextField.text=
|
||||
AddMetadataDialog.confidenceLbl.text=Confidence:
|
||||
AddAliasDialog.justificationLbl.text=Justification:
|
||||
AddAliasDialog.okBtn.text_1=OK
|
||||
AddAliasDialog.cancelBtn.text_1=Cancel
|
||||
AddAliasDialog.confidenceLbl.text=Confidence:
|
||||
AddAliasDialog.justificationTextField.text=
|
||||
AddAliasDialog.aliasLbl.text=Alias:
|
||||
AddAliasDialog.aliasTextField.text=
|
||||
AddAccountDialog.justificationTextField.text=
|
||||
AddAccountDialog.justificationLbl.text=Justification:
|
||||
AddAccountDialog.confidenceLbl.text=Confidence:
|
||||
AddAccountDialog.typeLbl.text=Type:
|
||||
AddAccountDialog.identiferLbl.text=Identifier:
|
||||
AddAccountDialog.identifierTextField.text=
|
||||
PersonaManagerTopComponent.deleteBtn.text=Delete Persona
|
||||
PersonaDetailsPanel.casesLbl.text=Cases found in:
|
||||
PersonaDetailsPanel.deleteAliasBtn.text=Delete
|
||||
@ -104,6 +96,31 @@ PersonaDetailsPanel.creationDateField.text=
|
||||
PMTopComponent_delete_confirmation_msg=Are you sure you want to delete this persona?
|
||||
PMTopComponent_delete_confirmation_Title=Are you sure?
|
||||
PMTopComponent_delete_exception_msg=Failed to delete persona.
|
||||
PersonaAccountDialog.confidenceLbl.text=Confidence:
|
||||
PersonaAccountDialog.justificationTextField.text=
|
||||
PersonaAccountDialog.justificationLbl.text=Justification:
|
||||
PersonaAccountDialog.typeLbl.text=Type:
|
||||
PersonaAccountDialog.identifierTextField.text=
|
||||
PersonaAccountDialog.identiferLbl.text=Identifier:
|
||||
PersonaAccountDialog.okBtn.text=OK
|
||||
PersonaAccountDialog.cancelBtn.text=Cancel
|
||||
PersonaAliasDialog.cancelBtn.text_1=Cancel
|
||||
PersonaAliasDialog.confidenceLbl.text=Confidence:
|
||||
PersonaAliasDialog.justificationTextField.text=
|
||||
PersonaAliasDialog.justificationLbl.text=Justification:
|
||||
PersonaAliasDialog.aliasTextField.text=
|
||||
PersonaAliasDialog.aliasLbl.text=Alias:
|
||||
PersonaAliasDialog.okBtn.text_1=OK
|
||||
PersonaMetadataDialog.confidenceLbl.text=Confidence:
|
||||
PersonaMetadataDialog.justificationTextField.text=
|
||||
PersonaMetadataDialog.justificationLbl.text=Justification:
|
||||
PersonaMetadataDialog.valueTextField.text=
|
||||
PersonaMetadataDialog.valueLbl.text=Value:
|
||||
PersonaMetadataDialog.nameTextField.text=
|
||||
PersonaMetadataDialog.nameLbl.text=Name:
|
||||
PersonaMetadataDialog.okBtn.text=OK
|
||||
PersonaMetadataDialog.cancelBtn.text=Cancel
|
||||
PMTopComponent_delete_exception_msg=Failed to delete persona
|
||||
PMTopComponent_delete_exception_Title=Delete failure
|
||||
PMTopComponent_Name=Persona Manager
|
||||
PMTopComponent_search_exception_msg=Failed to search personas.
|
||||
|
@ -1,10 +1,10 @@
|
||||
AddAccountDialog.cancelBtn.text=\u53d6\u308a\u6d88\u3057
|
||||
AddAccountDialog.okBtn.text=OK
|
||||
PersonaDetailsDialog.okBtn.text=OK
|
||||
PersonaDetailsDialog.cancelBtn.text=\u53d6\u308a\u6d88\u3057
|
||||
AddAliasDialog.cancelBtn.text=\u53d6\u308a\u6d88\u3057
|
||||
AddAliasDialog.okBtn.text=OK
|
||||
AddMetadataDialog.okBtn.text=OK
|
||||
AddMetadataDialog.cancelBtn.text=\u53d6\u308a\u6d88\u3057
|
||||
AddAliasDialog.cancelBtn.text_1=\u53d6\u308a\u6d88\u3057
|
||||
AddAliasDialog.okBtn.text_1=OK
|
||||
PersonaAccountDialog.okBtn.text=OK
|
||||
PersonaAccountDialog.cancelBtn.text=\u53d6\u308a\u6d88\u3057
|
||||
PersonaAliasDialog.cancelBtn.text_1=\u53d6\u308a\u6d88\u3057
|
||||
PersonaAliasDialog.okBtn.text_1=OK
|
||||
PersonaMetadataDialog.okBtn.text=OK
|
||||
PersonaMetadataDialog.cancelBtn.text=\u53d6\u308a\u6d88\u3057
|
||||
|
@ -25,24 +25,21 @@
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="settingsPanel" alignment="0" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace pref="202" max="32767" attributes="0"/>
|
||||
<Component id="okBtn" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cancelBtn" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="194" max="32767" attributes="0"/>
|
||||
<Component id="okBtn" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cancelBtn" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="settingsPanel" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="settingsPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="okBtn" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cancelBtn" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
@ -81,12 +78,12 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="confidenceLbl" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="confidenceComboBox" pref="269" max="32767" attributes="0"/>
|
||||
<Component id="confidenceComboBox" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="justificationLbl" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="justificationTextField" pref="264" max="32767" attributes="0"/>
|
||||
<Component id="justificationTextField" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@ -101,21 +98,21 @@
|
||||
<Component id="identiferLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="identifierTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="typeComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="typeLbl" alignment="3" min="-2" pref="9" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="justificationLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="justificationTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="confidenceLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="confidenceComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="justificationLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="justificationTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@ -125,14 +122,14 @@
|
||||
<Component class="javax.swing.JLabel" name="identiferLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAccountDialog.identiferLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAccountDialog.identiferLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="identifierTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAccountDialog.identifierTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAccountDialog.identifierTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
@ -142,7 +139,7 @@
|
||||
<Component class="javax.swing.JLabel" name="typeLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAccountDialog.typeLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAccountDialog.typeLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -156,24 +153,10 @@
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoAccount.CentralRepoAccountType>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="justificationLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAccountDialog.justificationLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="justificationTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAccountDialog.justificationTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="confidenceLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAccountDialog.confidenceLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAccountDialog.confidenceLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -187,12 +170,26 @@
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<org.sleuthkit.autopsy.centralrepository.datamodel.Persona.Confidence>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="justificationLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAccountDialog.justificationLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="justificationTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAccountDialog.justificationTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="cancelBtn">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAccountDialog.cancelBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAccountDialog.cancelBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[79, 23]"/>
|
||||
@ -211,7 +208,7 @@
|
||||
<Component class="javax.swing.JButton" name="okBtn">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAccountDialog.okBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAccountDialog.okBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
@ -41,9 +41,9 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
* Configuration dialog for adding an account to a persona.
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
public class AddAccountDialog extends JDialog {
|
||||
public class PersonaAccountDialog extends JDialog {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(AddAccountDialog.class.getName());
|
||||
private static final Logger logger = Logger.getLogger(PersonaAccountDialog.class.getName());
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -53,10 +53,10 @@ public class AddAccountDialog extends JDialog {
|
||||
/**
|
||||
* Creates new add account dialog
|
||||
*/
|
||||
@Messages({"AddAccountDialog.title.text=Add Account",})
|
||||
public AddAccountDialog(PersonaDetailsPanel pdp) {
|
||||
@Messages({"PersonaAccountDialog.title.text=Add Account",})
|
||||
public PersonaAccountDialog(PersonaDetailsPanel pdp) {
|
||||
super((JFrame) WindowManager.getDefault().getMainWindow(),
|
||||
Bundle.AddAccountDialog_title_text(),
|
||||
Bundle.PersonaAccountDialog_title_text(),
|
||||
true);
|
||||
this.pdp = pdp;
|
||||
|
||||
@ -82,8 +82,8 @@ public class AddAccountDialog extends JDialog {
|
||||
}
|
||||
|
||||
@Messages({
|
||||
"AddAccountDialog_get_types_exception_Title=Central Repository failure",
|
||||
"AddAccountDialog_get_types_exception_msg=Failed to access central repository.",
|
||||
"PersonaAccountDialog_get_types_exception_Title=Central Repository failure",
|
||||
"PersonaAccountDialog_get_types_exception_msg=Failed to access central repository.",
|
||||
})
|
||||
private CentralRepoAccountType[] getAllAccountTypes() {
|
||||
Collection<CentralRepoAccountType> allAccountTypes;
|
||||
@ -92,8 +92,8 @@ public class AddAccountDialog extends JDialog {
|
||||
} catch (CentralRepoException e) {
|
||||
logger.log(Level.SEVERE, "Failed to access central repository", e);
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.AddAccountDialog_get_types_exception_Title(),
|
||||
Bundle.AddAccountDialog_get_types_exception_msg(),
|
||||
Bundle.PersonaAccountDialog_get_types_exception_Title(),
|
||||
Bundle.PersonaAccountDialog_get_types_exception_msg(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return new CentralRepoAccountType[0];
|
||||
}
|
||||
@ -114,10 +114,10 @@ public class AddAccountDialog extends JDialog {
|
||||
identifierTextField = new javax.swing.JTextField();
|
||||
typeLbl = new javax.swing.JLabel();
|
||||
typeComboBox = new javax.swing.JComboBox<>();
|
||||
justificationLbl = new javax.swing.JLabel();
|
||||
justificationTextField = new javax.swing.JTextField();
|
||||
confidenceLbl = new javax.swing.JLabel();
|
||||
confidenceComboBox = new javax.swing.JComboBox<>();
|
||||
justificationLbl = new javax.swing.JLabel();
|
||||
justificationTextField = new javax.swing.JTextField();
|
||||
cancelBtn = new javax.swing.JButton();
|
||||
okBtn = new javax.swing.JButton();
|
||||
|
||||
@ -126,27 +126,27 @@ public class AddAccountDialog extends JDialog {
|
||||
|
||||
settingsPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(identiferLbl, org.openide.util.NbBundle.getMessage(AddAccountDialog.class, "AddAccountDialog.identiferLbl.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(identiferLbl, org.openide.util.NbBundle.getMessage(PersonaAccountDialog.class, "PersonaAccountDialog.identiferLbl.text")); // NOI18N
|
||||
|
||||
identifierTextField.setText(org.openide.util.NbBundle.getMessage(AddAccountDialog.class, "AddAccountDialog.identifierTextField.text")); // NOI18N
|
||||
identifierTextField.setText(org.openide.util.NbBundle.getMessage(PersonaAccountDialog.class, "PersonaAccountDialog.identifierTextField.text")); // NOI18N
|
||||
identifierTextField.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
identifierTextFieldActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(typeLbl, org.openide.util.NbBundle.getMessage(AddAccountDialog.class, "AddAccountDialog.typeLbl.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(typeLbl, org.openide.util.NbBundle.getMessage(PersonaAccountDialog.class, "PersonaAccountDialog.typeLbl.text")); // NOI18N
|
||||
|
||||
typeComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(getAllAccountTypes()));
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(justificationLbl, org.openide.util.NbBundle.getMessage(AddAccountDialog.class, "AddAccountDialog.justificationLbl.text")); // NOI18N
|
||||
|
||||
justificationTextField.setText(org.openide.util.NbBundle.getMessage(AddAccountDialog.class, "AddAccountDialog.justificationTextField.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(confidenceLbl, org.openide.util.NbBundle.getMessage(AddAccountDialog.class, "AddAccountDialog.confidenceLbl.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(confidenceLbl, org.openide.util.NbBundle.getMessage(PersonaAccountDialog.class, "PersonaAccountDialog.confidenceLbl.text")); // NOI18N
|
||||
|
||||
confidenceComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(org.sleuthkit.autopsy.centralrepository.datamodel.Persona.Confidence.values()));
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(justificationLbl, org.openide.util.NbBundle.getMessage(PersonaAccountDialog.class, "PersonaAccountDialog.justificationLbl.text")); // NOI18N
|
||||
|
||||
justificationTextField.setText(org.openide.util.NbBundle.getMessage(PersonaAccountDialog.class, "PersonaAccountDialog.justificationTextField.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout settingsPanelLayout = new javax.swing.GroupLayout(settingsPanel);
|
||||
settingsPanel.setLayout(settingsPanelLayout);
|
||||
settingsPanelLayout.setHorizontalGroup(
|
||||
@ -165,11 +165,11 @@ public class AddAccountDialog extends JDialog {
|
||||
.addGroup(settingsPanelLayout.createSequentialGroup()
|
||||
.addComponent(confidenceLbl)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(confidenceComboBox, 0, 269, Short.MAX_VALUE))
|
||||
.addComponent(confidenceComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(settingsPanelLayout.createSequentialGroup()
|
||||
.addComponent(justificationLbl)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(justificationTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE)))
|
||||
.addComponent(justificationTextField)))
|
||||
.addContainerGap())
|
||||
);
|
||||
settingsPanelLayout.setVerticalGroup(
|
||||
@ -179,22 +179,22 @@ public class AddAccountDialog extends JDialog {
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(identiferLbl)
|
||||
.addComponent(identifierTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(typeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(typeLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(justificationLbl)
|
||||
.addComponent(justificationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(confidenceLbl)
|
||||
.addComponent(confidenceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(justificationLbl)
|
||||
.addComponent(justificationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cancelBtn, org.openide.util.NbBundle.getMessage(AddAccountDialog.class, "AddAccountDialog.cancelBtn.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cancelBtn, org.openide.util.NbBundle.getMessage(PersonaAccountDialog.class, "PersonaAccountDialog.cancelBtn.text")); // NOI18N
|
||||
cancelBtn.setMaximumSize(new java.awt.Dimension(79, 23));
|
||||
cancelBtn.setMinimumSize(new java.awt.Dimension(79, 23));
|
||||
cancelBtn.setPreferredSize(new java.awt.Dimension(79, 23));
|
||||
@ -204,7 +204,7 @@ public class AddAccountDialog extends JDialog {
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(okBtn, org.openide.util.NbBundle.getMessage(AddAccountDialog.class, "AddAccountDialog.okBtn.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(okBtn, org.openide.util.NbBundle.getMessage(PersonaAccountDialog.class, "PersonaAccountDialog.okBtn.text")); // NOI18N
|
||||
okBtn.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
okBtnActionPerformed(evt);
|
||||
@ -216,14 +216,12 @@ public class AddAccountDialog extends JDialog {
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(settingsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap(202, Short.MAX_VALUE)
|
||||
.addComponent(okBtn)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cancelBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(194, Short.MAX_VALUE)
|
||||
.addComponent(okBtn)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cancelBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
.addComponent(settingsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cancelBtn, okBtn});
|
||||
@ -231,8 +229,9 @@ public class AddAccountDialog extends JDialog {
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(settingsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(okBtn, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(cancelBtn, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
@ -248,19 +247,26 @@ public class AddAccountDialog extends JDialog {
|
||||
}
|
||||
|
||||
@Messages({
|
||||
"AddAccountDialog_dup_Title=Account add failure",
|
||||
"AddAccountDialog_dup_msg=This account is already added to the persona.",
|
||||
"AddAccountDialog_empty_Title=Empty identifier",
|
||||
"AddAccountDialog_empty_msg=The identifier field cannot be empty.",
|
||||
"AddAccountDialog_search_failure_Title=Account add failure",
|
||||
"AddAccountDialog_search_failure_msg=Central Repository account search failed.",
|
||||
"AddAccountDialog_search_empty_Title=Account not found",
|
||||
"AddAccountDialog_search_empty_msg=Account not found in the Central Repository for the given identifier and type.",})
|
||||
"PersonaAccountDialog_dup_Title=Account add failure",
|
||||
"PersonaAccountDialog_dup_msg=This account is already added to the persona.",
|
||||
"PersonaAccountDialog_identifier_empty_Title=Empty identifier",
|
||||
"PersonaAccountDialog_identifier_empty_msg=The identifier field cannot be empty.",
|
||||
"PersonaAccountDialog_search_failure_Title=Account add failure",
|
||||
"PersonaAccountDialog_search_failure_msg=Central Repository account search failed.",
|
||||
"PersonaAccountDialog_search_empty_Title=Account not found",
|
||||
"PersonaAccountDialog_search_empty_msg=Account not found for given identifier and type.",})
|
||||
private void okBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBtnActionPerformed
|
||||
if (identifierTextField.getText().isEmpty()) {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.AddAccountDialog_empty_msg(),
|
||||
Bundle.AddAccountDialog_empty_Title(),
|
||||
Bundle.PersonaAccountDialog_identifier_empty_msg(),
|
||||
Bundle.PersonaAccountDialog_identifier_empty_Title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (justificationTextField.getText().isEmpty()) {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.PersonaDetailsPanel_empty_justification_msg(),
|
||||
Bundle.PersonaDetailsPanel_empty_justification_Title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
@ -270,15 +276,15 @@ public class AddAccountDialog extends JDialog {
|
||||
} catch (CentralRepoException e) {
|
||||
logger.log(Level.SEVERE, "Failed to access central repository", e);
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.AddAccountDialog_search_failure_msg(),
|
||||
Bundle.AddAccountDialog_search_failure_Title(),
|
||||
Bundle.PersonaAccountDialog_search_failure_msg(),
|
||||
Bundle.PersonaAccountDialog_search_failure_Title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (candidates.isEmpty()) {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.AddAccountDialog_search_empty_msg(),
|
||||
Bundle.AddAccountDialog_search_empty_Title(),
|
||||
Bundle.PersonaAccountDialog_search_empty_msg(),
|
||||
Bundle.PersonaAccountDialog_search_empty_Title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
@ -292,8 +298,8 @@ public class AddAccountDialog extends JDialog {
|
||||
}
|
||||
if (result == null) {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.AddAccountDialog_search_empty_msg(),
|
||||
Bundle.AddAccountDialog_search_empty_Title(),
|
||||
Bundle.PersonaAccountDialog_search_empty_msg(),
|
||||
Bundle.PersonaAccountDialog_search_empty_Title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
@ -305,8 +311,8 @@ public class AddAccountDialog extends JDialog {
|
||||
dispose();
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.AddAccountDialog_dup_msg(),
|
||||
Bundle.AddAccountDialog_dup_Title(),
|
||||
Bundle.PersonaAccountDialog_dup_msg(),
|
||||
Bundle.PersonaAccountDialog_dup_Title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
}//GEN-LAST:event_okBtnActionPerformed
|
@ -38,7 +38,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="settingsPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="okBtn" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cancelBtn" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@ -92,17 +92,17 @@
|
||||
<Component id="aliasLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="aliasTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="justificationTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="justificationLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="confidenceComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="confidenceLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="justificationTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="justificationLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -111,35 +111,21 @@
|
||||
<Component class="javax.swing.JLabel" name="aliasLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAliasDialog.aliasLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAliasDialog.aliasLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="aliasTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAliasDialog.aliasTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="justificationLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAliasDialog.justificationLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="justificationTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAliasDialog.justificationTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAliasDialog.aliasTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="confidenceLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAliasDialog.confidenceLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAliasDialog.confidenceLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -153,12 +139,26 @@
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<org.sleuthkit.autopsy.centralrepository.datamodel.Persona.Confidence>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="justificationLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAliasDialog.justificationLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="justificationTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAliasDialog.justificationTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="cancelBtn">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAliasDialog.cancelBtn.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAliasDialog.cancelBtn.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[79, 23]"/>
|
||||
@ -177,7 +177,7 @@
|
||||
<Component class="javax.swing.JButton" name="okBtn">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddAliasDialog.okBtn.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaAliasDialog.okBtn.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
@ -29,7 +29,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.Persona;
|
||||
* Configuration dialog for adding aliases to a persona.
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
public class AddAliasDialog extends JDialog {
|
||||
public class PersonaAliasDialog extends JDialog {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -38,10 +38,10 @@ public class AddAliasDialog extends JDialog {
|
||||
/**
|
||||
* Creates new add alias dialog
|
||||
*/
|
||||
@Messages({"AddAliasDialog.title.text=Add Alias",})
|
||||
public AddAliasDialog(PersonaDetailsPanel pdp) {
|
||||
@Messages({"PersonaAliasDialog.title.text=Add Alias",})
|
||||
public PersonaAliasDialog(PersonaDetailsPanel pdp) {
|
||||
super((JFrame) WindowManager.getDefault().getMainWindow(),
|
||||
Bundle.AddAliasDialog_title_text(),
|
||||
Bundle.PersonaAliasDialog_title_text(),
|
||||
true);
|
||||
this.pdp = pdp;
|
||||
|
||||
@ -61,10 +61,10 @@ public class AddAliasDialog extends JDialog {
|
||||
settingsPanel = new javax.swing.JPanel();
|
||||
aliasLbl = new javax.swing.JLabel();
|
||||
aliasTextField = new javax.swing.JTextField();
|
||||
justificationLbl = new javax.swing.JLabel();
|
||||
justificationTextField = new javax.swing.JTextField();
|
||||
confidenceLbl = new javax.swing.JLabel();
|
||||
confidenceComboBox = new javax.swing.JComboBox<>();
|
||||
justificationLbl = new javax.swing.JLabel();
|
||||
justificationTextField = new javax.swing.JTextField();
|
||||
cancelBtn = new javax.swing.JButton();
|
||||
okBtn = new javax.swing.JButton();
|
||||
|
||||
@ -73,18 +73,18 @@ public class AddAliasDialog extends JDialog {
|
||||
|
||||
settingsPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(aliasLbl, org.openide.util.NbBundle.getMessage(AddAliasDialog.class, "AddAliasDialog.aliasLbl.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(aliasLbl, org.openide.util.NbBundle.getMessage(PersonaAliasDialog.class, "PersonaAliasDialog.aliasLbl.text")); // NOI18N
|
||||
|
||||
aliasTextField.setText(org.openide.util.NbBundle.getMessage(AddAliasDialog.class, "AddAliasDialog.aliasTextField.text")); // NOI18N
|
||||
aliasTextField.setText(org.openide.util.NbBundle.getMessage(PersonaAliasDialog.class, "PersonaAliasDialog.aliasTextField.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(justificationLbl, org.openide.util.NbBundle.getMessage(AddAliasDialog.class, "AddAliasDialog.justificationLbl.text")); // NOI18N
|
||||
|
||||
justificationTextField.setText(org.openide.util.NbBundle.getMessage(AddAliasDialog.class, "AddAliasDialog.justificationTextField.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(confidenceLbl, org.openide.util.NbBundle.getMessage(AddAliasDialog.class, "AddAliasDialog.confidenceLbl.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(confidenceLbl, org.openide.util.NbBundle.getMessage(PersonaAliasDialog.class, "PersonaAliasDialog.confidenceLbl.text")); // NOI18N
|
||||
|
||||
confidenceComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(org.sleuthkit.autopsy.centralrepository.datamodel.Persona.Confidence.values()));
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(justificationLbl, org.openide.util.NbBundle.getMessage(PersonaAliasDialog.class, "PersonaAliasDialog.justificationLbl.text")); // NOI18N
|
||||
|
||||
justificationTextField.setText(org.openide.util.NbBundle.getMessage(PersonaAliasDialog.class, "PersonaAliasDialog.justificationTextField.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout settingsPanelLayout = new javax.swing.GroupLayout(settingsPanel);
|
||||
settingsPanel.setLayout(settingsPanelLayout);
|
||||
settingsPanelLayout.setHorizontalGroup(
|
||||
@ -114,17 +114,17 @@ public class AddAliasDialog extends JDialog {
|
||||
.addComponent(aliasLbl)
|
||||
.addComponent(aliasTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(justificationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(justificationLbl))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(confidenceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(confidenceLbl))
|
||||
.addContainerGap())
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(justificationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(justificationLbl))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cancelBtn, org.openide.util.NbBundle.getMessage(AddAliasDialog.class, "AddAliasDialog.cancelBtn.text_1")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cancelBtn, org.openide.util.NbBundle.getMessage(PersonaAliasDialog.class, "PersonaAliasDialog.cancelBtn.text_1")); // NOI18N
|
||||
cancelBtn.setMaximumSize(new java.awt.Dimension(79, 23));
|
||||
cancelBtn.setMinimumSize(new java.awt.Dimension(79, 23));
|
||||
cancelBtn.setPreferredSize(new java.awt.Dimension(79, 23));
|
||||
@ -134,7 +134,7 @@ public class AddAliasDialog extends JDialog {
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(okBtn, org.openide.util.NbBundle.getMessage(AddAliasDialog.class, "AddAliasDialog.okBtn.text_1")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(okBtn, org.openide.util.NbBundle.getMessage(PersonaAliasDialog.class, "PersonaAliasDialog.okBtn.text_1")); // NOI18N
|
||||
okBtn.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
okBtnActionPerformed(evt);
|
||||
@ -176,9 +176,16 @@ public class AddAliasDialog extends JDialog {
|
||||
}
|
||||
|
||||
@Messages({
|
||||
"AddAliasDialog_dup_Title=Alias add failure",
|
||||
"AddAliasDialog_dup_msg=This alias has already been added to this persona",})
|
||||
"PersonaAliasDialog_dup_Title=Alias add failure",
|
||||
"PersonaAliasDialog_dup_msg=This alias has already been added to this persona",})
|
||||
private void okBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBtnActionPerformed
|
||||
if (justificationTextField.getText().isEmpty()) {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.PersonaDetailsPanel_empty_justification_msg(),
|
||||
Bundle.PersonaDetailsPanel_empty_justification_Title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (pdp.addAlias(
|
||||
aliasTextField.getText(),
|
||||
justificationTextField.getText(),
|
||||
@ -186,8 +193,8 @@ public class AddAliasDialog extends JDialog {
|
||||
dispose();
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.AddAliasDialog_dup_msg(),
|
||||
Bundle.AddAliasDialog_dup_Title(),
|
||||
Bundle.PersonaAliasDialog_dup_msg(),
|
||||
Bundle.PersonaAliasDialog_dup_Title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
}//GEN-LAST:event_okBtnActionPerformed
|
@ -80,13 +80,16 @@ public final class PersonaDetailsPanel extends javax.swing.JPanel {
|
||||
private PersonaDetailsTableModel aliasesModel;
|
||||
private PersonaDetailsTableModel casesModel;
|
||||
|
||||
@Messages({
|
||||
"PersonaDetailsPanel_empty_justification_Title=Empty justification",
|
||||
"PersonaDetailsPanel_empty_justification_msg=The justification field cannot be empty",})
|
||||
public PersonaDetailsPanel() {
|
||||
initComponents();
|
||||
clear();
|
||||
|
||||
// Accounts
|
||||
addAccountBtn.addActionListener((ActionEvent e) -> {
|
||||
new AddAccountDialog(this);
|
||||
new PersonaAccountDialog(this);
|
||||
});
|
||||
deleteAccountBtn.addActionListener((ActionEvent e) -> {
|
||||
int selectedRow = accountsTable.getSelectedRow();
|
||||
@ -108,7 +111,7 @@ public final class PersonaDetailsPanel extends javax.swing.JPanel {
|
||||
|
||||
// Metadata
|
||||
addMetadataBtn.addActionListener((ActionEvent e) -> {
|
||||
new AddMetadataDialog(this);
|
||||
new PersonaMetadataDialog(this);
|
||||
});
|
||||
deleteMetadataBtn.addActionListener((ActionEvent e) -> {
|
||||
int selectedRow = metadataTable.getSelectedRow();
|
||||
@ -130,7 +133,7 @@ public final class PersonaDetailsPanel extends javax.swing.JPanel {
|
||||
|
||||
// Aliases
|
||||
addAliasBtn.addActionListener((ActionEvent e) -> {
|
||||
new AddAliasDialog(this);
|
||||
new PersonaAliasDialog(this);
|
||||
});
|
||||
deleteAliasBtn.addActionListener((ActionEvent e) -> {
|
||||
int selectedRow = aliasesTable.getSelectedRow();
|
||||
|
@ -103,16 +103,16 @@
|
||||
<Component id="valueTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="justificationTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="justificationLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="confidenceComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="confidenceLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="justificationTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="justificationLbl" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -121,49 +121,35 @@
|
||||
<Component class="javax.swing.JLabel" name="nameLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddMetadataDialog.nameLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaMetadataDialog.nameLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="nameTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddMetadataDialog.nameTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaMetadataDialog.nameTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="valueLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddMetadataDialog.valueLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaMetadataDialog.valueLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="valueTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddMetadataDialog.valueTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="justificationLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddMetadataDialog.justificationLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="justificationTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddMetadataDialog.justificationTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaMetadataDialog.valueTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="confidenceLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddMetadataDialog.confidenceLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaMetadataDialog.confidenceLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -177,12 +163,26 @@
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<org.sleuthkit.autopsy.centralrepository.datamodel.Persona.Confidence>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="justificationLbl">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaMetadataDialog.justificationLbl.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="justificationTextField">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaMetadataDialog.justificationTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="cancelBtn">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddMetadataDialog.cancelBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaMetadataDialog.cancelBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[79, 23]"/>
|
||||
@ -201,7 +201,7 @@
|
||||
<Component class="javax.swing.JButton" name="okBtn">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="AddMetadataDialog.okBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/persona/Bundle.properties" key="PersonaMetadataDialog.okBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
@ -29,7 +29,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.Persona;
|
||||
* Configuration dialog for adding metadata to a persona.
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
public class AddMetadataDialog extends JDialog {
|
||||
public class PersonaMetadataDialog extends JDialog {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -39,7 +39,7 @@ public class AddMetadataDialog extends JDialog {
|
||||
* Creates new add metadata dialog
|
||||
*/
|
||||
@Messages({"AddMetadataDialog.title.text=Add Metadata",})
|
||||
public AddMetadataDialog(PersonaDetailsPanel pdp) {
|
||||
public PersonaMetadataDialog(PersonaDetailsPanel pdp) {
|
||||
super((JFrame) WindowManager.getDefault().getMainWindow(),
|
||||
Bundle.AddMetadataDialog_title_text(),
|
||||
true);
|
||||
@ -63,10 +63,10 @@ public class AddMetadataDialog extends JDialog {
|
||||
nameTextField = new javax.swing.JTextField();
|
||||
valueLbl = new javax.swing.JLabel();
|
||||
valueTextField = new javax.swing.JTextField();
|
||||
justificationLbl = new javax.swing.JLabel();
|
||||
justificationTextField = new javax.swing.JTextField();
|
||||
confidenceLbl = new javax.swing.JLabel();
|
||||
confidenceComboBox = new javax.swing.JComboBox<>();
|
||||
justificationLbl = new javax.swing.JLabel();
|
||||
justificationTextField = new javax.swing.JTextField();
|
||||
cancelBtn = new javax.swing.JButton();
|
||||
okBtn = new javax.swing.JButton();
|
||||
|
||||
@ -75,22 +75,22 @@ public class AddMetadataDialog extends JDialog {
|
||||
|
||||
settingsPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(nameLbl, org.openide.util.NbBundle.getMessage(AddMetadataDialog.class, "AddMetadataDialog.nameLbl.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(nameLbl, org.openide.util.NbBundle.getMessage(PersonaMetadataDialog.class, "PersonaMetadataDialog.nameLbl.text")); // NOI18N
|
||||
|
||||
nameTextField.setText(org.openide.util.NbBundle.getMessage(AddMetadataDialog.class, "AddMetadataDialog.nameTextField.text")); // NOI18N
|
||||
nameTextField.setText(org.openide.util.NbBundle.getMessage(PersonaMetadataDialog.class, "PersonaMetadataDialog.nameTextField.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(valueLbl, org.openide.util.NbBundle.getMessage(AddMetadataDialog.class, "AddMetadataDialog.valueLbl.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(valueLbl, org.openide.util.NbBundle.getMessage(PersonaMetadataDialog.class, "PersonaMetadataDialog.valueLbl.text")); // NOI18N
|
||||
|
||||
valueTextField.setText(org.openide.util.NbBundle.getMessage(AddMetadataDialog.class, "AddMetadataDialog.valueTextField.text")); // NOI18N
|
||||
valueTextField.setText(org.openide.util.NbBundle.getMessage(PersonaMetadataDialog.class, "PersonaMetadataDialog.valueTextField.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(justificationLbl, org.openide.util.NbBundle.getMessage(AddMetadataDialog.class, "AddMetadataDialog.justificationLbl.text")); // NOI18N
|
||||
|
||||
justificationTextField.setText(org.openide.util.NbBundle.getMessage(AddMetadataDialog.class, "AddMetadataDialog.justificationTextField.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(confidenceLbl, org.openide.util.NbBundle.getMessage(AddMetadataDialog.class, "AddMetadataDialog.confidenceLbl.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(confidenceLbl, org.openide.util.NbBundle.getMessage(PersonaMetadataDialog.class, "PersonaMetadataDialog.confidenceLbl.text")); // NOI18N
|
||||
|
||||
confidenceComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(org.sleuthkit.autopsy.centralrepository.datamodel.Persona.Confidence.values()));
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(justificationLbl, org.openide.util.NbBundle.getMessage(PersonaMetadataDialog.class, "PersonaMetadataDialog.justificationLbl.text")); // NOI18N
|
||||
|
||||
justificationTextField.setText(org.openide.util.NbBundle.getMessage(PersonaMetadataDialog.class, "PersonaMetadataDialog.justificationTextField.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout settingsPanelLayout = new javax.swing.GroupLayout(settingsPanel);
|
||||
settingsPanel.setLayout(settingsPanelLayout);
|
||||
settingsPanelLayout.setHorizontalGroup(
|
||||
@ -128,17 +128,17 @@ public class AddMetadataDialog extends JDialog {
|
||||
.addComponent(valueLbl)
|
||||
.addComponent(valueTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(justificationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(justificationLbl))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(confidenceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(confidenceLbl))
|
||||
.addContainerGap())
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(settingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(justificationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(justificationLbl))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cancelBtn, org.openide.util.NbBundle.getMessage(AddMetadataDialog.class, "AddMetadataDialog.cancelBtn.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cancelBtn, org.openide.util.NbBundle.getMessage(PersonaMetadataDialog.class, "PersonaMetadataDialog.cancelBtn.text")); // NOI18N
|
||||
cancelBtn.setMaximumSize(new java.awt.Dimension(79, 23));
|
||||
cancelBtn.setMinimumSize(new java.awt.Dimension(79, 23));
|
||||
cancelBtn.setPreferredSize(new java.awt.Dimension(79, 23));
|
||||
@ -148,7 +148,7 @@ public class AddMetadataDialog extends JDialog {
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(okBtn, org.openide.util.NbBundle.getMessage(AddMetadataDialog.class, "AddMetadataDialog.okBtn.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(okBtn, org.openide.util.NbBundle.getMessage(PersonaMetadataDialog.class, "PersonaMetadataDialog.okBtn.text")); // NOI18N
|
||||
okBtn.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
okBtnActionPerformed(evt);
|
||||
@ -193,6 +193,13 @@ public class AddMetadataDialog extends JDialog {
|
||||
"AddMetadataDialog_dup_Title=Metadata add failure",
|
||||
"AddMetadataDialog_dup_msg=A metadata entry with this name has already been added to this persona",})
|
||||
private void okBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBtnActionPerformed
|
||||
if (justificationTextField.getText().isEmpty()) {
|
||||
JOptionPane.showMessageDialog(this,
|
||||
Bundle.PersonaDetailsPanel_empty_justification_msg(),
|
||||
Bundle.PersonaDetailsPanel_empty_justification_Title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (pdp.addMetadata(
|
||||
nameTextField.getText(),
|
||||
valueTextField.getText(),
|
Loading…
x
Reference in New Issue
Block a user