Project

General

Profile

Actions

Task #505

closed

Notification template redeploy + backup

Added by Ondřej Kopr almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondřej Kopr
Category:
Notification
Target version:
Start date:
06/13/2017
Due date:
% Done:

100%

Estimated time:
Owner:

Description

  • add function that allow redeploy template from resource + immediate export current version of template to tmp directory,
  • add function that allow backup template to tmp directory,
  • bout this function will be able call from FE - from bulk operation.

Try to abstract export and redoploy methods for script, same behavior.


Related issues

Related to IdStory Identity Manager - Task #483: Reload template from FEClosedOndřej Kopr06/06/2017

Actions
Actions #1

Updated by Ondřej Kopr almost 7 years ago

  • Related to Task #483: Reload template from FE added
Actions #2

Updated by Ondřej Kopr almost 7 years ago

  • Subject changed from Notification template redeploy + export template to Notification template redeploy + backup
  • Description updated (diff)
Actions #3

Updated by Ondřej Kopr almost 7 years ago

  • % Done changed from 0 to 70
  • add method redeployDto and backupDto to service,
  • create new endpoints ie_ /notification-templates/<id>/redeploy_ and /notification-templates/<id>/backup ,
  • add two bulk operation to FE redeploy and backup,
  • add two new operation redeploy and backup to template detail,
  • update doc.

commit:
https://github.com/bcvsolutions/CzechIdMng/commit/b4377032adfe64086d609b86ec8c47fb0356ea4a

things to done:
tests

Actions #4

Updated by Ondřej Kopr almost 7 years ago

  • % Done changed from 70 to 40

Note from feedback:

fix name in selectbox to "Refresh from disk"
fix warning message with failed redeploy to info with better message,
change name of folder see example (year-mont-day),
add configuration property for backups base,
add configuration property for backups templates,
check if backups directory exists and then check permission (700 must be), if directory exists with another permission fail.

example:
/tmp/idm_backup/templates/<year-mont-day>/.xml

Actions #5

Updated by Ondřej Kopr almost 7 years ago

  • % Done changed from 40 to 90
  • fix name in selectbox to "Refresh from disk" - done,
  • fix warning message with failed redeploy to info with better message - done,
  • change name of folder see example (year-mont-day) - done,
  • add configuration property for backups base - done (for now is this constant in template service TODO),
  • add configuration property for backups templates - done,
  • add new exception for check permission.

update documentation:
https://proj.bcvsolutions.eu/ngidm/doku.php?id=en:navrh:konfigurace_aplikace#backup
https://proj.bcvsolutions.eu/ngidm/doku.php?id=en:navrh:notification#templates

New behavior: when dont exists configuration property for default backup, then is throw exception

Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/c1ff5e3f8c6c3cb90f54afc1d30110b8bce55809

Actions #6

Updated by Ondřej Kopr almost 7 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Radek Tomiška

Please Radek, could you make a review? Commits and changes are listed above. Thank you

Actions #7

Updated by Radek Tomiška almost 7 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • Target version set to Citrine (7.3.0)
I did test and review. It works, i found some issues:
  • jaxb context has to be initialized the same way as velocity context.
  • rename methods - without *Dto and *Entity
  • create NotificationTemplateConfiguration for configuration properties - see IdentityConfiguration
  • redeploy method in controller should have WRITE authority
  • add template configuration properties to the documentation
  • change backup folder name to the format 20170101

Redeploy could work without configuration by default - now backup folder has to be configured at first and redeploy operation fails, i will discuss this requirement with Zdeněk.

Actions #8

Updated by Ondřej Kopr almost 7 years ago

  • jaxb context is now initialized in constructor,
  • method with dto and entities renamed,
  • add configuration into application,
  • change permission for redeploy method to update,
  • change format of folder.
Actions #9

Updated by Ondřej Kopr almost 7 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Radek Tomiška
Actions #10

Updated by Radek Tomiška almost 7 years ago

  • Status changed from Needs feedback to Closed
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • % Done changed from 90 to 100

It's nice, thx.

Actions

Also available in: Atom PDF