Class ProtocolUtil
- java.lang.Object
-
- com.thecoderscorner.menu.remote.protocol.ProtocolUtil
-
public class ProtocolUtil extends java.lang.ObjectA few general helper method to get the version and platform information to and from messages.
-
-
Constructor Summary
Constructors Constructor Description ProtocolUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ApiPlatformfromKeyToApiPlatform(int key)get the api platform given it's integer key value.static intgetVersionFromProperties()gets and caches the current version from the version properties file
-
-
-
Method Detail
-
getVersionFromProperties
public static int getVersionFromProperties()
gets and caches the current version from the version properties file- Returns:
- the current version as major * 100 + minor
-
fromKeyToApiPlatform
public static ApiPlatform fromKeyToApiPlatform(int key)
get the api platform given it's integer key value.- Parameters:
key- the platform key- Returns:
- platform enum entry.
-
-