org.jmythapi.protocol.events
Interface IUpdateProgInfo

All Superinterfaces:
Cloneable, IMythEvent<IUpdateProgInfo.Props>, IPropertyAware<IUpdateProgInfo.Props>, IRecordingEvent<IUpdateProgInfo.Props>, IRecordingUpdateEvent<IUpdateProgInfo.Props>, ISendable, IVersionable
All Known Implementing Classes:
UpdateProgInfo

Deprecated. 55, replaced by IRecordingListChangeUpdate.

public interface IUpdateProgInfo
extends IRecordingUpdateEvent<IUpdateProgInfo.Props>

Backend Event - ProgramInfo Updated.

Since:
52
See Also:
#BACKEND_MESSAGE_UPDATE_PROG_INFO

Nested Class Summary
static class IUpdateProgInfo.Props
          Deprecated.  
 
Method Summary
 Integer getChannelID()
          Deprecated. Gets the channel ID of the recording.
 IProgramInfo getProgramInfo()
          Deprecated. Gets the info object of the changed recording.
 Date getRecordingStartTime()
          Deprecated. Gets the recording start time.
 String getUniqueRecordingID()
          Deprecated. Gets the unique ID of the changed recording.
 EnumMap<IProgramInfo.Props,Object[]> getUpdatedProperties(IProgramInfo oldProgramInfo)
          Deprecated. Compares a previous version of the recording with the changed version.
 
Methods inherited from interface org.jmythapi.protocol.events.IMythEvent
getEventName
 
Methods inherited from interface org.jmythapi.IPropertyAware
getProperties, getProperty, getPropertyClass, getPropertyCount, getPropertyIndex, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject
 
Methods inherited from interface org.jmythapi.IVersionable
getVersionNr
 
Methods inherited from interface org.jmythapi.protocol.ISendable
getPacket
 

Method Detail

getChannelID

Integer getChannelID()
Deprecated. 
Gets the channel ID of the recording.

Specified by:
getChannelID in interface IRecordingEvent<IUpdateProgInfo.Props>
Specified by:
getChannelID in interface IRecordingUpdateEvent<IUpdateProgInfo.Props>
Returns:
the channel ID.

getRecordingStartTime

Date getRecordingStartTime()
Deprecated. 
Gets the recording start time.

Specified by:
getRecordingStartTime in interface IRecordingEvent<IUpdateProgInfo.Props>
Specified by:
getRecordingStartTime in interface IRecordingUpdateEvent<IUpdateProgInfo.Props>
Returns:
the recording start time.

getUniqueRecordingID

String getUniqueRecordingID()
Deprecated. 
Gets the unique ID of the changed recording.

Specified by:
getUniqueRecordingID in interface IRecordingEvent<IUpdateProgInfo.Props>
Specified by:
getUniqueRecordingID in interface IRecordingUpdateEvent<IUpdateProgInfo.Props>
Returns:
the unique recording ID.
See Also:
EncodingUtils.generateId(Integer, Date)

getProgramInfo

IProgramInfo getProgramInfo()
Deprecated. 
Gets the info object of the changed recording.

Specified by:
getProgramInfo in interface IRecordingUpdateEvent<IUpdateProgInfo.Props>
Returns:
the changed recording

getUpdatedProperties

EnumMap<IProgramInfo.Props,Object[]> getUpdatedProperties(IProgramInfo oldProgramInfo)
Deprecated. 
Compares a previous version of the recording with the changed version.

This function compares each property of the recordings and returns a map containing all changed properties

Usage Example:


    EnumMap<IProgramInfo.Props,Object[]> diffMap = ((IRecordingListChangeUpdate)event).getUpdatedProperties(oldRecording);
    
    // pring changes
    System.out.println(String.format(
       "%d properties of recording changed:",
       Integer.valueOf(diffMap.size()), recording.getBaseName()
    ));							
    for(Entry<IProgramInfo.Props,Object[]> entry : diffMap.entrySet()) {
       IProgramInfo.Props property = entry.getKey();
       Object[] values = entry.getValue();
       System.out.println(String.format(
          "\r\n   %s: %s -> %s",
          property, values[0],values[1]
       ));
    }						 	
 

Specified by:
getUpdatedProperties in interface IRecordingUpdateEvent<IUpdateProgInfo.Props>
Parameters:
oldProgramInfo - a previous version of the recording
Returns:
a map containing all found differences
See Also:
PropertyAwareUtils.compare(IPropertyAware, IPropertyAware)


Copyright © 2008-2013. All Rights Reserved.