diff --git a/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java b/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java index 2e2ddb9ec..89cf2c54c 100644 --- a/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java +++ b/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java @@ -80,7 +80,7 @@ public HistoryService getHistoryService() * @param contact MetaContact which contacts participate in * the returned calls * @param startDate Date the start date of the calls - * @return Collection of CallRecords with CallParticipantRecord + * @return Collection of CallRecords with CallPeerRecord * @throws RuntimeException */ public Collection findByStartDate(MetaContact contact, Date startDate) @@ -93,7 +93,7 @@ public Collection findByStartDate(MetaContact contact, Date startDat * Returns all the calls made after the given date * * @param startDate Date the start date of the calls - * @return Collection of CallRecords with CallParticipantRecord + * @return Collection of CallRecords with CallPeerRecord * @throws RuntimeException */ public Collection findByStartDate(Date startDate) @@ -129,7 +129,7 @@ public Collection findByStartDate(Date startDate) * @param contact MetaContact which contacts participate in * the returned calls * @param endDate Date the end date of the calls - * @return Collection of CallRecords with CallParticipantRecord + * @return Collection of CallRecords with CallPeerRecord * @throws RuntimeException */ public Collection findByEndDate(MetaContact contact, Date endDate) @@ -142,7 +142,7 @@ public Collection findByEndDate(MetaContact contact, Date endDate) * Returns all the calls made before the given date * * @param endDate Date the end date of the calls - * @return Collection of CallRecords with CallParticipantRecord + * @return Collection of CallRecords with CallPeerRecord * @throws RuntimeException */ public Collection findByEndDate(Date endDate) throws RuntimeException @@ -177,7 +177,7 @@ public Collection findByEndDate(Date endDate) throws RuntimeExceptio * @param contact MetaContact * @param startDate Date the start date of the calls * @param endDate Date the end date of the conversations - * @return Collection of CallRecords with CallParticipantRecord + * @return Collection of CallRecords with CallPeerRecord * @throws RuntimeException */ public Collection findByPeriod(MetaContact contact, Date startDate, Date endDate) @@ -191,7 +191,7 @@ public Collection findByPeriod(MetaContact contact, Date startDate, * * @param startDate Date the start date of the calls * @param endDate Date the end date of the conversations - * @return Collection of CallRecords with CallParticipantRecord + * @return Collection of CallRecords with CallPeerRecord * @throws RuntimeException */ public Collection findByPeriod(Date startDate, Date endDate) throws @@ -227,7 +227,7 @@ public Collection findByPeriod(Date startDate, Date endDate) throws * @param contact MetaContact which contacts participate in * the returned calls * @param count calls count - * @return Collection of CallRecords with CallParticipantRecord + * @return Collection of CallRecords with CallPeerRecord * @throws RuntimeException */ public Collection findLast(MetaContact contact, int count) @@ -240,7 +240,7 @@ public Collection findLast(MetaContact contact, int count) * Returns the supplied number of calls made * * @param count calls count - * @return Collection of CallRecords with CallParticipantRecord + * @return Collection of CallRecords with CallPeerRecord * @throws RuntimeException */ public Collection findLast(int count) throws RuntimeException @@ -266,12 +266,12 @@ public Collection findLast(int count) throws RuntimeException } /** - * Find the calls made by the supplied participant address - * @param address String the address of the participant - * @return Collection of CallRecords with CallParticipantRecord + * Find the calls made by the supplied peer address + * @param address String the address of the peer + * @return Collection of CallRecords with CallPeerRecord * @throws RuntimeException */ - public Collection findByParticipant(String address) + public Collection findByPeer(String address) throws RuntimeException { TreeSet result = new TreeSet(new CallRecordComparator()); @@ -333,7 +333,7 @@ private History getHistory(Contact localContact, Contact remoteContact) } /** - * Used to convert HistoryRecord in CallReord and CallParticipantRecord + * Used to convert HistoryRecord in CallReord and CallPeerRecord * which are returned by the finder methods * * @param hr HistoryRecord @@ -343,10 +343,10 @@ private CallRecord convertHistoryRecordToCallRecord(HistoryRecord hr) { CallRecordImpl result = new CallRecordImpl(); - List callParticipantIDs = null; - List callParticipantStart = null; - List callParticipantEnd = null; - List callParticipantStates = null; + List callPeerIDs = null; + List callPeerStart = null; + List callPeerEnd = null; + List callPeerStates = null; // History structure // 0 - callStart @@ -368,28 +368,28 @@ else if(propName.equals(STRUCTURE_NAMES[1])) else if(propName.equals(STRUCTURE_NAMES[2])) result.setDirection(value); else if(propName.equals(STRUCTURE_NAMES[3])) - callParticipantIDs = getCSVs(value); + callPeerIDs = getCSVs(value); else if(propName.equals(STRUCTURE_NAMES[4])) - callParticipantStart = getCSVs(value); + callPeerStart = getCSVs(value); else if(propName.equals(STRUCTURE_NAMES[5])) - callParticipantEnd = getCSVs(value); + callPeerEnd = getCSVs(value); else if(propName.equals(STRUCTURE_NAMES[6])) - callParticipantStates = getStates(value); + callPeerStates = getStates(value); } - final int callParticipantCount = callParticipantIDs == null ? 0 : callParticipantIDs.size(); - for (int i = 0; i < callParticipantCount; i++) + final int callPeerCount = callPeerIDs == null ? 0 : callPeerIDs.size(); + for (int i = 0; i < callPeerCount; i++) { CallPeerRecordImpl cpr = - new CallPeerRecordImpl(callParticipantIDs.get(i), - new Date(Long.parseLong(callParticipantStart.get(i))), - new Date(Long.parseLong(callParticipantEnd.get(i)))); + new CallPeerRecordImpl(callPeerIDs.get(i), + new Date(Long.parseLong(callPeerStart.get(i))), + new Date(Long.parseLong(callPeerEnd.get(i)))); // if there is no record about the states (backward compability) - if (callParticipantStates != null) - cpr.setState(callParticipantStates.get(i)); + if (callPeerStates != null) + cpr.setState(callPeerStates.get(i)); - result.getParticipantRecords().add(cpr); + result.getPeerRecords().add(cpr); } return result; @@ -414,7 +414,7 @@ private List getCSVs(String str) /** * Get the delimited strings and converts them to CallParticipantState - * + * * @param str String delimited string states * @return LinkedList the converted values list */ @@ -567,7 +567,7 @@ private void writeCall(CallRecord callRecord, Contact source, StringBuffer callParticipantStates = new StringBuffer(); for (CallPeerRecord item : callRecord - .getParticipantRecords()) + .getPeerRecords()) { if (callParticipantIDs.length() > 0) { @@ -742,7 +742,7 @@ public void removeSearchProgressListener( /** * Add the registered CallHistorySearchProgressListeners to the given * HistoryReader - * + * * @param reader HistoryReader * @param countContacts number of contacts will search */ @@ -762,7 +762,7 @@ private void addHistorySearchProgressListeners(HistoryReader reader, /** * Removes the registered CallHistorySearchProgressListeners from the given * HistoryReader - * + * * @param reader HistoryReader */ private void removeHistorySearchProgressListeners(HistoryReader reader) @@ -779,7 +779,7 @@ private void removeHistorySearchProgressListeners(HistoryReader reader) /** * Gets all the history readers for the contacts in the given MetaContact - * + * * @param contact MetaContact * @return Hashtable */ @@ -891,7 +891,7 @@ public void peerStateChanged(CallPeerChangeEvent evt) startDate, startDate); - callRecord.getParticipantRecords().add(newRec); + callRecord.getPeerRecords().add(newRec); } /** @@ -906,7 +906,7 @@ private void handleParticipantRemoved(CallPeer callParticipant, String pAddress = callParticipant.getAddress(); CallPeerRecordImpl cpRecord = - (CallPeerRecordImpl)callRecord.findParticipantRecord(pAddress); + (CallPeerRecordImpl)callRecord.findPeerRecord(pAddress); // no such participant if(cpRecord == null) @@ -926,7 +926,7 @@ private void handleParticipantRemoved(CallPeer callParticipant, /** * Finding a CallRecord for the given call - * + * * @param call Call * @return CallRecord */ @@ -954,7 +954,7 @@ private CallPeerRecordImpl findParticipantRecord( if (record == null) return null; - return (CallPeerRecordImpl) record.findParticipantRecord( + return (CallPeerRecordImpl) record.findPeerRecord( callParticipant.getAddress()); } diff --git a/src/net/java/sip/communicator/impl/callhistory/CallRecordImpl.java b/src/net/java/sip/communicator/impl/callhistory/CallRecordImpl.java index efb0c832a..4fb410ad3 100644 --- a/src/net/java/sip/communicator/impl/callhistory/CallRecordImpl.java +++ b/src/net/java/sip/communicator/impl/callhistory/CallRecordImpl.java @@ -60,7 +60,7 @@ public void setEndTime(Date endTime) { this.endTime = endTime; - for (CallPeerRecord item : participantRecords) + for (CallPeerRecord item : peerRecords) { CallPeerRecordImpl itemImpl = (CallPeerRecordImpl) item; diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallComboBox.java b/src/net/java/sip/communicator/impl/gui/main/call/CallComboBox.java index fbf12adf1..2cb4e62b5 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallComboBox.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallComboBox.java @@ -198,7 +198,7 @@ public void run() for (CallRecord call : historyCalls) { List callParticipantRecords - = call.getParticipantRecords(); + = call.getPeerRecords(); //extract all call participants for that call. for (CallPeerRecord cpRecord diff --git a/src/net/java/sip/communicator/impl/gui/main/call/GuiCallRecord.java b/src/net/java/sip/communicator/impl/gui/main/call/GuiCallRecord.java index e6435329a..7e1c7e233 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/GuiCallRecord.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/GuiCallRecord.java @@ -57,7 +57,7 @@ public GuiCallRecord(CallRecord callRecord) this.participants = new Vector(); - Iterator records = callRecord.getParticipantRecords().iterator(); + Iterator records = callRecord.getPeerRecords().iterator(); while(records.hasNext()) { CallPeerRecord record diff --git a/src/net/java/sip/communicator/impl/metahistory/MetaHistoryServiceImpl.java b/src/net/java/sip/communicator/impl/metahistory/MetaHistoryServiceImpl.java index ec4980127..5413a1fb5 100644 --- a/src/net/java/sip/communicator/impl/metahistory/MetaHistoryServiceImpl.java +++ b/src/net/java/sip/communicator/impl/metahistory/MetaHistoryServiceImpl.java @@ -343,7 +343,7 @@ else if(serv instanceof CallHistoryService) CallRecord callRecord = iter.next(); if(matchCallParticipant( - callRecord.getParticipantRecords(), keywords, caseSensitive)) + callRecord.getPeerRecords(), keywords, caseSensitive)) result.add(callRecord); } chs.removeSearchProgressListener(listenWrapper); @@ -480,7 +480,7 @@ else if(serv instanceof CallHistoryService) CallRecord callRecord = iter.next(); if(matchCallParticipant( - callRecord.getParticipantRecords(), keywords, caseSensitive)) + callRecord.getPeerRecords(), keywords, caseSensitive)) result.add(callRecord); } chs.removeSearchProgressListener(listenWrapper); diff --git a/src/net/java/sip/communicator/plugin/callhistoryform/ExtendedCallHistorySearchDialog.java b/src/net/java/sip/communicator/plugin/callhistoryform/ExtendedCallHistorySearchDialog.java index 48c3a20a7..10ddacf4e 100644 --- a/src/net/java/sip/communicator/plugin/callhistoryform/ExtendedCallHistorySearchDialog.java +++ b/src/net/java/sip/communicator/plugin/callhistoryform/ExtendedCallHistorySearchDialog.java @@ -444,7 +444,7 @@ private void loadTableRecords(Collection historyCalls, int calltype, if (addMe) { Iterator participants = - callRecord.getParticipantRecords().iterator(); + callRecord.getPeerRecords().iterator(); while (participants.hasNext() && addMe) { diff --git a/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java b/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java index 8c1566162..510455b89 100644 --- a/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java +++ b/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java @@ -121,7 +121,7 @@ public Collection findLast(int count) * @return Collection of CallRecords with CallParticipantRecord * @throws RuntimeException */ - public Collection findByParticipant(String address) + public Collection findByPeer(String address) throws RuntimeException; /** diff --git a/src/net/java/sip/communicator/service/callhistory/CallRecord.java b/src/net/java/sip/communicator/service/callhistory/CallRecord.java index de1fc860b..3308a44d8 100644 --- a/src/net/java/sip/communicator/service/callhistory/CallRecord.java +++ b/src/net/java/sip/communicator/service/callhistory/CallRecord.java @@ -19,7 +19,7 @@ public class CallRecord protected String direction = null; - protected final List participantRecords = + protected final List peerRecords = new Vector(); protected Date startTime = null; @@ -49,14 +49,14 @@ public CallRecord( } /** - * Finds a Participant with the supplied address - * + * Finds a CallPeer with the supplied address + * * @param address String - * @return CallParticipantRecord + * @return CallPeerRecord */ - public CallPeerRecord findParticipantRecord(String address) + public CallPeerRecord findPeerRecord(String address) { - for (CallPeerRecord item : participantRecords) + for (CallPeerRecord item : peerRecords) { if (item.getPeerAddress().equals(address)) return item; @@ -85,12 +85,12 @@ public Date getEndTime() } /** - * Return Vector of CallParticipantRecords + * Return Vector of CallPeerRecords * @return Vector */ - public List getParticipantRecords() + public List getPeerRecords() { - return participantRecords; + return peerRecords; } /** diff --git a/test/net/java/sip/communicator/slick/callhistory/TestCallHistoryService.java b/test/net/java/sip/communicator/slick/callhistory/TestCallHistoryService.java index 342583f72..5fd4d3dd3 100644 --- a/test/net/java/sip/communicator/slick/callhistory/TestCallHistoryService.java +++ b/test/net/java/sip/communicator/slick/callhistory/TestCallHistoryService.java @@ -213,14 +213,14 @@ public void readRecords() CallRecord rec = (CallRecord)resultIter.next(); CallPeerRecord participant = - (CallPeerRecord)rec.getParticipantRecords().get(0); + (CallPeerRecord)rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). equals(participantAddresses.get(2))); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord)rec.getParticipantRecords().get(0); + participant = (CallPeerRecord)rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). @@ -235,7 +235,7 @@ public void readRecords() assertEquals("Calls must be 1", rs.size(), 1); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord)rec.getParticipantRecords().get(0); + participant = (CallPeerRecord)rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). @@ -250,21 +250,21 @@ public void readRecords() assertEquals("Calls must be 3", rs.size(), 3); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord) rec.getParticipantRecords().get(0); + participant = (CallPeerRecord) rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). equals(participantAddresses.get(3))); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord) rec.getParticipantRecords().get(0); + participant = (CallPeerRecord) rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). equals(participantAddresses.get(2))); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord) rec.getParticipantRecords().get(0); + participant = (CallPeerRecord) rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). @@ -322,12 +322,12 @@ public void checkRecordCompleteness() CallRecord callRecord = (CallRecord)lastCall.iterator().next(); assertEquals("There must be 2 participants in the call", - callRecord.getParticipantRecords().size(), 2); + callRecord.getPeerRecords().size(), 2); CallPeerRecord callP1 = - callRecord.findParticipantRecord(partAddresses[0]); + callRecord.findPeerRecord(partAddresses[0]); CallPeerRecord callP2 = - callRecord.findParticipantRecord(partAddresses[1]); + callRecord.findPeerRecord(partAddresses[1]); assertTrue("Second participant added after first one", callP2.getStartTime().after(callP1.getStartTime())); @@ -343,7 +343,7 @@ private void dumpResult(Collection c) { CallRecord hr = (CallRecord)rs.next(); logger.info("----------------------"); - logger.info(hr.getParticipantRecords()); + logger.info(hr.getPeerRecords()); logger.info("----------------------"); } } diff --git a/test/net/java/sip/communicator/slick/metahistory/TestMetaHistoryService.java b/test/net/java/sip/communicator/slick/metahistory/TestMetaHistoryService.java index 007e61810..de7ffd3c7 100644 --- a/test/net/java/sip/communicator/slick/metahistory/TestMetaHistoryService.java +++ b/test/net/java/sip/communicator/slick/metahistory/TestMetaHistoryService.java @@ -524,14 +524,14 @@ public void callTests() CallRecord rec = (CallRecord)resultIter.next(); CallPeerRecord participant = - (CallPeerRecord)rec.getParticipantRecords().get(0); + (CallPeerRecord)rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). equals(participantAddresses.get(2))); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord)rec.getParticipantRecords().get(0); + participant = (CallPeerRecord)rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). @@ -549,14 +549,14 @@ public void callTests() assertEquals("Calls must be 2", rs.size(), 2); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord)rec.getParticipantRecords().get(0); + participant = (CallPeerRecord)rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). equals(participantAddresses.get(4))); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord)rec.getParticipantRecords().get(0); + participant = (CallPeerRecord)rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). @@ -574,21 +574,21 @@ public void callTests() assertEquals("Calls must be 3", rs.size(), 3); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord) rec.getParticipantRecords().get(0); + participant = (CallPeerRecord) rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). equals(participantAddresses.get(3))); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord) rec.getParticipantRecords().get(0); + participant = (CallPeerRecord) rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress(). equals(participantAddresses.get(4))); rec = (CallRecord)resultIter.next(); - participant = (CallPeerRecord) rec.getParticipantRecords().get(0); + participant = (CallPeerRecord) rec.getPeerRecords().get(0); assertTrue("Participant incorrect ", participant.getPeerAddress().