use of org.apache.jackrabbit.vault.fs.config.ConfigurationException in project sling by apache.
the class FileVaultResourceMapper method getWorkspaceFilter.
/**
* @return Workspace filter or null if none found.
*/
private WorkspaceFilter getWorkspaceFilter() {
if (filterXmlFile != null && filterXmlFile.exists()) {
try {
DefaultWorkspaceFilter workspaceFilter = new DefaultWorkspaceFilter();
workspaceFilter.load(filterXmlFile);
return workspaceFilter;
} catch (IOException | ConfigurationException ex) {
log.error("Unable to parse workspace filter: " + filterXmlFile.getPath(), ex);
}
} else {
log.debug("Workspace filter not found: " + filterXmlFile.getPath());
}
return null;
}
use of org.apache.jackrabbit.vault.fs.config.ConfigurationException in project sling by apache.
the class VltSerializationDataBuilder method init.
public void init(org.apache.sling.ide.transport.Repository repository, File contentSyncRoot) throws SerializationException {
this.repo = repository;
try {
this.skm = new SerializationKindManager();
this.skm.init(repository);
if (!contentSyncRoot.exists()) {
throw new IllegalArgumentException("contentSyncRoot does not exist: " + contentSyncRoot);
}
Repository jcrRepo = RepositoryUtils.getRepository(repo.getRepositoryInfo());
Credentials credentials = RepositoryUtils.getCredentials(repo.getRepositoryInfo());
session = jcrRepo.login(credentials);
RepositoryAddress address = RepositoryUtils.getRepositoryAddress(repo.getRepositoryInfo());
fs = fsLocator.getFileSystem(address, contentSyncRoot, session);
} catch (org.apache.sling.ide.transport.RepositoryException e) {
throw new SerializationException(e);
} catch (RepositoryException e) {
throw new SerializationException(e);
} catch (IOException e) {
throw new SerializationException(e);
} catch (ConfigurationException e) {
throw new SerializationException(e);
}
}
use of org.apache.jackrabbit.vault.fs.config.ConfigurationException in project sling by apache.
the class FileVaultXmlMounter method getWorkspaceFilter.
private WorkspaceFilter getWorkspaceFilter(final File filterXmlFile) throws MojoExecutionException {
try {
DefaultWorkspaceFilter workspaceFilter = new DefaultWorkspaceFilter();
workspaceFilter.load(filterXmlFile);
return workspaceFilter;
} catch (IOException | ConfigurationException ex) {
throw new MojoExecutionException("Unable to parse workspace filter: " + filterXmlFile.getPath(), ex);
}
}
Aggregations