public Page createPage(final String contentName, final byte[] content) throws AlreadyExistsException, CreationException, InvalidPageTokenException, InvalidPageZipContentException { try { return convertToPage(pageService.addPage(content, contentName, userIdFromSession)); } catch (final SObjectAlreadyExistsException e) { throw new AlreadyExistsException("A page already exists with the name defined in page zip content"); } catch (final SInvalidPageTokenException e) { throw new InvalidPageTokenException(e.getMessage(), e); } catch (final SInvalidPageZipException e) { throw convertException(e); } catch (final SBonitaException e) { throw new CreationException(e); } }
public Page createPage(final String contentName, final byte[] content) throws AlreadyExistsException, CreationException, InvalidPageTokenException, InvalidPageZipContentException { try { return convertToPage(pageService.addPage(content, contentName, userIdFromSession)); } catch (final SObjectAlreadyExistsException e) { throw new AlreadyExistsException("A page already exists with the name defined in page zip content"); } catch (final SInvalidPageTokenException e) { throw new InvalidPageTokenException(e.getMessage(), e); } catch (final SInvalidPageZipException e) { throw convertException(e); } catch (final SBonitaException e) { throw new CreationException(e); } }
public Page createPage(final PageCreator pageCreator, final byte[] content) throws AlreadyExistsException, CreationException, InvalidPageTokenException, InvalidPageZipContentException { final SPage sPage = constructPage(pageCreator, userIdFromSession); try { final SPage addPage = pageService.addPage(sPage, content); return convertToPage(addPage); } catch (final SObjectAlreadyExistsException e) { throw new AlreadyExistsException("A page already exists with the name " + pageCreator.getName()); } catch (final SInvalidPageTokenException e) { throw new InvalidPageTokenException(e.getMessage(), e); } catch (final SInvalidPageZipException e) { throw convertException(e); } catch (final SBonitaException e) { throw new CreationException(e); } }
public Page createPage(final PageCreator pageCreator, final byte[] content) throws AlreadyExistsException, CreationException, InvalidPageTokenException, InvalidPageZipContentException { final SPage sPage = constructPage(pageCreator, userIdFromSession); try { final SPage addPage = pageService.addPage(sPage, content); return convertToPage(addPage); } catch (final SObjectAlreadyExistsException e) { throw new AlreadyExistsException("A page already exists with the name " + pageCreator.getName()); } catch (final SInvalidPageTokenException e) { throw new InvalidPageTokenException(e.getMessage(), e); } catch (final SInvalidPageZipException e) { throw convertException(e); } catch (final SBonitaException e) { throw new CreationException(e); } }
public Properties getPageProperties(final byte[] content, final boolean checkIfItAlreadyExists) throws InvalidPageTokenException, AlreadyExistsException, InvalidPageZipMissingPropertiesException, InvalidPageZipMissingIndexException, InvalidPageZipInconsistentException, InvalidPageZipMissingAPropertyException { try { return getProperties(content, checkIfItAlreadyExists, pageService); } catch (final SInvalidPageTokenException e) { throw new InvalidPageTokenException(e.getMessage()); } catch (final SBonitaReadException e) { throw new RetrieveException(e); } catch (final SInvalidPageZipMissingAPropertyException e) { throw new InvalidPageZipMissingAPropertyException(e.getFields()); } catch (final SInvalidPageZipInconsistentException e) { throw new InvalidPageZipInconsistentException(e.getMessage(), e); } catch (final SInvalidPageZipMissingIndexException e) { throw new InvalidPageZipMissingIndexException(); } catch (final SInvalidPageZipMissingPropertiesException e) { throw new InvalidPageZipMissingPropertiesException(); } }
public Properties getPageProperties(final byte[] content, final boolean checkIfItAlreadyExists) throws InvalidPageTokenException, AlreadyExistsException, InvalidPageZipMissingPropertiesException, InvalidPageZipMissingIndexException, InvalidPageZipInconsistentException, InvalidPageZipMissingAPropertyException { try { return getProperties(content, checkIfItAlreadyExists, pageService); } catch (final SInvalidPageTokenException e) { throw new InvalidPageTokenException(e.getMessage()); } catch (final SBonitaReadException e) { throw new RetrieveException(e); } catch (final SInvalidPageZipMissingAPropertyException e) { throw new InvalidPageZipMissingAPropertyException(e.getFields()); } catch (final SInvalidPageZipInconsistentException e) { throw new InvalidPageZipInconsistentException(e.getMessage(), e); } catch (final SInvalidPageZipMissingIndexException e) { throw new InvalidPageZipMissingIndexException(); } catch (final SInvalidPageZipMissingPropertiesException e) { throw new InvalidPageZipMissingPropertiesException(); } }