Class ProjectModel
java.lang.Object
io.codemodder.plugins.maven.operator.ProjectModel
ProjectModel represents the input parameters for the chain
-
Constructor Summary
ConstructorsConstructorDescriptionProjectModel
(POMDocument pomFile, List<POMDocument> parentPomFiles, io.codemodder.plugins.maven.operator.Dependency dependency, boolean skipIfNewer, boolean useProperties, Set<String> activeProfiles, boolean overrideIfAlreadyExists, io.codemodder.plugins.maven.operator.QueryType queryType, Path repositoryPath, String finishedByClass) Constructs a new ProjectModel instance with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of all POM files involved in the context.io.codemodder.plugins.maven.operator.Dependency
io.codemodder.plugins.maven.operator.QueryType
boolean
boolean
boolean
boolean
Map<String,
List<io.codemodder.plugins.maven.operator.Pair<String, POMDocument>>> Returns a map of properties defined in various POM files based on their names.Returns a map of properties defined on the root of the given POMDocument.Returns a map of resolved properties from the POM files in the context of active profiles.void
setActiveProfiles
(Set<String> activeProfiles) void
setDependency
(io.codemodder.plugins.maven.operator.Dependency dependency) void
setFinishedByClass
(String finishedByClass) void
setModifiedByCommand
(boolean modifiedByCommand) void
setOverrideIfAlreadyExists
(boolean overrideIfAlreadyExists) void
setParentPomFiles
(List<POMDocument> parentPomFiles) void
setPomFile
(POMDocument pomFile) void
setQueryType
(io.codemodder.plugins.maven.operator.QueryType queryType) void
setRepositoryPath
(Path repositoryPath) void
setSkipIfNewer
(boolean skipIfNewer) void
setUseProperties
(boolean useProperties)
-
Constructor Details
-
ProjectModel
public ProjectModel(POMDocument pomFile, List<POMDocument> parentPomFiles, io.codemodder.plugins.maven.operator.Dependency dependency, boolean skipIfNewer, boolean useProperties, Set<String> activeProfiles, boolean overrideIfAlreadyExists, io.codemodder.plugins.maven.operator.QueryType queryType, Path repositoryPath, String finishedByClass) Constructs a new ProjectModel instance with the specified parameters.- Parameters:
pomFile
- The POMDocument representing the main POM file.parentPomFiles
- A list of POMDocuments representing parent POM files.dependency
- The Dependency object to operate on.skipIfNewer
- Whether to skip the operation if the dependency is newer.useProperties
- Whether to use properties during the operation.activeProfiles
- A set of active profiles to consider during property resolution.overrideIfAlreadyExists
- Whether to override the dependency if it already exists.queryType
- The type of query operation to perform.repositoryPath
- The path to the repository.finishedByClass
- The name of the class that finished the operation.
-
-
Method Details
-
propertiesDefinedOnPomDocument
Returns a map of properties defined on the root of the given POMDocument.- Parameters:
pomFile
- The POMDocument to extract properties from.- Returns:
- A map of property names and their values.
-
propertiesDefinedByFile
public Map<String,List<io.codemodder.plugins.maven.operator.Pair<String, propertiesDefinedByFile()POMDocument>>> Returns a map of properties defined in various POM files based on their names.- Returns:
- A map where keys are property names, and values are lists of pairs containing the property value and the corresponding POMDocument.
-
resolvedProperties
Returns a map of resolved properties from the POM files in the context of active profiles.- Returns:
- A map of property names and their resolved values.
-
allPomFiles
Returns a list of all POM files involved in the context.- Returns:
- A list of POMDocument instances representing all relevant POM files.
-
getPomFile
-
setPomFile
-
getParentPomFiles
-
setParentPomFiles
-
getDependency
public io.codemodder.plugins.maven.operator.Dependency getDependency() -
setDependency
public void setDependency(io.codemodder.plugins.maven.operator.Dependency dependency) -
isSkipIfNewer
public boolean isSkipIfNewer() -
setSkipIfNewer
public void setSkipIfNewer(boolean skipIfNewer) -
isUseProperties
public boolean isUseProperties() -
setUseProperties
public void setUseProperties(boolean useProperties) -
getActiveProfiles
-
setActiveProfiles
-
isOverrideIfAlreadyExists
public boolean isOverrideIfAlreadyExists() -
setOverrideIfAlreadyExists
public void setOverrideIfAlreadyExists(boolean overrideIfAlreadyExists) -
getQueryType
public io.codemodder.plugins.maven.operator.QueryType getQueryType() -
setQueryType
public void setQueryType(io.codemodder.plugins.maven.operator.QueryType queryType) -
getRepositoryPath
-
setRepositoryPath
-
getFinishedByClass
-
setFinishedByClass
-
isModifiedByCommand
public boolean isModifiedByCommand() -
setModifiedByCommand
public void setModifiedByCommand(boolean modifiedByCommand)
-