in src/main/java/org/apache/sling/launchpad/testservices/repository/SystemUsersInitializer.java [58:78]
public void processRepository(SlingRepository repo) throws Exception {
final Session s = repo.loginAdministrative(null);
final InputStream is = getClass().getResourceAsStream(REPOINIT_FILE);
try {
if (is == null) {
throw new IOException("Class Resource not found:" + REPOINIT_FILE);
}
final List<Operation> ops;
try (final Reader r = new InputStreamReader(is, StandardCharsets.UTF_8)) {
ops = parser.parse(r);
}
log.info("Executing {} repoinit Operations", ops.size());
processor.apply(s, ops);
s.save();
} finally {
s.logout();
if (is != null) {
is.close();
}
}
}