@Authenticated(value = {LoggedIn.class, HasRole.class})
  @Authorized(value = "admin")
  @Transactional(readOnly = true)
  @AddCSRFToken
  public Result createArchive(long parentArchiveId) throws ArchiveNotFoundException {
    ArchiveUpsertForm archiveUpsertData = new ArchiveUpsertForm();
    if (parentArchiveId != 0) {
      Archive archive = archiveService.findArchiveById(parentArchiveId);
      archiveUpsertData.parentJid = archive.getJid();
    }
    Form<ArchiveUpsertForm> archiveUpsertForm =
        Form.form(ArchiveUpsertForm.class).fill(archiveUpsertData);

    return showCreateArchive(parentArchiveId, archiveUpsertForm);
  }
  @Authenticated(value = {LoggedIn.class, HasRole.class})
  @Authorized(value = "admin")
  @Transactional(readOnly = true)
  @AddCSRFToken
  public Result editArchive(long archiveId) throws ArchiveNotFoundException {
    Archive archive = archiveService.findArchiveById(archiveId);
    ArchiveUpsertForm archiveUpsertData = new ArchiveUpsertForm();
    if (archive.getParentArchive() != null) {
      archiveUpsertData.parentJid = archive.getParentArchive().getJid();
    }
    archiveUpsertData.name = archive.getName();
    archiveUpsertData.description = archive.getDescription();

    Form<ArchiveUpsertForm> archiveUpsertForm =
        Form.form(ArchiveUpsertForm.class).fill(archiveUpsertData);

    return showEditArchive(archiveUpsertForm, archive);
  }