com.arunta.app.bom
Class Recording

java.lang.Object
  extended by com.arunta.app.bom.Recording
All Implemented Interfaces:
java.io.Serializable

public class Recording
extends java.lang.Object
implements java.io.Serializable

Bean which contains meta data for recordings of calls created by a Total Recall system.

See Also:
Serialized Form

Constructor Summary
Recording()
          Creates an instance with all fields initialised with invalid values.
Recording(Recording other)
          Creates an instance that is a copy of another.
Recording(short channelNumber)
          Creates an instance which is initialised with the specified recorder channel number and the current date and time.
Recording(short channelNumber, java.util.Date date)
          Creates an instance which is initialised with the specified recorder channel number and date and time.
Recording(java.lang.String fileName, short channelNumber, java.util.Date date)
          Creates an instance which is initialised with the specified recording file name, recorder channel number and call start date and time.
 
Method Summary
 void addToCallLength(int milliseconds)
          Adds the specified number of milliseconds to the current call length.
 void clearLocked()
          Clears the locked (do-not-delete) flag.
 void clearTimedOut()
          Clears the roll-over timeout as the reason for the end of the recording of this call.
 java.lang.String getAgentName()
           
 short getAttributes()
          Use one of isDamaged(), isTimedOut() or isContinued() instead.
 short getAudioEncoding()
           
 int getCallDirection()
           
 long getCallLength()
           
 short getChannelNumber()
           
 int getChecksum()
           
 long getDbKey()
           
 java.lang.String getDisplayCallLength()
           
 java.lang.String getDtmfDigits()
           
 java.lang.String getEncodedFileName()
           
 java.lang.String getEncodedNotes()
           
 java.lang.String getFileName()
           
 java.lang.String getFromExtension()
           
 long getLabels()
          Do not use.
 java.lang.String getMapFromCli()
           
 java.lang.String getMapToCli()
           
 java.lang.String getNotes()
           
 java.lang.String getRawFromCli()
           
 java.lang.String getRawToCli()
           
 java.lang.String getRecorderID()
           
 java.lang.String getStartDate()
           
 java.lang.String getStartDateGMT()
           
 java.util.Date getStartDateTime()
           
 java.lang.String getStartTime()
           
 java.lang.String getStartTimeGMT()
           
 java.lang.String getStringHeader()
           
 java.lang.String getToExtension()
           
 java.lang.String getUniqueFileName()
           
 boolean isArchived()
           
 boolean isContinued()
           
 boolean isCurrentCall()
           
 boolean isDamaged()
           
 boolean isIncoming()
           
 boolean isInternal()
           
 boolean isLocked()
           
 boolean isMonitored()
           
 boolean isOutgoing()
           
 boolean isSameAs(Recording rec)
          Quick comparator.
 boolean isTagged()
           
 boolean isTimedOut()
           
 void setAgentName(java.lang.String agentName)
          Sets the name of the agent that processed the call.
 void setArchived(boolean archived)
          Sets the archived flag.
 void setAttributes(short attributes)
          Use one of setDamaged(), setTimedOut() or setContinued()instead.
 void setAudioEncoding(short audioEncoding)
          Sets the audio encoding format.
 void setCallDirection(int callDirection)
          Sets the call direction.
 void setCallLength(long callLength)
          Sets the length (duration) of the call in milliseconds.
 void setChannelNumber(short channelNumber)
          Sets the recorder channel number used to recored the call.
 void setChecksum(int checksum)
          Sets the checksum of the bytes stored in the recording file.
 void setContinued()
          Mark this recording as continuation of others due to roll-over timeout.
 void setCurrentCall(boolean current)
          Sets the current call flag.
 void setDamaged()
          Mark the recording of the call as damaged.
 void setDbKey(long dbKey)
          Sets the database record id.
 void setDtmfDigits(java.lang.String dtmfDigits)
          Sets the DTMF digits that were detected during the call.
 void setFileName(java.lang.String fileName)
          Sets the file name of the file which contains the recording of the call.
 void setFromExtension(java.lang.String fromExtension)
          Sets the calling extension number.
 void setLabels(long labels)
          Do not use.
 void setLocked()
          Set the locked (do-not-delete) flag.
 void setMapFromCli(java.lang.String mapFromCli)
          Sets the calling number after it has gone through the signalling map on the Total Recall VR system.
 void setMapToCli(java.lang.String mapToCli)
          Sets the called number after it has gone through the signalling map on the Total Recall VR system.
 void setMonitored(boolean monitored)
          Sets the monitored flag.
 void setNotes(java.lang.String notes)
          Sets the notes for the call.
 void setRawFromCli(java.lang.String rawFromCli)
          Sets the calling number as it appears in the signalling messages.
 void setRawToCli(java.lang.String rawToCli)
          Sets the called number as it appears in the signalling messages.
 void setRecorderID(java.lang.String recorderID)
          Sets the ID of the Total Recall VR system which created this recording.
 void setStartDateTime(java.util.Date startDateTime)
          Sets the date and time when the call started.
 void setTagged(boolean tagged)
          Sets the tagged flag.
 void setTimedOut()
          Set the roll-over timeout as the reason for the end of the recording of this call.
 void setToExtension(java.lang.String toExtension)
          Sets the called extension number.
 java.lang.String toSmdrString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Recording

public Recording()
Creates an instance with all fields initialised with invalid values.


Recording

public Recording(java.lang.String fileName,
                 short channelNumber,
                 java.util.Date date)
Creates an instance which is initialised with the specified recording file name, recorder channel number and call start date and time.

In addition, it sets the call direction to unknown.

Parameters:
fileName - Fully qualified file name of the file which will contain the media of a call.
channelNumber - The number of the recorder channel which is used to capture the call.
date - The start date and time of the call.

Recording

public Recording(short channelNumber)
Creates an instance which is initialised with the specified recorder channel number and the current date and time.

In addition, it sets the call direction to unknown.

Parameters:
channelNumber - The number of the recorder channel which is used to capture the call.

Recording

public Recording(short channelNumber,
                 java.util.Date date)
Creates an instance which is initialised with the specified recorder channel number and date and time.

In addition, it sets the call direction to unknown.

Parameters:
channelNumber - The number of the recorder channel which is used to capture the call.
date - The start date and time of the call.

Recording

public Recording(Recording other)
Creates an instance that is a copy of another.

Parameters:
other - The instance to copy.
Method Detail

getStringHeader

public java.lang.String getStringHeader()
Returns:
A string of values, each on a new line, that represent this recording.

setDbKey

public void setDbKey(long dbKey)
Sets the database record id.

Parameters:
dbKey - A database primary key.

getDbKey

public long getDbKey()
Returns:
The database record id.

setFileName

public void setFileName(java.lang.String fileName)
Sets the file name of the file which contains the recording of the call.

Parameters:
fileName - A fully qualified file name.

getFileName

public java.lang.String getFileName()
Returns:
Fully qualified file name of the file which contains the recording of the call.

getEncodedFileName

public java.lang.String getEncodedFileName()
Returns:
Fully qualified encoded file name of the file which contains the recording of the call. See DBCodec.

setChannelNumber

public void setChannelNumber(short channelNumber)
Sets the recorder channel number used to recored the call.

Parameters:
channelNumber - A recorder channel number.

getChannelNumber

public short getChannelNumber()
Returns:
The number of the recorder channel used to record the call.

setCallDirection

public void setCallDirection(int callDirection)
Sets the call direction.

Parameters:
callDirection - 0 for incoming call. 1 for outgoing call. 2 for internal call. 3 for unknown.

getCallDirection

public int getCallDirection()
Returns:
0 for incoming call. 1 for outgoing call. 2 for internal call. 3 for unknown.

isIncoming

public boolean isIncoming()
Returns:
true if this is a recording of an incoming call. false otherwise.

isOutgoing

public boolean isOutgoing()
Returns:
true if this is a recording of an outgoing call. false otherwise.

isInternal

public boolean isInternal()
Returns:
true if this is a recording of an internal call. false otherwise.

setStartDateTime

public void setStartDateTime(java.util.Date startDateTime)
Sets the date and time when the call started.

Parameters:
startDateTime - A date and time in the current time zone of the Total Recall VR system.

getStartDateTime

public java.util.Date getStartDateTime()
Returns:
The date and time when the call started.

getStartDate

public java.lang.String getStartDate()
Returns:
The date when the call started in the yyyy.MM.dd format.

getStartDateGMT

public java.lang.String getStartDateGMT()
Returns:
The GMT date when the call started in the yyyy.MM.dd format.

getStartTime

public java.lang.String getStartTime()
Returns:
The time when the call started in the HH:mm:ss format.

getStartTimeGMT

public java.lang.String getStartTimeGMT()
Returns:
The GMT time when the call started in the HH:mm:ss format.

setRawToCli

public void setRawToCli(java.lang.String rawToCli)
Sets the called number as it appears in the signalling messages.

Parameters:
rawToCli - A phone number.

getRawToCli

public java.lang.String getRawToCli()
Returns:
The called number as it appeared in the signalling messages.

setRawFromCli

public void setRawFromCli(java.lang.String rawFromCli)
Sets the calling number as it appears in the signalling messages.

Parameters:
rawFromCli - A phone number.

getRawFromCli

public java.lang.String getRawFromCli()
Returns:
The calling number as it appeared in the signalling messages.

setMapToCli

public void setMapToCli(java.lang.String mapToCli)
Sets the called number after it has gone through the signalling map on the Total Recall VR system.

Consult the Total Recall VR Administration and Installation documentation on how to configure signalling maps.

Parameters:
mapToCli - A number, agent name, extension owner etc.

getMapToCli

public java.lang.String getMapToCli()
Returns:
The called number after it has gone through the signalling map on the Total Recall VR system.

setMapFromCli

public void setMapFromCli(java.lang.String mapFromCli)
Sets the calling number after it has gone through the signalling map on the Total Recall VR system.

Consult the Total Recall VR Administration and Installation documentation on how to configure signalling maps.

Parameters:
mapFromCli - A number, agent name, extension owner etc.

getMapFromCli

public java.lang.String getMapFromCli()
Returns:
The called number after it has gone through the signalling map on the Total Recall VR system.

setFromExtension

public void setFromExtension(java.lang.String fromExtension)
Sets the calling extension number.

Consult the Total Recall VR Administration and Installation documentation on how to configure the internal dial plan.

Parameters:
fromExtension - A number, agent name, extension owner etc.

getFromExtension

public java.lang.String getFromExtension()
Returns:
The calling extension number.

setToExtension

public void setToExtension(java.lang.String toExtension)
Sets the called extension number.

Consult the Total Recall VR Administration and Installation documentation on how to configure the internal dial plan.

Parameters:
toExtension - A number, agent name, extension owner etc.

getToExtension

public java.lang.String getToExtension()
Returns:
The called extension number.

setNotes

public void setNotes(java.lang.String notes)
Sets the notes for the call.

Parameters:
notes - Any string with any content of up to 256 characters.

getNotes

public java.lang.String getNotes()
Returns:
An empty string if there are no notes, or the actual notes.

getEncodedNotes

public java.lang.String getEncodedNotes()
Returns:
An empty string if there are no notes, or the actual notes in encoded form which makes it suitable for storing in a DB or file headers.

setCallLength

public void setCallLength(long callLength)
Sets the length (duration) of the call in milliseconds.

Parameters:
callLength - Duration in milliseconds.

getCallLength

public long getCallLength()
Returns:
The call length in milliseconds.

addToCallLength

public void addToCallLength(int milliseconds)
Adds the specified number of milliseconds to the current call length.

Parameters:
milliseconds - Number of milliseconds to add to the call length.

getDisplayCallLength

public java.lang.String getDisplayCallLength()
Returns:
String The length of the call in the HH:mm:ss format.

setCurrentCall

public void setCurrentCall(boolean current)
Sets the current call flag.

Parameters:
current - Set it to true if the call is still in progress. Set it to false otherwise.

isCurrentCall

public boolean isCurrentCall()
Returns:
true if this instance represents a call which is in progress. false otherwise.

setTagged

public void setTagged(boolean tagged)
Sets the tagged flag.

Parameters:
tagged - Set it to true if the record is tagged. Set it to false otherwise.

isTagged

public boolean isTagged()
Returns:
true if this instance represents a record which is tagged. false otherwise.

setArchived

public void setArchived(boolean archived)
Sets the archived flag.

Parameters:
archived - Set it to true if the record has been archived. Set it to false otherwise.

isArchived

public boolean isArchived()
Returns:
true if this instance represents an archived record. false otherwise.

setMonitored

public void setMonitored(boolean monitored)
Sets the monitored flag.

Parameters:
monitored - Set it to true if the call is still in progress and is being monitored. Set it to false otherwise.

isMonitored

public boolean isMonitored()
Returns:
true if this instance represents a call which is in progress and is being monitored. false otherwise.

setAttributes

public void setAttributes(short attributes)
Use one of setDamaged(), setTimedOut() or setContinued()instead.

Parameters:
attributes - Combined attributes.

getAttributes

public short getAttributes()
Use one of isDamaged(), isTimedOut() or isContinued() instead.

Returns:
Combined attributes.

setDamaged

public void setDamaged()
Mark the recording of the call as damaged.


isDamaged

public boolean isDamaged()
Returns:
true if the recording of the call is damaged. false otherwise.

setTimedOut

public void setTimedOut()
Set the roll-over timeout as the reason for the end of the recording of this call.


isTimedOut

public boolean isTimedOut()
Returns:
true if the recording of the call ended due to a roll over timeout. false otherwise.

clearTimedOut

public void clearTimedOut()
Clears the roll-over timeout as the reason for the end of the recording of this call.


setContinued

public void setContinued()
Mark this recording as continuation of others due to roll-over timeout.


isContinued

public boolean isContinued()
Returns:
true if the recording of the call is a continuation of other due to a roll over timeout. false otherwise.

setLocked

public void setLocked()
Set the locked (do-not-delete) flag.


isLocked

public boolean isLocked()
Returns:
true if the recording is locked. false otherwise.

clearLocked

public void clearLocked()
Clears the locked (do-not-delete) flag.


setRecorderID

public void setRecorderID(java.lang.String recorderID)
Sets the ID of the Total Recall VR system which created this recording.

Consult the Total Recall VR Administration and Installation documentation on how to configure the ID of a Total Recall VR system.

Parameters:
recorderID - A Total Recall VR system ID.

getRecorderID

public java.lang.String getRecorderID()
Returns:
The ID of the Total recall system that created this recording.

setAudioEncoding

public void setAudioEncoding(short audioEncoding)
Sets the audio encoding format.

Parameters:
audioEncoding - -1 for invalid format. 0 for unknown format. 1 for HQVQ format. 2 for PCM format. 3 for SPEEX format. 4 for G.711 A-law format. 5 for G.711 U-law format. 6 for G.722 format. 7 for G.723 format. 8 for G.729 format.

getAudioEncoding

public short getAudioEncoding()
Returns:
-1 for invalid format. 0 for unknown format. 1 for HQVQ format. 2 for PCM format. 3 for SPEEX format. 4 for G.711 A-law format. 5 for G.711 U-law format. 6 for G.722 format. 7 for G.723 format. 8 for G.729 format.

setChecksum

public void setChecksum(int checksum)
Sets the checksum of the bytes stored in the recording file.

Parameters:
checksum - A valid checksum.

getChecksum

public int getChecksum()
Returns:
A checksum of the bytes stored in the file.

setAgentName

public void setAgentName(java.lang.String agentName)
Sets the name of the agent that processed the call.

Consult the Total Recall VR Administration and Installation documentation on how to configure agent names.

Parameters:
agentName - Valid agent name.

getAgentName

public java.lang.String getAgentName()
Returns:
The name of the agent that processed the call, if any. null otherwise.

setLabels

public void setLabels(long labels)
Do not use. Reserved.

Parameters:
labels -

getLabels

public long getLabels()
Do not use. Reserved.

Returns:
Reserved value.

setDtmfDigits

public void setDtmfDigits(java.lang.String dtmfDigits)
Sets the DTMF digits that were detected during the call.

Parameters:
dtmfDigits - A set of valid DTMF digits: [0-9,A,B,C,D,*,#].

getDtmfDigits

public java.lang.String getDtmfDigits()
Returns:
A set of valid DTMF digits if any were detected during the call. null otherwise.

isSameAs

public boolean isSameAs(Recording rec)
Quick comparator.

Parameters:
rec - A recording to compare with this one.
Returns:
true if the other recording is the same as this one. false otherwise.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toSmdrString

public java.lang.String toSmdrString()

getUniqueFileName

public java.lang.String getUniqueFileName()


Copyright ©, 2005-2012 Prolancer Pty Ltd, Sydney Australia.