Long getPageIdOrNull(String form, long processDefinitionId) throws SBonitaReadException { SPage pageByName = pageService.getPageByNameAndProcessDefinitionId(form, processDefinitionId); if (pageByName == null) { pageByName = pageService.getPageByName(form); } return pageByName == null ? null : pageByName.getId(); }
public byte[] getPageContent(final long pageId) throws PageNotFoundException { try { return pageService.getPageContent(pageId); } catch (final SBonitaReadException e) { throw new PageNotFoundException(e); } catch (final SObjectNotFoundException e) { throw new PageNotFoundException(e); } }
@Override public SPage addPage(final SPage page, final byte[] content) throws SObjectCreationException, SObjectAlreadyExistsException, SInvalidPageZipException, SInvalidPageTokenException { try { checkZipContainsRequiredEntries(unzip(content)); checkPageNameIsValid(page.getName(), page.isProvided()); checkPageDisplayNameIsValid(page.getDisplayName()); return insertPage(page, content); } catch (final IOException e) { throw new SInvalidPageZipInconsistentException("Error while reading zip file", e); } }
private Long getThemeId(final String themeName, final String applicationToken, final ImportStatus importStatus) throws SBonitaReadException, ImportException { SPage theme = pageService.getPageByName(themeName); if (theme == null) { return handleMissingTheme(themeName, applicationToken, importStatus); } return theme.getId(); }
private void deleteProcessPages(Long processDefinitionId) throws SBonitaReadException, SObjectModificationException, SObjectNotFoundException { List<SPage> sPages; do { sPages = pageService.getPageByProcessDefinitionId(processDefinitionId, 0, NUMBER_OF_RESULTS); for (SPage sPage : sPages) { pageService.deletePage(sPage.getId()); } } while (sPages.size() == NUMBER_OF_RESULTS); }
public PageCreator(String name, String zipName, String contentType, Long processDefinitionId) { this(name, zipName); setContentType(contentType); setProcessDefinitionId(processDefinitionId); }
public Page getPageByName(final String name) throws PageNotFoundException { try { final SPage sPage = pageService.getPageByName(name); if (sPage == null) { throw new PageNotFoundException(name, PageAttribute.NAME); } return convertToPage(sPage); } catch (final SBonitaReadException e) { throw new PageNotFoundException(e); } }
public Page getPage(final long pageId) throws PageNotFoundException { try { return convertToPage(pageService.getPage(pageId)); } catch (final SBonitaReadException e) { throw new PageNotFoundException(e); } catch (final SObjectNotFoundException e) { throw new PageNotFoundException(e); } }
public Page getPageByNameAndProcessDefinition(String name, long processDefinitionId) throws PageNotFoundException { try { final SPage sPage = pageService.getPageByNameAndProcessDefinitionId(name, processDefinitionId); if (sPage == null) { throw new PageNotFoundException(name, PageAttribute.NAME); } return convertToPage(sPage); } catch (final SBonitaReadException e) { throw new PageNotFoundException(e); } }
private void notifyPageInsert(final SPage page, final byte[] content) throws SObjectCreationException { for (final PageServiceListener pageServiceListener : pageServiceListeners) { pageServiceListener.pageInserted(page, content); } }
Long getPageIdOrNull(String form, long processDefinitionId) throws SBonitaReadException { SPage pageByName = pageService.getPageByNameAndProcessDefinitionId(form, processDefinitionId); if (pageByName == null) { pageByName = pageService.getPageByName(form); } return pageByName == null ? null : pageByName.getId(); }
private Long getLayoutId(final String layoutName, final String applicationToken, final ImportStatus importStatus) throws SBonitaReadException, ImportException { SPage layout = pageService.getPageByName(layoutName); if (layout == null) { return handleMissingLayout(layoutName, applicationToken, importStatus); } return layout.getId(); }
public PageCreator(String name, String zipName, String contentType, Long processDefinitionId) { this(name, zipName); setContentType(contentType); setProcessDefinitionId(processDefinitionId); }
public Page getPageByName(final String name) throws PageNotFoundException { try { final SPage sPage = pageService.getPageByName(name); if (sPage == null) { throw new PageNotFoundException(name, PageAttribute.NAME); } return convertToPage(sPage); } catch (final SBonitaReadException e) { throw new PageNotFoundException(e); } }
public Page getPage(final long pageId) throws PageNotFoundException { try { return convertToPage(pageService.getPage(pageId)); } catch (final SBonitaReadException e) { throw new PageNotFoundException(e); } catch (final SObjectNotFoundException e) { throw new PageNotFoundException(e); } }
public byte[] getPageContent(final long pageId) throws PageNotFoundException { try { return pageService.getPageContent(pageId); } catch (final SBonitaReadException e) { throw new PageNotFoundException(e); } catch (final SObjectNotFoundException e) { throw new PageNotFoundException(e); } }
private void notifyPageInsert(final SPage page, final byte[] content) throws SObjectCreationException { for (final PageServiceListener pageServiceListener : pageServiceListeners) { pageServiceListener.pageInserted(page, content); } }
private Long getLayoutId(final String layoutName, final String applicationToken, final ImportStatus importStatus) throws SBonitaReadException, ImportException { SPage layout = pageService.getPageByName(layoutName); if (layout == null) { return handleMissingLayout(layoutName, applicationToken, importStatus); } return layout.getId(); }