import org.apache.jackrabbit.core.RepositoryImpl;
import org.apache.jackrabbit.core.config.RepositoryConfig;
import org.apache.jackrabbit.core.config.RepositoryConfigurationParser;
-import org.argeo.ArgeoException;
+import org.argeo.jcr.ArgeoJcrException;
import org.argeo.jcr.ArgeoNames;
import org.argeo.jcr.JcrUtils;
import org.springframework.core.io.Resource;
// long begin = System.currentTimeMillis();
if (getRepository() != null)
- throw new ArgeoException("Cannot be used to wrap another repository");
+ throw new ArgeoJcrException("Cannot be used to wrap another repository");
Repository repository = createJackrabbitRepository();
super.setRepository(repository);
return repository;
} catch (Exception e) {
- throw new ArgeoException("Cannot create Jackrabbit repository " + getHomeDirectory(), e);
+ throw new ArgeoJcrException("Cannot create Jackrabbit repository " + getHomeDirectory(), e);
} finally {
IOUtils.closeQuietly(configurationIn);
}
return homeDirectory.getCanonicalFile();
} catch (IOException e) {
- throw new ArgeoException("Cannot get canonical file for " + homeDirectory, e);
+ throw new ArgeoJcrException("Cannot get canonical file for " + homeDirectory, e);
}
}
restartAndClearCaches = true;
}
}
- } catch (ArgeoException e) {
+ } catch (ArgeoJcrException e) {
throw e;
} catch (Exception e) {
- throw new ArgeoException("Cannot migrate", e);
+ throw new ArgeoJcrException("Cannot migrate", e);
} finally {
JcrUtils.logoutQuietly(session);
}
try {
session = login();
} catch (RepositoryException e) {
- throw new ArgeoException("Cannot login to migrated repository", e);
+ throw new ArgeoJcrException("Cannot login to migrated repository", e);
}
for (JackrabbitDataModelMigration dataModelMigration : new TreeSet<JackrabbitDataModelMigration>(
try {
return configuration != null ? configuration.getInputStream() : null;
} catch (IOException e) {
- throw new ArgeoException("Cannot read Jackrabbit configuration " + configuration, e);
+ throw new ArgeoJcrException("Cannot read Jackrabbit configuration " + configuration, e);
}
}
try {
return variables != null ? variables.getInputStream() : null;
} catch (IOException e) {
- throw new ArgeoException("Cannot read Jackrabbit variables " + variables, e);
+ throw new ArgeoJcrException("Cannot read Jackrabbit variables " + variables, e);
}
}
}
} catch (IOException e) {
- throw new ArgeoException("Cannot read configuration properties", e);
+ throw new ArgeoJcrException("Cannot read configuration properties", e);
} finally {
IOUtils.closeQuietly(propsIn);
}
}
public void setRepository(Repository repository) {
- throw new ArgeoException("Cannot be used to wrap another repository");
+ throw new ArgeoJcrException("Cannot be used to wrap another repository");
}
public void setDataModelMigrations(Set<JackrabbitDataModelMigration> dataModelMigrations) {