org.ops4j.pax.exam.container.def.options
Class ProfileOption

java.lang.Object
  extended by org.ops4j.pax.exam.container.def.options.ProfileOption
All Implemented Interfaces:
Option

public class ProfileOption
extends java.lang.Object
implements Option

Option specifying a Pax runner provisioning profile.

Since:
0.3.0, December 08, 2008
Author:
Alin Dreghiciu (adreghiciu@gmail.com)

Constructor Summary
ProfileOption(java.lang.String name)
          Constructor.
ProfileOption(java.lang.String name, java.lang.String version)
          Constructor.
 
Method Summary
 java.lang.String getProfile()
          Getter.
 java.lang.String toString()
          
 ProfileOption version(java.lang.String version)
          Sets the profile version or version range.
 ProfileOption versionAsInProject()
          Discovers the profile version out of the project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProfileOption

public ProfileOption(java.lang.String name)
Constructor.

Parameters:
name - profile name (cannot be null or empty)
Throws:
java.lang.IllegalArgumentException - - If name is null or empty

ProfileOption

public ProfileOption(java.lang.String name,
                     java.lang.String version)
Constructor.

Parameters:
name - profile name (cannot be null or empty)
version - profile version (cannot be empty)
Throws:
java.lang.IllegalArgumentException - - If name is null or empty
Method Detail

getProfile

public java.lang.String getProfile()
Getter.

Returns:
profile (cannot be null or empty)

version

public ProfileOption version(java.lang.String version)
Sets the profile version or version range. Do not set (use this method) if the latest version should be discovered and used)

Parameters:
version - artifact version / version range (cannot be empty)
Returns:
itself, for fluent api usage
Throws:
java.lang.IllegalArgumentException - - If version is empty

versionAsInProject

public ProfileOption versionAsInProject()
Discovers the profile version out of the project. To do so, the maven project should have a dependency on the profile and Pax Exam maven plugin configured to run the "generate-depends-file" goal.

Returns:
itself, for fluent api usage

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


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