Package net.shibboleth.idp.profile.logic

# Class ScriptedPredicate

java.lang.Object
net.shibboleth.shared.scripting.AbstractScriptEvaluator
net.shibboleth.shared.logic.ScriptedPredicate<ProfileRequestContext>
net.shibboleth.profile.context.logic.ScriptedPredicate
net.shibboleth.idp.profile.logic.ScriptedPredicate

All Implemented Interfaces:
  `Predicate<ProfileRequestContext>`

@Deprecated(since="5.0.0", forRemoval=true) public class ScriptedPredicate extends ScriptedPredicate
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated stub for relocated class.

## Field Summary

### Fields inherited from class net.shibboleth.shared.scripting.AbstractScriptEvaluator

`DEFAULT_ENGINE`

## Constructor Summary

Constructors
Constructor
Description
`ScriptedPredicate(EvaluableScript theScript)`
Deprecated, for removal: This API element is subject to removal in a future version.
Constructor.
`ScriptedPredicate(EvaluableScript theScript, String extraInfo)`
Deprecated, for removal: This API element is subject to removal in a future version.
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static ScriptedPredicate`
`inlineScript(String scriptSource)`
Deprecated, for removal: This API element is subject to removal in a future version.
Factory to create `ScriptedPredicate` from inline data.
`static ScriptedPredicate`
`inlineScript(String engineName, String scriptSource)`
Deprecated, for removal: This API element is subject to removal in a future version.
Factory to create `ScriptedPredicate` from inline data.
`static ScriptedPredicate`
`resourceScript(String engineName, Resource resource)`
Deprecated, for removal: This API element is subject to removal in a future version.
Factory to create `ScriptedPredicate` from a `Resource`.
`static ScriptedPredicate`
`resourceScript(Resource resource)`
Deprecated, for removal: This API element is subject to removal in a future version.
Factory to create `ScriptedPredicate` from a `Resource`.

### Methods inherited from class net.shibboleth.profile.context.logic.ScriptedPredicate

`prepareContext, resourceScript, resourceScript`

### Methods inherited from class net.shibboleth.shared.logic.ScriptedPredicate

`getInputType, setInputType, setReturnOnError, test`

### Methods inherited from class net.shibboleth.shared.scripting.AbstractScriptEvaluator

`evaluate, finalizeContext, getCustomObject, getHideExceptions, getLogPrefix, getOutputType, getReturnOnError, setContextExtenders, setCustomObject, setHideExceptions, setLogPrefix, setOutputType, setReturnOnError`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Predicate

`and, negate, or`

## Constructor Details

### ScriptedPredicate

public ScriptedPredicate(@Nonnull @NotEmpty @ParameterName(name="theScript") EvaluableScript theScript, @Nullable @NotEmpty @ParameterName(name="extraInfo") String extraInfo)
Deprecated, for removal: This API element is subject to removal in a future version.
Constructor.

Parameters:
  `theScript` - the script we will evaluate.
  `extraInfo` - debugging information.

### ScriptedPredicate

public ScriptedPredicate(@Nonnull @NotEmpty @ParameterName(name="theScript") EvaluableScript theScript)
Deprecated, for removal: This API element is subject to removal in a future version.
Constructor.

Parameters:
  `theScript` - the script we will evaluate.

## Method Details

### resourceScript

public static ScriptedPredicate resourceScript(@Nonnull @NotEmpty String engineName, @Nonnull Resource resource) throws ScriptException, IOException, ComponentInitializationException
Deprecated, for removal: This API element is subject to removal in a future version.
Factory to create `ScriptedPredicate` from a `Resource`.

Parameters:
  `resource` - the resource to look at
  `engineName` - the language
Returns:
  the predicate
Throws:
  `ScriptException` - if the compile fails
  `IOException` - if the file doesn't exist.
  `ComponentInitializationException` - if the scripting initialization fails

### resourceScript

public static ScriptedPredicate resourceScript(@Nonnull Resource resource) throws ScriptException, IOException, ComponentInitializationException
Deprecated, for removal: This API element is subject to removal in a future version.
Factory to create `ScriptedPredicate` from a `Resource`.

Parameters:
  `resource` - the resource to look at
Returns:
  the predicate
Throws:
  `ScriptException` - if the compile fails
  `IOException` - if the file doesn't exist.
  `ComponentInitializationException` - if the scripting initialization fails

### inlineScript

public static ScriptedPredicate inlineScript(@Nonnull @NotEmpty String engineName, @Nonnull @NotEmpty String scriptSource) throws ScriptException, ComponentInitializationException
Deprecated, for removal: This API element is subject to removal in a future version.
Factory to create `ScriptedPredicate` from inline data.

Parameters:
  `scriptSource` - the script, as a string
  `engineName` - the language
Returns:
  the predicate
Throws:
  `ScriptException` - if the compile fails
  `ComponentInitializationException` - if the scripting initialization fails

### inlineScript

public static ScriptedPredicate inlineScript(@Nonnull @NotEmpty String scriptSource) throws ScriptException, ComponentInitializationException
Deprecated, for removal: This API element is subject to removal in a future version.
Factory to create `ScriptedPredicate` from inline data.

Parameters:
  `scriptSource` - the script, as a string
Returns:
  the predicate
Throws:
  `ScriptException` - if the compile fails
  `ComponentInitializationException` - if the script object fails to initialize