org.ops4j.pax.exam.options
Class AbstractProvisionControl<T extends AbstractProvisionControl>

java.lang.Object
  extended by org.ops4j.pax.exam.options.AbstractProvisionControl<T>
All Implemented Interfaces:
ProvisionControl<T>
Direct Known Subclasses:
AbstractProvisionOption

public abstract class AbstractProvisionControl<T extends AbstractProvisionControl>
extends java.lang.Object
implements ProvisionControl<T>

Abstract implementation of ProvisionControl.

Since:
04 27, 2009
Author:
Alin Dreghiciu (adreghiciu@gmail.com)

Constructor Summary
AbstractProvisionControl()
          Constructor.
 
Method Summary
 java.lang.Integer getStartLevel()
          The start level for the provisioned bundle(s).
protected abstract  T itself()
          Implemented by sub classes in order to return itself (this) for fluent api usage
 T noStart()
          Setter.
 T noUpdate()
          Setter.
 boolean shouldStart()
          If the provisioned bundle(s) should be started.
 boolean shouldUpdate()
          If the provisioned bundle(s) should be updated (re-downloaded).
 T start()
          Setter.
 T start(java.lang.Boolean shouldStart)
          Setter.
 T startLevel(java.lang.Integer startLevel)
          Setter.
 T update()
          Setter.
 T update(java.lang.Boolean shouldUpdate)
          Setter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProvisionControl

public AbstractProvisionControl()
Constructor.

Method Detail

shouldUpdate

public boolean shouldUpdate()
If the provisioned bundle(s) should be updated (re-downloaded). By default bundles should be updated.

Specified by:
shouldUpdate in interface ProvisionControl<T extends AbstractProvisionControl>
Returns:
true if the bundle(s) should be updated, false otherwise.

update

public T update(java.lang.Boolean shouldUpdate)
Setter.

Specified by:
update in interface ProvisionControl<T extends AbstractProvisionControl>
Parameters:
shouldUpdate - true if the provisioned bundle(s) should be updated, false otherwise
Returns:
itself, for fluent api usage

update

public T update()
Setter. Specifyies that the provisioned bundle(s) should be updated.

Specified by:
update in interface ProvisionControl<T extends AbstractProvisionControl>
Returns:
itself, for fluent api usage

noUpdate

public T noUpdate()
Setter. Specifyies that the provisioned bundle(s) should not be updated.

Specified by:
noUpdate in interface ProvisionControl<T extends AbstractProvisionControl>
Returns:
itself, for fluent api usage

shouldStart

public boolean shouldStart()
If the provisioned bundle(s) should be started. By default bundles should be started.

Specified by:
shouldStart in interface ProvisionControl<T extends AbstractProvisionControl>
Returns:
true if the bundle(s) should be started, false otherwise.

start

public T start(java.lang.Boolean shouldStart)
Setter.

Specified by:
start in interface ProvisionControl<T extends AbstractProvisionControl>
Parameters:
shouldStart - true if the provisioned bundle(s) should be started, false otherwise
Returns:
itself, for fluent api usage

start

public T start()
Setter. Specifyies that the provisioned bundle(s) should be started.

Specified by:
start in interface ProvisionControl<T extends AbstractProvisionControl>
Returns:
itself, for fluent api usage

noStart

public T noStart()
Setter. Specifyies that the provisioned bundle(s) should not be started.

Specified by:
noStart in interface ProvisionControl<T extends AbstractProvisionControl>
Returns:
itself, for fluent api usage

getStartLevel

public java.lang.Integer getStartLevel()
The start level for the provisioned bundle(s).

Specified by:
getStartLevel in interface ProvisionControl<T extends AbstractProvisionControl>
Returns:
start level. If the returned value is null, default behavior will be used

startLevel

public T startLevel(java.lang.Integer startLevel)
Setter.

Specified by:
startLevel in interface ProvisionControl<T extends AbstractProvisionControl>
Parameters:
startLevel - start level of the provisioned bundle(s)
Returns:
itself, for fluent api usage

itself

protected abstract T itself()
Implemented by sub classes in order to return itself (this) for fluent api usage

Returns:
itself


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.