use of org.apache.jackrabbit.vault.fs.api.VaultFileSystem in project sling by apache.
the class VltSerializationManager method main.
public static void main(String[] args) throws RepositoryException, URISyntaxException, IOException {
RepositoryAddress address = new RepositoryAddress("http://localhost:8080/server/root");
Repository repo = new RepositoryProvider().getRepository(address);
Session session = repo.login(new SimpleCredentials("admin", "admin".toCharArray()));
VaultFileSystem fs = Mounter.mount(null, null, address, "/", session);
String[] attempts = new String[] { "/rep:policy", "/var" };
for (String attempt : attempts) {
VaultFile vaultFile = fs.getFile(attempt);
System.out.println(attempt + " -> " + vaultFile);
}
for (String attempt : attempts) {
attempt = PlatformNameFormat.getPlatformPath(attempt) + EXTENSION_XML;
VaultFile vaultFile = fs.getFile(attempt);
System.out.println(attempt + " -> " + vaultFile);
}
}
Aggregations