org.apache.sling.installer.api.tasks
Interface InstallationContext


public interface InstallationContext

Context for the installation tasks. The context is passed into an InstallTask during execution of a task. The task can schedule tasks to the current or next execution cycle. In addition access to an audit log is provided. The task should make an entry into the log each time a task has succeeded like something has been installed, updated or deleted.


Method Summary
 void addAsyncTask(InstallTask t)
          Deprecated. A async task should return true for InstallTask.isAsynchronousTask() and be add with addTaskToCurrentCycle(InstallTask)
 void addTaskToCurrentCycle(InstallTask t)
          Schedule a task for execution in the current cycle.
 void addTaskToNextCycle(InstallTask t)
          Deprecated.  
 void asyncTaskFailed(InstallTask t)
          Inform the installer about a failed async task.
 void log(java.lang.String message, java.lang.Object... args)
          Make an entry into the audit log - this should be invoked by the tasks whenever something has been installed/uninstalled etc.
 

Method Detail

addTaskToCurrentCycle

void addTaskToCurrentCycle(InstallTask t)
Schedule a task for execution in the current cycle.


addTaskToNextCycle

@Deprecated
void addTaskToNextCycle(InstallTask t)
Deprecated. 

Schedule a task for execution in the next cycle, usually to indicate that a task must be retried or the current task is finished and another task has to be run.


log

void log(java.lang.String message,
         java.lang.Object... args)
Make an entry into the audit log - this should be invoked by the tasks whenever something has been installed/uninstalled etc.


addAsyncTask

@Deprecated
void addAsyncTask(InstallTask t)
Deprecated. A async task should return true for InstallTask.isAsynchronousTask() and be add with addTaskToCurrentCycle(InstallTask)

Add an async task. This adds a task for asynchronous execution.

Since:
1.2.0

asyncTaskFailed

void asyncTaskFailed(InstallTask t)
Inform the installer about a failed async task. This will restart the OSGi installer. This will also remove the InstallTask.ASYNC_ATTR_NAME attribute from the resource.

Since:
1.3.0


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.