use of org.apache.jackrabbit.server.io.DefaultHandler in project sling by apache.
the class DefaultHandlerService method activate.
@Activate
@Modified
@SuppressWarnings("unused")
private void activate(final Map<String, Object> properties) {
final String collectionType = OsgiUtil.toString(properties.get(SlingWebDavServlet.TYPE_COLLECTIONS), SlingWebDavServlet.TYPE_COLLECTIONS_DEFAULT);
final String nonCollectionType = OsgiUtil.toString(properties.get(SlingWebDavServlet.TYPE_NONCOLLECTIONS), SlingWebDavServlet.TYPE_NONCOLLECTIONS_DEFAULT);
final String contentType = OsgiUtil.toString(properties.get(SlingWebDavServlet.TYPE_CONTENT), SlingWebDavServlet.TYPE_CONTENT_DEFAULT);
this.delegatee = new DefaultHandler(null, collectionType, nonCollectionType, contentType);
}
use of org.apache.jackrabbit.server.io.DefaultHandler in project jackrabbit by apache.
the class ResourceConfigTest method testIOManagerConfigWithParam.
public void testIOManagerConfigWithParam() throws Exception {
InputStream in = new ByteArrayInputStream(CONFIG_2.getBytes("UTF-8"));
ResourceConfig config = new ResourceConfig(null);
config.parse(in);
IOManager ioMgr = config.getIOManager();
assertNotNull(ioMgr);
assertEquals("org.apache.jackrabbit.server.io.IOManagerImpl", ioMgr.getClass().getName());
IOHandler[] handlers = ioMgr.getIOHandlers();
assertNotNull(handlers);
assertEquals(1, handlers.length);
assertEquals("org.apache.jackrabbit.server.io.DefaultHandler", handlers[0].getName());
DefaultHandler dh = (DefaultHandler) handlers[0];
assertEquals("nt:unstructured", dh.getCollectionNodeType());
assertEquals("nt:unstructured", dh.getNodeType());
assertEquals("nt:resource", dh.getContentNodeType());
}
Aggregations