Use the standard coding conventions.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@400220 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2006-05-06 00:34:42 +00:00
parent 315ddee9da
commit d03ae071f5
2 changed files with 50 additions and 26 deletions

View File

@ -14,18 +14,21 @@ package org.apache.maven.embedder;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.codehaus.plexus.PlexusContainer;
/**
* Instances of this interface can be user upon start of the embedder to customize
* the components in the plexus container.
*
* @author mkleint
*/
public interface ContainerCustomizer {
public interface ContainerCustomizer
{
/**
* callback from embedder's start() method that allows to customize the components
* in the container.
*/
void customize(PlexusContainer container);
void customize( PlexusContainer container );
}

View File

@ -19,16 +19,20 @@ import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.settings.Settings;
/**
* Default implementation of MavenEmbedRequest intefrace.
*
* @author mkleint
*/
public class DefaultMavenEmbedRequest implements MavenEmbedRequest {
public class DefaultMavenEmbedRequest
implements MavenEmbedRequest
{
private List inactives;
private List actives;
private Settings settings;
@ -39,68 +43,85 @@ public class DefaultMavenEmbedRequest implements MavenEmbedRequest {
private ContainerCustomizer customizer;
/** Creates a new instance of DefaultMavenEmbedRequest */
public DefaultMavenEmbedRequest() {
/**
* Creates a new instance of DefaultMavenEmbedRequest
*/
public DefaultMavenEmbedRequest()
{
}
public MavenEmbedRequest addActiveProfile(String profile) {
getActiveProfiles().add(profile);
public MavenEmbedRequest addActiveProfile( String profile )
{
getActiveProfiles().add( profile );
return this;
}
public MavenEmbedRequest addInactiveProfile(String profile) {
getInactiveProfiles().add(profile);
public MavenEmbedRequest addInactiveProfile( String profile )
{
getInactiveProfiles().add( profile );
return this;
}
public MavenEmbedRequest addActiveProfiles(List profiles) {
getActiveProfiles().addAll(profiles);
public MavenEmbedRequest addActiveProfiles( List profiles )
{
getActiveProfiles().addAll( profiles );
return this;
}
public MavenEmbedRequest addInactiveProfiles(List profiles) {
getInactiveProfiles().addAll(profiles);
public MavenEmbedRequest addInactiveProfiles( List profiles )
{
getInactiveProfiles().addAll( profiles );
return this;
}
public List getActiveProfiles() {
if (actives == null) {
public List getActiveProfiles()
{
if ( actives == null )
{
actives = new ArrayList();
}
return actives;
}
public List getInactiveProfiles() {
if (inactives == null) {
public List getInactiveProfiles()
{
if ( inactives == null )
{
inactives = new ArrayList();
}
return inactives;
}
public MavenEmbedRequest setUserSettingsFile(File user) {
public MavenEmbedRequest setUserSettingsFile( File user )
{
userSettings = user;
return this;
}
public MavenEmbedRequest setGlobalSettingsFile(File global) {
public MavenEmbedRequest setGlobalSettingsFile( File global )
{
globalSettings = global;
return this;
}
public File getUserSettingsFile() {
public File getUserSettingsFile()
{
return userSettings;
}
public File getGlobalSettingsFile() {
public File getGlobalSettingsFile()
{
return globalSettings;
}
public MavenEmbedRequest setConfigurationCustomizer(ContainerCustomizer customizer) {
public MavenEmbedRequest setConfigurationCustomizer( ContainerCustomizer customizer )
{
this.customizer = customizer;
return this;
}
public ContainerCustomizer getContainerCustomizer() {
public ContainerCustomizer getContainerCustomizer()
{
return customizer;
}