use of org.apache.jackrabbit.spi.commons.conversion.PathResolver in project jackrabbit by apache.
the class RetentionRegistryImplTest method testReadHoldFromFile.
public void testReadHoldFromFile() throws RepositoryException {
PathResolver resolver = (SessionImpl) superuser;
RetentionRegistryImpl re = new RetentionRegistryImpl((SessionImpl) superuser, createFileSystem());
try {
assertTrue(re.hasEffectiveHold(resolver.getQPath(childNPath), false));
assertTrue(re.hasEffectiveHold(resolver.getQPath(childN3.getPath()), false));
assertTrue(re.hasEffectiveHold(resolver.getQPath(childNPath + "/somechild"), false));
assertTrue(re.hasEffectiveHold(resolver.getQPath(childNPath + "/hold/is/deep"), false));
assertFalse(re.hasEffectiveHold(resolver.getQPath(testNodePath), false));
assertFalse(re.hasEffectiveHold(resolver.getQPath(childN2.getPath()), false));
} finally {
re.close();
}
}
use of org.apache.jackrabbit.spi.commons.conversion.PathResolver in project jackrabbit by apache.
the class ValueFormatTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
idResolver = new IdentifierResolver() {
public Path getPath(String identifier) throws MalformedPathException {
throw new UnsupportedOperationException();
}
public void checkFormat(String identifier) throws MalformedPathException {
// nop
}
};
NameResolver nResolver = new ParsingNameResolver(NameFactoryImpl.getInstance(), new DummyNamespaceResolver());
PathResolver pResolver = new ParsingPathResolver(PathFactoryImpl.getInstance(), nResolver, idResolver);
resolver = new DefaultNamePathResolver(nResolver, pResolver);
qvFactory = QValueFactoryImpl.getInstance();
vFactory = new ValueFactoryQImpl(qvFactory, resolver);
}
Aggregations