Package org.codehaus.mojo.flatten
Class FlattenDescriptor
- java.lang.Object
-
- org.codehaus.mojo.flatten.FlattenDescriptor
-
public class FlattenDescriptor extends java.lang.ObjectThe 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 ElementHandlingdefaultOperationprivate 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
-
getName2handlingMap
public java.util.Map<java.lang.String,ElementHandling> getName2handlingMap()
-
getDefaultOperation
public ElementHandling getDefaultOperation()
-
setDefaultOperation
public void setDefaultOperation(ElementHandling defaultOperation)
-
getHandling
public ElementHandling getHandling(PomProperty<?> property)
Generic method to get aElementHandling.- Parameters:
property- is thePomPropertysuch asPomProperty.NAME.- Returns:
- the
ElementHandling. Will beflattenedas fallback if undefined.
-
setHandling
public void setHandling(PomProperty<?> property, ElementHandling handling)
Generic method to set anElementHandling.- Parameters:
property- is thePomPropertysuch asPomProperty.NAME.handling- the newElementHandling.
-
getArtifactId
public ElementHandling getArtifactId()
- Returns:
ElementHandlingforartifactId.
-
setArtifactId
public void setArtifactId(ElementHandling artifactId)
- Parameters:
artifactId- theartifactIdto set.
-
getGroupId
public ElementHandling getGroupId()
- Returns:
ElementHandlingforgroupId.
-
setGroupId
public void setGroupId(ElementHandling groupId)
- Parameters:
groupId- thegroupIdto set.
-
getPackaging
public ElementHandling getPackaging()
- Returns:
ElementHandlingforpackaging.
-
setPackaging
public void setPackaging(ElementHandling packaging)
- Parameters:
packaging- thepackagingto set.
-
getName
public ElementHandling getName()
- Returns:
ElementHandlingforname.
-
setName
public void setName(ElementHandling name)
- Parameters:
name- thenameto set.
-
getDescription
public ElementHandling getDescription()
- Returns:
ElementHandlingfordescription.
-
setDescription
public void setDescription(ElementHandling description)
- Parameters:
description- thedescriptionto set.
-
getUrl
public ElementHandling getUrl()
- Returns:
ElementHandlingforURL.
-
setUrl
public void setUrl(ElementHandling url)
- Parameters:
url- theURLto set.
-
getInceptionYear
public ElementHandling getInceptionYear()
- Returns:
ElementHandlingforinceptionYear.
-
setInceptionYear
public void setInceptionYear(ElementHandling inceptionYear)
- Parameters:
inceptionYear- the inceptionYear to set
-
getOrganization
public ElementHandling getOrganization()
- Returns:
ElementHandlingfororganization.
-
setOrganization
public void setOrganization(ElementHandling organization)
- Parameters:
organization- theorganizationto set.
-
getScm
public ElementHandling getScm()
- Returns:
ElementHandlingforSCM.
-
setScm
public void setScm(ElementHandling scm)
- Parameters:
scm- thescmto set.
-
getPrerequisites
public ElementHandling getPrerequisites()
- Returns:
ElementHandlingforprerequisites.
-
setPrerequisites
public void setPrerequisites(ElementHandling prerequisites)
- Parameters:
prerequisites- theprerequisitesto set.
-
getDevelopers
public ElementHandling getDevelopers()
- Returns:
ElementHandlingfordevelopers.
-
setDevelopers
public void setDevelopers(ElementHandling developers)
- Parameters:
developers- thedevelopersto set.
-
getContributors
public ElementHandling getContributors()
- Returns:
ElementHandlingforcontributors.
-
setContributors
public void setContributors(ElementHandling contributors)
- Parameters:
contributors- thecontributorsto set.
-
getMailingLists
public ElementHandling getMailingLists()
- Returns:
ElementHandlingformailingLists.
-
setMailingLists
public void setMailingLists(ElementHandling mailingLists)
- Parameters:
mailingLists- themailingListsto set.
-
getRepositories
public ElementHandling getRepositories()
- Returns:
ElementHandlingforrepositories.
-
setRepositories
public void setRepositories(ElementHandling repositories)
- Parameters:
repositories- therepositoriesto set.
-
getPluginManagement
public ElementHandling getPluginManagement()
- Returns:
ElementHandlingforPluginConfiguration.getPluginManagement()pluginManagement}.
-
setPluginManagement
public void setPluginManagement(ElementHandling pluginManagement)
- Parameters:
pluginManagement- thepluginManagementto set.
-
getPluginRepositories
public ElementHandling getPluginRepositories()
- Returns:
ElementHandlingforpluginRepositories.
-
setPluginRepositories
public void setPluginRepositories(ElementHandling pluginRepositories)
- Parameters:
pluginRepositories- thepluginRepositoriesto set.
-
getIssueManagement
public ElementHandling getIssueManagement()
- Returns:
ElementHandlingforissueManagement.
-
setIssueManagement
public void setIssueManagement(ElementHandling issueManagement)
- Parameters:
issueManagement- theissueManagementto set.
-
getCiManagement
public ElementHandling getCiManagement()
- Returns:
ElementHandlingforciManagement.
-
setCiManagement
public void setCiManagement(ElementHandling ciManagement)
- Parameters:
ciManagement- theciManagementto set.
-
getDistributionManagement
public ElementHandling getDistributionManagement()
- Returns:
ElementHandlingfordistributionManagement.
-
setDistributionManagement
public void setDistributionManagement(ElementHandling distributionManagement)
- Parameters:
distributionManagement- thedistributionManagementto set.
-
getDependencyManagement
public ElementHandling getDependencyManagement()
- Returns:
ElementHandlingfordependencyManagement.
-
setDependencyManagement
public void setDependencyManagement(ElementHandling dependencyManagement)
- Parameters:
dependencyManagement- thedependencyManagementto set.
-
getBuild
public ElementHandling getBuild()
- Returns:
ElementHandlingforbuild.
-
setBuild
public void setBuild(ElementHandling build)
- Parameters:
build- thebuildto set.
-
getParent
public ElementHandling getParent()
- Returns:
ElementHandlingforparent.
-
setParent
public void setParent(ElementHandling parent)
- Parameters:
parent- theparentto set.
-
getModules
public ElementHandling getModules()
- Returns:
ElementHandlingformodules.
-
setModules
public void setModules(ElementHandling modules)
- Parameters:
modules- themodulesto set.
-
getProperties
public ElementHandling getProperties()
- Returns:
ElementHandlingforproperties.
-
setProperties
public void setProperties(ElementHandling properties)
- Parameters:
properties- thepropertiesto set.
-
getReporting
public ElementHandling getReporting()
- Returns:
ElementHandlingforreporting.
-
setReporting
public void setReporting(ElementHandling reporting)
- Parameters:
reporting- thereportingto set.
-
getDependencies
public ElementHandling getDependencies()
- Returns:
ElementHandlingfordependencies.
-
setDependencies
public void setDependencies(ElementHandling dependencies)
- Parameters:
dependencies- thedependenciesto set.
-
getProfiles
public ElementHandling getProfiles()
- Returns:
ElementHandlingforprofiles.
-
setProfiles
public void setProfiles(ElementHandling profiles)
- Parameters:
profiles- theprofilesto set.
-
getVersion
public ElementHandling getVersion()
- Returns:
ElementHandlingforversion.
-
setVersion
public void setVersion(ElementHandling version)
- Parameters:
version- theversionto set.
-
merge
public FlattenDescriptor merge(FlattenDescriptor descriptor)
Creates and returns a newFlattenDescriptorwith theElementHandlings merged from this and the givenFlattenDescriptor.- Parameters:
descriptor- is theFlattenDescriptorto merge with this one.- Returns:
- the merged
FlattenDescriptor.
-
isEmpty
public boolean isEmpty()
- Returns:
trueif none of the properties has been set explicitly,falseotherwise.
-
-