Class ExtensionUtils
- java.lang.Object
-
- org.apache.sling.scripting.sightly.impl.engine.extension.ExtensionUtils
-
public class ExtensionUtils extends Object
Helper class forRuntimeExtensionimplementations.
-
-
Constructor Summary
Constructors Constructor Description ExtensionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckArgumentCount(String extensionName, Object[] arguments, int count)Helper method for checking if the number of arguments passed to aRuntimeExtensionare equal to what the extension requires.static Map<String,Object>setRequestAttributes(org.apache.sling.api.SlingHttpServletRequest request, Map<String,Object> newRequestAttributes)Helper method for setting specific attributes in aSlingHttpServletRequestscope
-
-
-
Method Detail
-
checkArgumentCount
public static void checkArgumentCount(String extensionName, Object[] arguments, int count)
Helper method for checking if the number of arguments passed to aRuntimeExtensionare equal to what the extension requires.- Parameters:
extensionName- the name of the extensionarguments- the arguments arraycount- the expected number or arguments- Throws:
org.apache.sling.scripting.sightly.SightlyException- if the number of supplied arguments differs from what's expected
-
-