-
-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
XWIKI-18998: Replace the Livetable of the System Filters of the Notif…
…ications Administration with a Live Data macro (#2827)
- Loading branch information
1 parent
0c92506
commit 3a375b0
Showing
32 changed files
with
4,785 additions
and
499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...latform-core/xwiki-platform-livedata/xwiki-platform-livedata-webjar/src/main/vue/main.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
import displayerMixin from "./displayers/displayerMixin.js"; | ||
import BaseDisplayer from "./displayers/BaseDisplayer.vue"; | ||
import XWikiIcon from "./utilities/XWikiIcon.vue"; | ||
import XWikiLivedata from "./XWikiLivedata.vue" | ||
|
||
// Export the elements that are expected to be imported from other modules. | ||
export { | ||
displayerMixin, | ||
BaseDisplayer, | ||
XWikiIcon, | ||
XWikiLivedata | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...ications/filters/internal/livedata/NotificationFilterPreferenceConfigurationResolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
package org.xwiki.notifications.filters.internal.livedata; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
|
||
import org.xwiki.component.annotation.Component; | ||
import org.xwiki.livedata.LiveDataConfiguration; | ||
import org.xwiki.livedata.LiveDataConfigurationResolver; | ||
import org.xwiki.livedata.LiveDataEntryDescriptor; | ||
import org.xwiki.livedata.LiveDataException; | ||
import org.xwiki.livedata.LiveDataPropertyDescriptorStore; | ||
import org.xwiki.livedata.internal.JSONMerge; | ||
|
||
import static org.xwiki.notifications.filters.internal.livedata.NotificationFilterPreferenceLiveDataSource.NOTIFICATION_FILTER_PREFERENCE; | ||
import static org.xwiki.notifications.filters.internal.livedata.NotificationFilterPreferencePropertyDescriptorStore.FILTER_PREFERENCE_ID; | ||
|
||
/** | ||
* @version $Id$ | ||
* @since 16.1.0RC1 | ||
*/ | ||
@Component | ||
@Named(NOTIFICATION_FILTER_PREFERENCE) | ||
@Singleton | ||
public class NotificationFilterPreferenceConfigurationResolver | ||
implements LiveDataConfigurationResolver<LiveDataConfiguration> | ||
{ | ||
@Inject | ||
@Named(NOTIFICATION_FILTER_PREFERENCE) | ||
private LiveDataPropertyDescriptorStore liveDataPropertyDescriptorStore; | ||
|
||
@Override | ||
public LiveDataConfiguration resolve(LiveDataConfiguration input) throws LiveDataException | ||
{ | ||
LiveDataConfiguration liveDataConfiguration = new LiveDataConfiguration(); | ||
liveDataConfiguration.getMeta().setPropertyDescriptors(this.liveDataPropertyDescriptorStore.get()); | ||
LiveDataEntryDescriptor entryDescriptor = new LiveDataEntryDescriptor(); | ||
entryDescriptor.setIdProperty(FILTER_PREFERENCE_ID); | ||
liveDataConfiguration.getMeta().setEntryDescriptor(entryDescriptor); | ||
return new JSONMerge().merge(input, liveDataConfiguration); | ||
} | ||
} |
Oops, something went wrong.