[MAGNOLIA-925] Filter configuration in config repository Created: 11/Jun/06  Updated: 23/Jan/13  Resolved: 27/Oct/06

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.0 Beta 1
Fix Version/s: 3.0 RC4

Type: Improvement Priority: Blocker
Reporter: Fabrizio Giustina Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Complete the work on info.magnolia.cms.filters.MagnoliaManagedFilter:

  • make filter and filter parameters configurable from the magnolia repository instead of adding them to web.xml (filter name, class, priority, parameters)

This could allow modules to add filters at runtime, without any need for modifying web.xml, and changing parameters without a restart (for example, login configuration)



 Comments   
Comment by Philipp Bracher [ 09/Aug/06 ]

Fabrizios instructions how to proceed:

This is what should be done:

  • implement a FilterManager which holds all the filter definitions
    loaded from jcr (like TemplateManager or other similar classes)
  • add an hook that loads filters for each module (just like it's done
    now fo templates, pages...). Better if filter definitions are also
    allowed on the "server" path and not only for modules since some of
    them are very core (this is something we should think about also for
    other things, like virtual uri mappings)
  • Create a FilterDefinition class that should contains: filter class,
    optional parameters and important filter priority (I planned to use
    numbers like 100,200,300,... for actual filters, so that you can
    always insert a need filter in between). FilterDefinitions should
    automatically be sorted by priority, FilterManager should log a warn
    if more than one filter define the same priority.
  • add filter configurations to bootstrap xml for each module
  • modify MagnoliaManagedFilter removing hardcoded filters and calling
    filter manager to obtain a sorted list of filters to apply
Comment by Sameer Charles [ 09/Aug/06 ]

Did someone started on this issue? if not I will implement as stated in the mail from fabrizio.

Comment by Sameer Charles [ 10/Aug/06 ]

Updated FilterManager so it reads filters from Configuration, its not an ObservedManager

  • All filters are configured under config/server
  • Still needs to implement FilterConfig so that you could pass parameters properly.

Wont change anything for the moment, needs more testing.

Comment by Fabrizio Giustina [ 14/Aug/06 ]

added priority handling and moved cache filter configuration to cache module. Also read parameters from jcr.
Work should be completed now, only need some deep test.

Comment by Philipp Bracher [ 22/Aug/06 ]

The filters are nor reinitialized by changing there configuration. If one changes for example the bypass property the server needs a restart (actually the instance is not responding any more).

The problem is that the FilterManager should call the init() method of the filters and not the MagnoliaManagedFilter.init() method.

Comment by Fabrizio Giustina [ 06/Oct/06 ]

reload issue fixed in svn

Comment by Magnolia International [ 27/Oct/06 ]

reopening to change fix version to rc4

Generated at Mon Feb 12 03:21:57 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.