org.apache.jackrabbit.commons.cnd.ParseException Java Examples
The following examples show how to use
org.apache.jackrabbit.commons.cnd.ParseException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultCNDReader.java From jackrabbit-filevault with Apache License 2.0 | 6 votes |
public void read(Reader reader, String systemId, NamespaceMapping namespaceMapping) throws IOException { try { setSystemId(systemId); CompactNodeTypeDefReader<QNodeTypeDefinition, NamespaceMapping> r; if (namespaceMapping == null) { r = new CompactNodeTypeDefReader<QNodeTypeDefinition, NamespaceMapping>( reader, systemId, new QDefinitionBuilderFactory()); } else { r = new CompactNodeTypeDefReader<QNodeTypeDefinition, NamespaceMapping>( reader, systemId, namespaceMapping, new QDefinitionBuilderFactory()); } add(r.getNodeTypeDefinitions(), r.getNamespaceMapping()); } catch (ParseException e) { IOException ie = new IOException("I/O Error while reading node types."); ie.initCause(e); throw ie; } }
Example #2
Source File: ProductBindingCreatorTest.java From commerce-cif-connector with Apache License 2.0 | 5 votes |
@Before public void setup() throws ParseException, RepositoryException, IOException { context.load().json("/context/jcr-conf-page.json", "/conf/testing/settings"); context.load().json("/context/jcr-catalog-bindings.json", "/var/commerce"); ServiceUserMapped serviceUserMapped = Mockito.mock(ServiceUserMapped.class); context.registerService(ServiceUserMapped.class, serviceUserMapped, ImmutableMap.of(ServiceUserMapped.SUBSERVICENAME, "product-binding-service")); creator = new ProductBindingCreator(); context.registerInjectActivateService(creator); }