Package org.xwiki.uiextension.script
Class UIExtensionScriptService
- java.lang.Object
-
- org.xwiki.uiextension.script.UIExtensionScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Named("uix") @Singleton public class UIExtensionScriptService extends Object implements org.xwiki.script.service.ScriptService
Allows scripts to easily access Interface Extensions APIs.- Since:
- 4.2M3
- Version:
- $Id: faf41b009484088f69cddfa5c1c88c4d9dd6c7f6 $
-
-
Constructor Summary
Constructors Constructor Description UIExtensionScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<UIExtension>
getExtensions(String extensionPointId)
Retrieves all theUIExtension
s for a given Extension Point.List<UIExtension>
getExtensions(String extensionPointId, Map<String,String> filters)
Retrieves the list ofUIExtension
for a given Extension Point.
-
-
-
Method Detail
-
getExtensions
public List<UIExtension> getExtensions(String extensionPointId)
Retrieves all theUIExtension
s for a given Extension Point.- Parameters:
extensionPointId
- The ID of the Extension Point to retrieve theUIExtension
s for- Returns:
- the list of
UIExtension
for the given Extension Point
-
getExtensions
public List<UIExtension> getExtensions(String extensionPointId, Map<String,String> filters)
Retrieves the list ofUIExtension
for a given Extension Point. Examples:- Get only the
UIExtension
s with the given IDs for the Extension Point "platform.example"$services.uix.getExtensions('platform.example', {'select' : 'id1, id2, id3'})
- Get all the
UIExtension
s for the Extension Point "platform.example" except theUIExtension
s with the IDs "id2" and "id3"$services.uix.getExtensions('platform.example', {'exclude' : 'id2, id3'})
- Get all the
UIExtension
s for the Extension Point "platform.example" and order them by one of their parameter$services.uix.getExtensions('platform.example', {'sortByParameter' : 'parameterKey'})
- Get only the
UIExtension
s with the given IDs for the Extension Point "platform.example" and order them by one of their parameter$services.uix.getExtensions('platform.example', {'select' : 'id1, id2, id3', 'sortByParameter' : 'parameterKey'})
- Parameters:
extensionPointId
- The ID of the Extension Point to retrieve theUIExtension
s forfilters
- Optional filters to apply before retrieving the list- Returns:
- the list of
UIExtension
for the given Extension Point
- Get only the
-
-