OF-2398: Admin console: add visual indication of MUC room being locked
MUC rooms can be 'locked', which typically occurs when they are initially being created and configured. When a MUC room is 'locked', it cannot be entered by users.
The Openfire admin console should make it possible for an administrator to see if a room is locked.
This commit replaces the value in the 'users' column on the room summary page with a 'lock' icon, and displays a warning on the room settings page, when the room is locked.
Dan Caseley <dan@caseley.me.uk>
3f79e346c0f6ca381c90a6b40206566dd10a7309
OF-2383: Protect from group name changes with invalid names
Blank names, changing from a non-existent group, changing to an already-existent group
DBUnit implies JUnit 3
The way that this test class uses DBUnit inherits a JUnit 3 style of testcase setup. This means that test annotations (as provided by JUnit 4) are not used/ignored. This commit removes those annotations, to avoid confusion.
Additionally, static fields from GroupProvider are cleaned up after test execution, to avoid their values leaking to other test classes.
Group Sharing: rework caching
Warning: this introduces a potential breaking change to proprietary sub-classes of AbstractGroupProvider that are _not_ read-only (if anyone that maintains such an implementation and reads this, get in contact and I'll buy you a beer). After this commit, these implementations should explicitly call the 'super' methods that they override, to ensure that the cache of shared groups remains consistent. The changes that are needed are similar to the changes that are applied in this commit to DefaultGroupProvider.
Maintenance of the cache in which metadata related to group sharing is stored is now managed 'directly', rather than as dependent on an event listener.
Cache maintenance as implemented in this commit is very simple: on any change, the the entire cache is cleared. This can probably be improved on, but that will increase complexity, which increases the risk of bugs. As changes to groups are expected to be infrequent, the blunt 'clear all' is expected to be a acceptable trade-off.
Additional unit tests have been added to verify the behavior of caches. Specifically, these new tests try to warm up a cache, then apply a change to state that is expected to be cached, then retrieves the entity that's expected to was cached again. The test then asserts that the change is visible.