Package org.wildfly.channel
Class ChannelMapper
- java.lang.Object
-
- org.wildfly.channel.ChannelMapper
-
public class ChannelMapper extends Object
Mapper class to transform YAML content (from URL or String) to Channel objects (and vice versa). YAML input is validated against a schema.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCURRENT_SCHEMA_VERSIONstatic StringSCHEMA_VERSION_1_0_0
-
Constructor Summary
Constructors Constructor Description ChannelMapper()
-
-
-
Field Detail
-
SCHEMA_VERSION_1_0_0
public static final String SCHEMA_VERSION_1_0_0
- See Also:
- Constant Field Values
-
CURRENT_SCHEMA_VERSION
public static final String CURRENT_SCHEMA_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
toYaml
public static String toYaml(Channel... channels) throws IOException
- Throws:
IOException
-
toYaml
public static String toYaml(List<Channel> channels) throws IOException
- Throws:
IOException
-
from
public static Channel from(URL channelURL) throws InvalidChannelException
- Throws:
InvalidChannelException
-
fromString
public static List<Channel> fromString(String yamlContent) throws InvalidChannelException
- Throws:
InvalidChannelException
-
-