Package io.wcm.devops.conga.model.reader
Class AbstractModelReader<T>
- java.lang.Object
-
- io.wcm.devops.conga.model.reader.AbstractModelReader<T>
-
- All Implemented Interfaces:
ModelReader<T>
- Direct Known Subclasses:
EnvironmentReader
,RoleReader
public abstract class AbstractModelReader<T> extends Object implements ModelReader<T>
Shared functionality for model readers.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractModelReader(org.yaml.snakeyaml.Yaml yaml)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(Resource file)
Checks if the given file is accepted by this reader.T
read(Resource file)
Read modelT
read(InputStream is)
Read modelT
read(Reader reader)
Read model
-
-
-
Method Detail
-
accepts
public boolean accepts(Resource file)
Description copied from interface:ModelReader
Checks if the given file is accepted by this reader.- Specified by:
accepts
in interfaceModelReader<T>
- Parameters:
file
- File- Returns:
- true if accepted
-
read
public final T read(Resource file) throws IOException
Description copied from interface:ModelReader
Read model- Specified by:
read
in interfaceModelReader<T>
- Parameters:
file
- Model file- Returns:
- Model object
- Throws:
IOException
- is thrown when I/O exception occurs
-
read
public final T read(InputStream is) throws IOException
Description copied from interface:ModelReader
Read model- Specified by:
read
in interfaceModelReader<T>
- Parameters:
is
- Model file- Returns:
- Model object
- Throws:
IOException
- is thrown when I/O exception occurs
-
read
public final T read(Reader reader)
Description copied from interface:ModelReader
Read model- Specified by:
read
in interfaceModelReader<T>
- Parameters:
reader
- Model file- Returns:
- Model object
-
-