mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-08-14 17:58:27 +00:00
Add files to transformConfigSources
This commit is contained in:
@@ -56,14 +56,19 @@ public class TransformConfigResourceReader
|
||||
public TransformConfig read(String engineConfigLocation)
|
||||
{
|
||||
Resource engineConfig = resourceLoader.getResource(engineConfigLocation);
|
||||
try (Reader reader = new InputStreamReader(engineConfig.getInputStream(), UTF_8))
|
||||
return read(engineConfig);
|
||||
}
|
||||
|
||||
public TransformConfig read(Resource resource)
|
||||
{
|
||||
try (Reader reader = new InputStreamReader(resource.getInputStream(), UTF_8))
|
||||
{
|
||||
TransformConfig transformConfig = jsonObjectMapper.readValue(reader, TransformConfig.class);
|
||||
return transformConfig;
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new TransformException(INTERNAL_SERVER_ERROR, "Could not read " + engineConfigLocation, e);
|
||||
throw new TransformException(INTERNAL_SERVER_ERROR, "Could not read " + resource.getFilename(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user