Package org.apache.sling.installer.api.tasks

# Interface InstallTaskFactory

@ConsumerType public interface InstallTaskFactory
The install task factory creates a task for a given resource. An install task factory is a plugin service that checks a resource if it is installable by this plugin and creates an appropriate task.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`NAME`
Optional service registration property setting a unique name for the task factory.

## Method Summary

Modifier and Type
Method
Description
`InstallTask`
`createTask(TaskResourceGroup group)`
Creates an `InstallTask` for the resource or `null` if the factory does not support the resource.

## Field Details

### NAME

static final String NAME
Optional service registration property setting a unique name for the task factory. The value of this property must be of type String.

Since:
  1.4.0
See Also:
  - Constant Field Values

## Method Details

### createTask

InstallTask createTask(TaskResourceGroup group)
Creates an `InstallTask` for the resource or `null` if the factory does not support the resource. The factory should not alter the state of the resources, therefore it's not allowed to call one of the setState methods on the task resource group!

Parameters:
  `group` - The group containing the resource to activate.
Returns:
  An install task or `null`.