org.jmythapi.protocol
Class ProtocolVersionInfo

java.lang.Object
  extended by org.jmythapi.protocol.ProtocolVersionInfo

public class ProtocolVersionInfo
extends Object

This class defines constants used to further describe a protocol version.

The constants of this class are used to append additional metadata to a ProtocolVersion constant. The assigned metadata can be queried as runtime using ProtocolVersion.getMetaData().
Additionally it can be used to add metadata to an MythProtoVersionAnnotation via the MythProtoVersionMetadata annotation. The assigned metadata can be queried using MythProtoVersionAnnotation.fromInfo() and MythProtoVersionAnnotation.toInfo() .

Usage example:

Adding Metadata to the ProtocolVersion

In the following example the SVN-revision, GIT-commit ID and the date of the protocol version 01 is added as metadata to the enumeration constant.

 PROTO_VERSION_01(1,null,new String[][]{
    {DATE,"2004-01-29"},
    {SVN_COMMIT,"3021"},
    {GIT_COMMIT,"e6ffdd37481937e09ec7"}
 })
 

Adding additional Metadata to the MythProtoVersionAnnotation:

In the following example the added enumeration constant belongs to protocol version 31, but was added in a separate commit. Therefore the SVN-revision and GIT-commit ID was added as metadata to the protocol-version annotation.

    public static enum Status implements IVersionableValue {
       ...
       
       // Recorder Failed.
       @MythProtoVersionAnnotation(from=PROTO_VERSION_31,fromInfo={
          @MythProtoVersionMetadata(key=SVN_COMMIT,value="11211"),
          @MythProtoVersionMetadata(key=GIT_COMMIT,value="ff50f067a1b403779ac4")
       })
       FAILED(-9)
       
       ...
    }
 

See Also:
protocol-version, protocol-version annotation, protocol-version metadata

Field Summary
static String DATE
          The date when the protocol version was introduced.
static String GIT_COMMIT
          The Git commit ID.
static String MYTH_RELEASE
          The MythTV release version.
static String MYTHBUNTU_RELEASE
          The MythBuntu release version.
static String SVN_COMMIT
          The SVN revision number of the commit.
 
Constructor Summary
ProtocolVersionInfo()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE

public static final String DATE
The date when the protocol version was introduced.

See Also:
Constant Field Values

GIT_COMMIT

public static final String GIT_COMMIT
The Git commit ID.

See Also:
Constant Field Values

SVN_COMMIT

public static final String SVN_COMMIT
The SVN revision number of the commit.

See Also:
Constant Field Values

MYTH_RELEASE

public static final String MYTH_RELEASE
The MythTV release version.

See Also:
Constant Field Values

MYTHBUNTU_RELEASE

public static final String MYTHBUNTU_RELEASE
The MythBuntu release version.

See Also:
Constant Field Values
Constructor Detail

ProtocolVersionInfo

public ProtocolVersionInfo()


Copyright © 2008-2013. All Rights Reserved.