Package org.jboss.gm.common.model
Class ManipulationModel
- java.lang.Object
-
- org.jboss.gm.common.model.ManipulationModel
-
public class ManipulationModel extends java.lang.Object
Contains the information extracted from a gradle project and its sub-project required to perform model and version change
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,org.commonjava.maven.atlas.ident.ref.ProjectVersionRef>
alignedDependencies
Computed aligned dependencies for this project, indexed by the previous GAV of the dependency, e.g.protected java.util.Map<java.lang.String,ManipulationModel>
children
Representation of this project children projects if any, keyed by name(artifactId).protected java.lang.String
group
protected org.gradle.api.logging.Logger
logger
Specially handled so that it is both lazy instantiated and not accessed directly in general functions.protected java.lang.String
name
Name of the project as defined by the build system.protected java.lang.String
projectPathName
This should be effectively the same as the folder name.protected java.lang.String
version
Version of the project.
-
Constructor Summary
Constructors Constructor Description ManipulationModel()
ManipulationModel(org.gradle.api.Project project)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(ManipulationModel child)
boolean
equals(java.lang.Object o)
protected ManipulationModel
findCorrespondingChild(java.lang.String path)
ManipulationModel
findCorrespondingChild(org.gradle.api.Project name)
java.util.Map<java.lang.String,org.commonjava.maven.atlas.ident.ref.ProjectVersionRef>
getAlignedDependencies()
Returns the alignments for this project only, doesn't include children.java.util.Map<java.lang.String,org.commonjava.maven.atlas.ident.ref.ProjectVersionRef>
getAllAlignedDependencies()
Returns all alignments for this project and those of the children.java.util.Map<java.lang.String,ManipulationModel>
getChildren()
java.lang.String
getGroup()
java.lang.String
getName()
Name of the project as defined by the build system.java.lang.String
getOriginalVersion()
java.lang.String
getProjectPathName()
This should be effectively the same as the folder name.java.lang.String
getVersion()
Version of the project.int
hashCode()
void
setGroup(java.lang.String group)
void
setName(java.lang.String name)
Name of the project as defined by the build system.void
setOriginalVersion(java.lang.String originalVersion)
void
setVersion(java.lang.String version)
Version of the project.java.lang.String
toString()
-
-
-
Field Detail
-
logger
protected org.gradle.api.logging.Logger logger
Specially handled so that it is both lazy instantiated and not accessed directly in general functions. This allows it to be overridden in utility projects. UsegetLogger()
-
group
protected java.lang.String group
-
name
protected java.lang.String name
Name of the project as defined by the build system.
-
projectPathName
protected java.lang.String projectPathName
This should be effectively the same as the folder name.
-
version
protected java.lang.String version
Version of the project.
-
alignedDependencies
protected java.util.Map<java.lang.String,org.commonjava.maven.atlas.ident.ref.ProjectVersionRef> alignedDependencies
Computed aligned dependencies for this project, indexed by the previous GAV of the dependency, e.g.org.jboss.resteasy:resteasy-jaxrs:3.6.3.SP1
could be the key for a dependency aligned with3.6.3.SP1-redhat-00001
version
-
children
protected java.util.Map<java.lang.String,ManipulationModel> children
Representation of this project children projects if any, keyed by name(artifactId).
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAlignedDependencies
public java.util.Map<java.lang.String,org.commonjava.maven.atlas.ident.ref.ProjectVersionRef> getAlignedDependencies()
Returns the alignments for this project only, doesn't include children.- Returns:
- the alignments for this project only
-
getAllAlignedDependencies
public java.util.Map<java.lang.String,org.commonjava.maven.atlas.ident.ref.ProjectVersionRef> getAllAlignedDependencies()
Returns all alignments for this project and those of the children.- Returns:
- all alignments for this project and those of the children
-
getChildren
public java.util.Map<java.lang.String,ManipulationModel> getChildren()
-
addChild
public void addChild(ManipulationModel child)
-
findCorrespondingChild
public ManipulationModel findCorrespondingChild(org.gradle.api.Project name)
-
findCorrespondingChild
protected ManipulationModel findCorrespondingChild(java.lang.String path)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getGroup
public java.lang.String getGroup()
-
setGroup
public void setGroup(java.lang.String group)
-
getName
public java.lang.String getName()
Name of the project as defined by the build system.- Returns:
- the project name
-
setName
public void setName(java.lang.String name)
Name of the project as defined by the build system.- Parameters:
name
- the project name
-
getProjectPathName
public java.lang.String getProjectPathName()
This should be effectively the same as the folder name.- Returns:
- the folder name
-
getVersion
public java.lang.String getVersion()
Version of the project.- Returns:
- the version of the project
-
setVersion
public void setVersion(java.lang.String version)
Version of the project.- Parameters:
version
- the version of the project
-
getOriginalVersion
public java.lang.String getOriginalVersion()
-
setOriginalVersion
public void setOriginalVersion(java.lang.String originalVersion)
-
-