org.fedoraproject.xmvn.config.Configuration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xmvn-api Show documentation
Show all versions of xmvn-api Show documentation
This module contains public interface for functionality
implemented by XMvn Core.
The newest version!
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 2.4.0,
// any modifications will be overwritten.
// ==============================================================
package org.fedoraproject.xmvn.config;
/**
*
* Root element of the configuration file.
*
*
* @version $Revision$ $Date$
*/
@SuppressWarnings( "all" )
public class Configuration
implements java.io.Serializable, java.lang.Cloneable
{
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Field properties.
*/
private java.util.Properties properties;
/**
* Field repositories.
*/
private java.util.List repositories;
/**
* This element contains basic XMvn settings.
*/
private BuildSettings buildSettings;
/**
* Field artifactManagement.
*/
private java.util.List artifactManagement;
/**
* This element contains configuration of XMvn resolver.
*/
private ResolverSettings resolverSettings;
/**
* This element contains configuration of XMvn installer.
*/
private InstallerSettings installerSettings;
/**
* Field modelEncoding.
*/
private String modelEncoding = "UTF-8";
//-----------/
//- Methods -/
//-----------/
/**
* Method addArtifactManagement.
*
* @param packagingRule a packagingRule object.
*/
public void addArtifactManagement( PackagingRule packagingRule )
{
getArtifactManagement().add( packagingRule );
} //-- void addArtifactManagement( PackagingRule )
/**
* Method addProperty.
*
* @param key a key object.
* @param value a value object.
*/
public void addProperty( String key, String value )
{
getProperties().put( key, value );
} //-- void addProperty( String, String )
/**
* Method addRepository.
*
* @param repository a repository object.
*/
public void addRepository( Repository repository )
{
getRepositories().add( repository );
} //-- void addRepository( Repository )
/**
* Method clone.
*
* @return Configuration
*/
public Configuration clone()
{
try
{
Configuration copy = (Configuration) super.clone();
if ( this.properties != null )
{
copy.properties = (java.util.Properties) this.properties.clone();
}
if ( this.repositories != null )
{
copy.repositories = new java.util.ArrayList();
for ( Repository item : this.repositories )
{
copy.repositories.add( ( (Repository) item).clone() );
}
}
if ( this.buildSettings != null )
{
copy.buildSettings = (BuildSettings) this.buildSettings.clone();
}
if ( this.artifactManagement != null )
{
copy.artifactManagement = new java.util.ArrayList();
for ( PackagingRule item : this.artifactManagement )
{
copy.artifactManagement.add( ( (PackagingRule) item).clone() );
}
}
if ( this.resolverSettings != null )
{
copy.resolverSettings = (ResolverSettings) this.resolverSettings.clone();
}
if ( this.installerSettings != null )
{
copy.installerSettings = (InstallerSettings) this.installerSettings.clone();
}
return copy;
}
catch ( java.lang.Exception ex )
{
throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
+ " does not support clone()" ).initCause( ex );
}
} //-- Configuration clone()
/**
* Method getArtifactManagement.
*
* @return List
*/
public java.util.List getArtifactManagement()
{
if ( this.artifactManagement == null )
{
this.artifactManagement = new java.util.ArrayList();
}
return this.artifactManagement;
} //-- java.util.List getArtifactManagement()
/**
* Get this element contains basic XMvn settings.
*
* @return BuildSettings
*/
public BuildSettings getBuildSettings()
{
return this.buildSettings;
} //-- BuildSettings getBuildSettings()
/**
* Get this element contains configuration of XMvn installer.
*
* @return InstallerSettings
*/
public InstallerSettings getInstallerSettings()
{
return this.installerSettings;
} //-- InstallerSettings getInstallerSettings()
/**
* Get the modelEncoding field.
*
* @return String
*/
public String getModelEncoding()
{
return this.modelEncoding;
} //-- String getModelEncoding()
/**
* Method getProperties.
*
* @return Properties
*/
public java.util.Properties getProperties()
{
if ( this.properties == null )
{
this.properties = new java.util.Properties();
}
return this.properties;
} //-- java.util.Properties getProperties()
/**
* Method getRepositories.
*
* @return List
*/
public java.util.List getRepositories()
{
if ( this.repositories == null )
{
this.repositories = new java.util.ArrayList();
}
return this.repositories;
} //-- java.util.List getRepositories()
/**
* Get this element contains configuration of XMvn resolver.
*
* @return ResolverSettings
*/
public ResolverSettings getResolverSettings()
{
return this.resolverSettings;
} //-- ResolverSettings getResolverSettings()
/**
* Method removeArtifactManagement.
*
* @param packagingRule a packagingRule object.
*/
public void removeArtifactManagement( PackagingRule packagingRule )
{
getArtifactManagement().remove( packagingRule );
} //-- void removeArtifactManagement( PackagingRule )
/**
* Method removeRepository.
*
* @param repository a repository object.
*/
public void removeRepository( Repository repository )
{
getRepositories().remove( repository );
} //-- void removeRepository( Repository )
/**
* Set this element configures how artifacts should be assigned
* to individual packages.
*
* @param artifactManagement a artifactManagement object.
*/
public void setArtifactManagement( java.util.List artifactManagement )
{
this.artifactManagement = artifactManagement;
} //-- void setArtifactManagement( java.util.List )
/**
* Set this element contains basic XMvn settings.
*
* @param buildSettings a buildSettings object.
*/
public void setBuildSettings( BuildSettings buildSettings )
{
this.buildSettings = buildSettings;
} //-- void setBuildSettings( BuildSettings )
/**
* Set this element contains configuration of XMvn installer.
*
* @param installerSettings a installerSettings object.
*/
public void setInstallerSettings( InstallerSettings installerSettings )
{
this.installerSettings = installerSettings;
} //-- void setInstallerSettings( InstallerSettings )
/**
* Set the modelEncoding field.
*
* @param modelEncoding a modelEncoding object.
*/
public void setModelEncoding( String modelEncoding )
{
this.modelEncoding = modelEncoding;
} //-- void setModelEncoding( String )
/**
* Set this element lists system Java properties that should be
* set before XMvn build is started.
*
* @param properties a properties object.
*/
public void setProperties( java.util.Properties properties )
{
this.properties = properties;
} //-- void setProperties( java.util.Properties )
/**
* Set list of repositories. Repositories can be used by
* resolvers as source of artifacts, by installers as target
* where artifacts should be installed, or by any other
* component.
*
* @param repositories a repositories object.
*/
public void setRepositories( java.util.List repositories )
{
this.repositories = repositories;
} //-- void setRepositories( java.util.List )
/**
* Set this element contains configuration of XMvn resolver.
*
* @param resolverSettings a resolverSettings object.
*/
public void setResolverSettings( ResolverSettings resolverSettings )
{
this.resolverSettings = resolverSettings;
} //-- void setResolverSettings( ResolverSettings )
}