@Override public void pageInserted(final SPage sPage, final byte[] content) throws SObjectCreationException { if (SContentType.API_EXTENSION.equals(sPage.getContentType())) { try { addPageMapping(sPage, helper.loadPageProperties(content)); } catch (final IOException | SInvalidPageZipMissingPropertiesException e) { throw new SObjectCreationException(e); } } }
@Override public void pageDeleted(final SPage page) throws SBonitaReadException, SDeletionException { if (SContentType.API_EXTENSION.equals(page.getContentType())) { List<SPageMapping> mappings; do { mappings = pageMappingService.get(page.getId(), 0, MAX_RESULTS); for (final SPageMapping mapping : mappings) { pageMappingService.delete(mapping); } } while (mappings.size() == MAX_RESULTS); } }
@Override public void pageUpdated(final SPage page, final byte[] content) throws SObjectModificationException { if (SContentType.API_EXTENSION.equals(page.getContentType())) { try { updateMappings(page, helper.loadPageProperties(content)); } catch (SBonitaReadException | SDeletionException | SObjectCreationException | SInvalidPageZipMissingPropertiesException | IOException e) { throw new SObjectModificationException(e); } } }