Package org.xwiki.edit.script
Class EditScriptService
- java.lang.Object
-
- org.xwiki.edit.script.EditScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Singleton @Named("edit") public class EditScriptService extends Object implements org.xwiki.script.service.ScriptService
Script oriented edit APIs.- Since:
- 8.2RC1
- Version:
- $Id: 1767758f170254463b30985e0cf56e46f2cc8ba8 $
-
-
Constructor Summary
Constructors Constructor Description EditScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <S extends org.xwiki.script.service.ScriptService>
Sget(String serviceName)
<D> Editor<D>
getDefaultEditor(Type dataType)
<D> Editor<D>
getDefaultEditor(Type dataType, String category)
String
getDefaultEditorId(Type dataType)
String
getDefaultEditorId(Type dataType, String category)
<D> Editor<D>
getEditor(Type dataType, String hint)
<D> List<Editor<D>>
getEditors(Type dataType)
<D> List<Editor<D>>
getEditors(Type dataType, String category)
-
-
-
Field Detail
-
ROLE_HINT
public static final String ROLE_HINT
The role hint of this component.- See Also:
- Constant Field Values
-
-
Method Detail
-
getEditors
public <D> List<Editor<D>> getEditors(Type dataType)
- Type Parameters:
D
- the data type- Parameters:
dataType
- the data type- Returns:
- the list of editors that can edit the specified type of data
-
getEditors
public <D> List<Editor<D>> getEditors(Type dataType, String category)
- Type Parameters:
D
- the data type- Parameters:
dataType
- the data typecategory
- the editor category- Returns:
- the list of editors that have the specified category and which are associated with the given data type
-
getDefaultEditor
public <D> Editor<D> getDefaultEditor(Type dataType)
- Type Parameters:
D
- the data type- Parameters:
dataType
- the data type- Returns:
- the configured default editor associated with the specified data type
-
getDefaultEditor
public <D> Editor<D> getDefaultEditor(Type dataType, String category)
- Type Parameters:
D
- the data type- Parameters:
dataType
- the data typecategory
- the editor category- Returns:
- the configured default editor that has the specified category and which is associated with the given data type
-
getDefaultEditorId
public String getDefaultEditorId(Type dataType)
- Parameters:
dataType
- the data type- Returns:
- the id of the configured default editor associated with the specified data type
-
getDefaultEditorId
public String getDefaultEditorId(Type dataType, String category)
- Parameters:
dataType
- the data typecategory
- the editor category- Returns:
- the id of the configured default editor for the specified category and which is associated with the given data type
-
get
public <S extends org.xwiki.script.service.ScriptService> S get(String serviceName)
- Type Parameters:
S
- theScriptService
type- Parameters:
serviceName
- the name of the subScriptService
- Returns:
- the sub
ScriptService
with the specified name, ornull
if none could be found
-
-