Package org.codehaus.mojo.flatten
Class FlattenDescriptor
- java.lang.Object
-
- org.codehaus.mojo.flatten.FlattenDescriptor
-
public class FlattenDescriptor extends java.lang.Object
The descriptor that defines the additional POM elements that should be kept and copied to flattened POM.- Since:
- 1.0.0-beta-2
-
-
Field Summary
Fields Modifier and Type Field Description private ElementHandling
defaultOperation
private java.util.Map<java.lang.String,ElementHandling>
name2handlingMap
-
Constructor Summary
Constructors Constructor Description FlattenDescriptor()
The constructor.FlattenDescriptor(org.codehaus.plexus.util.xml.Xpp3Dom descriptor)
The constructor.
-
Method Summary
-
-
-
Field Detail
-
name2handlingMap
private final java.util.Map<java.lang.String,ElementHandling> name2handlingMap
-
defaultOperation
private ElementHandling defaultOperation
-
-
Method Detail
-
getDefaultOperation
public ElementHandling getDefaultOperation()
-
setDefaultOperation
public void setDefaultOperation(ElementHandling defaultOperation)
-
getHandling
public ElementHandling getHandling(PomProperty<?> property)
Generic method to get aElementHandling
.- Parameters:
property
- is thePomProperty
such asPomProperty.NAME
.- Returns:
- the
ElementHandling
. Will beflattened
as fallback if undefined.
-
setHandling
public void setHandling(PomProperty<?> property, ElementHandling handling)
Generic method to set anElementHandling
.- Parameters:
property
- is thePomProperty
such asPomProperty.NAME
.handling
- the newElementHandling
.
-
getArtifactId
public ElementHandling getArtifactId()
- Returns:
ElementHandling
forartifactId
.
-
setArtifactId
public void setArtifactId(ElementHandling artifactId)
- Parameters:
artifactId
- theartifactId
to set.
-
getGroupId
public ElementHandling getGroupId()
- Returns:
ElementHandling
forgroupId
.
-
setGroupId
public void setGroupId(ElementHandling groupId)
- Parameters:
groupId
- thegroupId
to set.
-
getPackaging
public ElementHandling getPackaging()
- Returns:
ElementHandling
forpackaging
.
-
setPackaging
public void setPackaging(ElementHandling packaging)
- Parameters:
packaging
- thepackaging
to set.
-
getName
public ElementHandling getName()
- Returns:
ElementHandling
forname
.
-
setName
public void setName(ElementHandling name)
- Parameters:
name
- thename
to set.
-
getDescription
public ElementHandling getDescription()
- Returns:
ElementHandling
fordescription
.
-
setDescription
public void setDescription(ElementHandling description)
- Parameters:
description
- thedescription
to set.
-
getUrl
public ElementHandling getUrl()
- Returns:
ElementHandling
forURL
.
-
setUrl
public void setUrl(ElementHandling url)
- Parameters:
url
- theURL
to set.
-
getInceptionYear
public ElementHandling getInceptionYear()
- Returns:
ElementHandling
forinceptionYear
.
-
setInceptionYear
public void setInceptionYear(ElementHandling inceptionYear)
- Parameters:
inceptionYear
- the inceptionYear to set
-
getOrganization
public ElementHandling getOrganization()
- Returns:
ElementHandling
fororganization
.
-
setOrganization
public void setOrganization(ElementHandling organization)
- Parameters:
organization
- theorganization
to set.
-
getScm
public ElementHandling getScm()
- Returns:
ElementHandling
forSCM
.
-
setScm
public void setScm(ElementHandling scm)
- Parameters:
scm
- thescm
to set.
-
getPrerequisites
public ElementHandling getPrerequisites()
- Returns:
ElementHandling
forprerequisites
.
-
setPrerequisites
public void setPrerequisites(ElementHandling prerequisites)
- Parameters:
prerequisites
- theprerequisites
to set.
-
getDevelopers
public ElementHandling getDevelopers()
- Returns:
ElementHandling
fordevelopers
.
-
setDevelopers
public void setDevelopers(ElementHandling developers)
- Parameters:
developers
- thedevelopers
to set.
-
getContributors
public ElementHandling getContributors()
- Returns:
ElementHandling
forcontributors
.
-
setContributors
public void setContributors(ElementHandling contributors)
- Parameters:
contributors
- thecontributors
to set.
-
getMailingLists
public ElementHandling getMailingLists()
- Returns:
ElementHandling
formailingLists
.
-
setMailingLists
public void setMailingLists(ElementHandling mailingLists)
- Parameters:
mailingLists
- themailingLists
to set.
-
getRepositories
public ElementHandling getRepositories()
- Returns:
ElementHandling
forrepositories
.
-
setRepositories
public void setRepositories(ElementHandling repositories)
- Parameters:
repositories
- therepositories
to set.
-
getPluginManagement
public ElementHandling getPluginManagement()
- Returns:
ElementHandling
forPluginConfiguration.getPluginManagement()
pluginManagement}.
-
setPluginManagement
public void setPluginManagement(ElementHandling pluginManagement)
- Parameters:
pluginManagement
- thepluginManagement
to set.
-
getPluginRepositories
public ElementHandling getPluginRepositories()
- Returns:
ElementHandling
forpluginRepositories
.
-
setPluginRepositories
public void setPluginRepositories(ElementHandling pluginRepositories)
- Parameters:
pluginRepositories
- thepluginRepositories
to set.
-
getIssueManagement
public ElementHandling getIssueManagement()
- Returns:
ElementHandling
forissueManagement
.
-
setIssueManagement
public void setIssueManagement(ElementHandling issueManagement)
- Parameters:
issueManagement
- theissueManagement
to set.
-
getCiManagement
public ElementHandling getCiManagement()
- Returns:
ElementHandling
forciManagement
.
-
setCiManagement
public void setCiManagement(ElementHandling ciManagement)
- Parameters:
ciManagement
- theciManagement
to set.
-
getDistributionManagement
public ElementHandling getDistributionManagement()
- Returns:
ElementHandling
fordistributionManagement
.
-
setDistributionManagement
public void setDistributionManagement(ElementHandling distributionManagement)
- Parameters:
distributionManagement
- thedistributionManagement
to set.
-
getDependencyManagement
public ElementHandling getDependencyManagement()
- Returns:
ElementHandling
fordependencyManagement
.
-
setDependencyManagement
public void setDependencyManagement(ElementHandling dependencyManagement)
- Parameters:
dependencyManagement
- thedependencyManagement
to set.
-
getBuild
public ElementHandling getBuild()
- Returns:
ElementHandling
forbuild
.
-
setBuild
public void setBuild(ElementHandling build)
- Parameters:
build
- thebuild
to set.
-
getParent
public ElementHandling getParent()
- Returns:
ElementHandling
forparent
.
-
setParent
public void setParent(ElementHandling parent)
- Parameters:
parent
- theparent
to set.
-
getModules
public ElementHandling getModules()
- Returns:
ElementHandling
formodules
.
-
setModules
public void setModules(ElementHandling modules)
- Parameters:
modules
- themodules
to set.
-
getProperties
public ElementHandling getProperties()
- Returns:
ElementHandling
forproperties
.
-
setProperties
public void setProperties(ElementHandling properties)
- Parameters:
properties
- theproperties
to set.
-
getReporting
public ElementHandling getReporting()
- Returns:
ElementHandling
forreporting
.
-
setReporting
public void setReporting(ElementHandling reporting)
- Parameters:
reporting
- thereporting
to set.
-
getDependencies
public ElementHandling getDependencies()
- Returns:
ElementHandling
fordependencies
.
-
setDependencies
public void setDependencies(ElementHandling dependencies)
- Parameters:
dependencies
- thedependencies
to set.
-
getProfiles
public ElementHandling getProfiles()
- Returns:
ElementHandling
forprofiles
.
-
setProfiles
public void setProfiles(ElementHandling profiles)
- Parameters:
profiles
- theprofiles
to set.
-
getVersion
public ElementHandling getVersion()
- Returns:
ElementHandling
forversion
.
-
setVersion
public void setVersion(ElementHandling version)
- Parameters:
version
- theversion
to set.
-
merge
public FlattenDescriptor merge(FlattenDescriptor descriptor)
Creates and returns a newFlattenDescriptor
with theElementHandling
s merged from this and the givenFlattenDescriptor
.- Parameters:
descriptor
- is theFlattenDescriptor
to merge with this one.- Returns:
- the merged
FlattenDescriptor
.
-
isEmpty
public boolean isEmpty()
- Returns:
true
if none of the properties has been set explicitly,false
otherwise.
-
-