Class Parser
- java.lang.Object
-
- com.redhat.cloud.notifications.ingress.Parser
-
public class Parser extends Object
-
-
Constructor Summary
Constructors Constructor Description Parser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Actiondecode(String actionJson)Validates and decodes the json string to an Action - Default values are set for supported values (see schema)static Stringencode(Action action)Validates and encodes an Action to a json-string - Default values are set for supported values (see schema)static voidvalidate(Action action)Validates action and ensures all the values conform to the schema.
-
-
-
Method Detail
-
decode
public static Action decode(String actionJson)
Validates and decodes the json string to an Action - Default values are set for supported values (see schema)- Parameters:
actionJson- json-serialized Action- Returns:
- Action valid Action
-
encode
public static String encode(Action action)
Validates and encodes an Action to a json-string - Default values are set for supported values (see schema)- Parameters:
action- Action to be encoded- Returns:
- String json-serialized action.
-
validate
public static void validate(Action action)
Validates action and ensures all the values conform to the schema.- Parameters:
action- to be validated
-
-