public class

ClusterRepresentationUtil

extends Object
java.lang.Object
   ↳ org.apache.helix.webapp.resources.ClusterRepresentationUtil

Summary

Public Constructors
ClusterRepresentationUtil()
Public Methods
static Map<StringString> JsonToMap(String jsonString)
static <T> T JsonToObject(Class<T> clazz, String jsonString)
static String ObjectToJson(Object object)
static String ZNRecordToJson(ZNRecord record)
static HelixDataAccessor getClusterDataAccessor(ZkClient zkClient, String clusterName)
static String getClusterPropertyAsString(ZkClient zkClient, String clusterName, MediaType mediaType, PropertyKey propertyKey)
static String getClusterPropertyAsString(ZkClient zkClient, String clusterName, PropertyKey propertyKey, MediaType mediaType)
static String getErrorAsJsonStringFromException(Exception e)
static String getFormJsonParameterString(Form form, String key)
static Map<StringString> getFormJsonParameters(Form form)
static Map<StringString> getFormJsonParameters(Form form, String key)
static <T> T getFormJsonParameters(Class<T> clazz, Form form, String key)
static String getInstancePropertiesAsString(ZkClient zkClient, String clusterName, PropertyKey propertyKey, MediaType mediaType)
static String getInstancePropertyAsString(ZkClient zkClient, String clusterName, PropertyKey propertyKey, MediaType mediaType)
static List<String> getInstancePropertyList(ZkClient zkClient, String clusterName, String instanceName, PropertyType property, String key)
static String getInstancePropertyNameListAsString(ZkClient zkClient, String clusterName, String instanceName, PropertyType instanceProperty, String key, MediaType mediaType)
static String getInstanceSessionId(ZkClient zkClient, String clusterName, String instanceName)
static String getPropertyAsString(ZkClient zkClient, String clusterName, PropertyKey propertyKey, MediaType mediaType)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ClusterRepresentationUtil ()

Public Methods

public static Map<StringString> JsonToMap (String jsonString)

Throws
IOException
JsonMappingException
JsonParseException

public static T JsonToObject (Class<T> clazz, String jsonString)

Throws
IOException
JsonMappingException
JsonParseException

public static String ObjectToJson (Object object)

Throws
IOException
JsonGenerationException
JsonMappingException

public static String ZNRecordToJson (ZNRecord record)

Throws
IOException
JsonGenerationException
JsonMappingException

public static HelixDataAccessor getClusterDataAccessor (ZkClient zkClient, String clusterName)

public static String getClusterPropertyAsString (ZkClient zkClient, String clusterName, MediaType mediaType, PropertyKey propertyKey)

Throws
IOException
JsonGenerationException
JsonMappingException

public static String getClusterPropertyAsString (ZkClient zkClient, String clusterName, PropertyKey propertyKey, MediaType mediaType)

Throws
IOException
JsonGenerationException
JsonMappingException

public static String getErrorAsJsonStringFromException (Exception e)

public static String getFormJsonParameterString (Form form, String key)

Throws
IOException
JsonMappingException
JsonParseException

public static Map<StringString> getFormJsonParameters (Form form)

Throws
IOException
JsonMappingException
JsonParseException

public static Map<StringString> getFormJsonParameters (Form form, String key)

Throws
IOException
JsonMappingException
JsonParseException

public static T getFormJsonParameters (Class<T> clazz, Form form, String key)

Throws
IOException
JsonMappingException
JsonParseException

public static String getInstancePropertiesAsString (ZkClient zkClient, String clusterName, PropertyKey propertyKey, MediaType mediaType)

Throws
IOException
JsonGenerationException
JsonMappingException

public static String getInstancePropertyAsString (ZkClient zkClient, String clusterName, PropertyKey propertyKey, MediaType mediaType)

Throws
IOException
JsonGenerationException
JsonMappingException

public static List<String> getInstancePropertyList (ZkClient zkClient, String clusterName, String instanceName, PropertyType property, String key)

public static String getInstancePropertyNameListAsString (ZkClient zkClient, String clusterName, String instanceName, PropertyType instanceProperty, String key, MediaType mediaType)

Throws
IOException
JsonGenerationException
JsonMappingException

public static String getInstanceSessionId (ZkClient zkClient, String clusterName, String instanceName)

public static String getPropertyAsString (ZkClient zkClient, String clusterName, PropertyKey propertyKey, MediaType mediaType)

Throws
IOException
JsonGenerationException
JsonMappingException