protected void update(final Set<String> annotatedClassNames) throws SBusinessDataRepositoryDeploymentException { final List<Exception> exceptions = schemaManager.update(annotatedClassNames); if (!exceptions.isEmpty()) { throw new SBusinessDataRepositoryDeploymentException("Updating schema fails due to: " + exceptions); } }
@Override public void dropAndUninstall(final long tenantId) throws SBusinessDataRepositoryException { final URL resource = Thread.currentThread().getContextClassLoader().getResource("bom.xml"); if (resource != null) { try { final byte[] content = IOUtil.getAllContentFrom(resource); final URL xsd = BusinessObjectModel.class.getResource("/bom.xsd"); final BusinessObjectModel model = IOUtils.unmarshallXMLtoObject(content, BusinessObjectModel.class, xsd); final List<Exception> exceptions = schemaManager.drop(model.getBusinessObjectsClassNames()); if (!exceptions.isEmpty()) { throw new SBusinessDataRepositoryDeploymentException("Updating schema fails due to: " + exceptions); } uninstall(tenantId); } catch (final IOException | JAXBException | SAXException ioe) { throw new SBusinessDataRepositoryException(ioe); } } }
@Override public void dropAndUninstall(final long tenantId) throws SBusinessDataRepositoryException { final URL resource = Thread.currentThread().getContextClassLoader().getResource("bom.xml"); if (resource != null) { try { final byte[] content = IOUtil.getAllContentFrom(resource); final URL xsd = BusinessObjectModel.class.getResource("/bom.xsd"); final BusinessObjectModel model = IOUtils.unmarshallXMLtoObject(content, BusinessObjectModel.class, xsd); final List<Exception> exceptions = schemaManager.drop(model.getBusinessObjectsClassNames()); if (!exceptions.isEmpty()) { throw new SBusinessDataRepositoryDeploymentException("Updating schema fails due to: " + exceptions); } uninstall(tenantId); } catch (final IOException | JAXBException | SAXException ioe) { throw new SBusinessDataRepositoryException(ioe); } } }
protected void update(final Set<String> annotatedClassNames) throws SBusinessDataRepositoryDeploymentException { final List<Exception> exceptions = schemaManager.update(annotatedClassNames); if (!exceptions.isEmpty()) { throw new SBusinessDataRepositoryDeploymentException("Updating schema fails due to: " + exceptions); } }