org.apache.maven.model.profile
Class DefaultProfileSelector

java.lang.Object
  extended by org.apache.maven.model.profile.DefaultProfileSelector
All Implemented Interfaces:
ProfileSelector

@Component(role=ProfileSelector.class)
public class DefaultProfileSelector
extends Object
implements ProfileSelector

Calculates the active profiles among a given collection of profiles.

Author:
Benjamin Bentmann

Constructor Summary
DefaultProfileSelector()
           
 
Method Summary
 DefaultProfileSelector addProfileActivator(ProfileActivator profileActivator)
           
 List<Profile> getActiveProfiles(Collection<Profile> profiles, ProfileActivationContext context, ModelProblemCollector problems)
          Determines the profiles which are active in the specified activation context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultProfileSelector

public DefaultProfileSelector()
Method Detail

addProfileActivator

public DefaultProfileSelector addProfileActivator(ProfileActivator profileActivator)

getActiveProfiles

public List<Profile> getActiveProfiles(Collection<Profile> profiles,
                                       ProfileActivationContext context,
                                       ModelProblemCollector problems)
Description copied from interface: ProfileSelector
Determines the profiles which are active in the specified activation context. Active profiles will eventually be injected into the model.

Specified by:
getActiveProfiles in interface ProfileSelector
Parameters:
profiles - The profiles whose activation status should be determined, must not be null.
context - The environmental context used to determine the activation status of a profile, must not be null.
problems - The container used to collect problems that were encountered, must not be null.
Returns:
The profiles that have been activated, never null.


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.