|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.matthias_burbach.deputy.core.project.Project
Represents a Maven project object model (only the parts relevant for Deputy).
Constructor Summary | |
Project()
|
Method Summary | |
void |
addChangeListener(ProjectChangeListener listener)
Adds a change listener to this project which will be notified when this project changed in defined ways. |
void |
addDependency(Project dependency)
Adds a direct dependency to this project and notifies change listeners. |
void |
addDependencyPropertyList(java.lang.String dependencyArtifactId,
java.util.List propertyXmlElements)
Adds a list of properties for the artifact id to this project. |
void |
addDeprecatedDependency(Project deprecatedDependency)
Adds a dependency stated literally in this project's project.xml but which was overruled by some other version of the same artifact. |
void |
addIndirectDependency(Project dependency)
Adds an indirect dependency to this project. |
java.util.List |
getAllDependencies()
|
java.lang.String |
getArtifactId()
|
java.util.Map |
getClientCauses()
Maps clients of type Project to their literal dependencies
of type ProjectQualifier that caused the clientship during the
application of the rules.
|
java.util.List |
getClients()
|
java.util.List |
getConflicts()
|
java.lang.String |
getDefaultUrl()
|
java.util.Iterator |
getDependencies()
|
java.util.Map |
getDependencyCauses()
Maps dependencies of type Project to the corresponding
dependencies of type ProjectQualifier
that caused the dependency during the application of the rules.
|
java.util.List |
getDependencyPropertyList(java.lang.String dependencyArtifactId)
|
Project |
getDependencyToSameArtifact(Project project)
|
java.lang.String |
getGroupId()
|
java.util.Iterator |
getIndirectDependencies()
|
Project |
getIndirectDependencyToSameArtifact(Project project)
|
java.lang.String |
getJar()
|
java.lang.Integer |
getMajorVersion()
Tries to split off the numerical major version from the version. |
java.lang.Integer |
getMicroVersion()
Tries to split off the numerical micro version from the version after the second dot in the version string. |
java.lang.Integer |
getMinorVersion()
Tries to split off the numerical minor version from the version between the first and the second dot in the version string. |
java.lang.String |
getName()
|
RuleSet |
getRuleSet()
|
java.lang.String |
getType()
|
java.lang.String |
getUrl()
|
java.lang.String |
getVersion()
|
boolean |
hasDependency(Project project)
|
boolean |
hasDependencyToSameArtifact(Project project)
|
boolean |
hasDirectOrIndirectDependency(Project project)
|
boolean |
hasIndirectDependency(Project project)
|
boolean |
hasIndirectDependencyToSameArtifact(Project project)
|
boolean |
isAssembly()
|
boolean |
isRootProject()
|
void |
removeChangeListener(ProjectChangeListener listener)
Removes a change listener from this project. |
void |
removeDependency(Project dependency)
Removes a direct dependency from this project and notifies change listeners. |
void |
removeIndirectDependency(Project dependency)
Removes the indirect dependency and notifies change listeners. |
void |
setArtifactId(java.lang.String artifactId)
|
void |
setAssembly(boolean assembly)
|
void |
setGroupId(java.lang.String groupId)
|
void |
setIndirectDependencies(java.util.List indirectDependencies)
|
void |
setJar(java.lang.String jar)
|
void |
setName(java.lang.String name)
|
void |
setRootProject(boolean rootProject)
|
void |
setRuleSet(RuleSet ruleSet)
|
void |
setType(java.lang.String type)
|
void |
setUrl(java.lang.String url)
|
void |
setVersion(java.lang.String version)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Project()
Method Detail |
public java.util.Map getClientCauses()
Project
to their literal dependencies
of type ProjectQualifier
that caused the clientship during the
application of the rules.
If there is no mapping the project caused itself.
null
.public java.util.Map getDependencyCauses()
Project
to the corresponding
dependencies of type ProjectQualifier
that caused the dependency during the application of the rules.
If there is no mapping the project caused itself.
null
.public java.lang.String getGroupId()
getGroupId
in interface ProjectQualifier
public void setGroupId(java.lang.String groupId)
groupId
- The group id of this project.public java.lang.String getArtifactId()
getArtifactId
in interface ProjectQualifier
public void setArtifactId(java.lang.String artifactId)
artifactId
- The artifact id of this project.public java.lang.String getVersion()
getVersion
in interface ProjectQualifier
public void setVersion(java.lang.String version)
version
- The version of this project.public java.lang.String getType()
public void setType(java.lang.String type)
type
- The type of this project. This is a non-standard element in
the project.xml. Its value is one of 'jar', 'war', ejb',
'dll'. It is optional and defaults to 'jar'.public java.lang.String getJar()
public void setJar(java.lang.String jar)
jar
- The name of jar file if it doesn't respect the
<artifactId>-<version>.jar pattern.public boolean isRootProject()
public void setRootProject(boolean rootProject)
rootProject
- Whether this project is the root of the dependency
graph currently opened in Deputy. If so, it is the
project which can be edited and changed by rules to
update and save its dependencies.public java.lang.String getUrl()
public java.lang.String getDefaultUrl()
public void setUrl(java.lang.String url)
url
- The optional URL of this project's homepage.public java.lang.String getName()
public void setName(java.lang.String name)
name
- The optional name of this project
(for display purposes and the like).public java.lang.Integer getMajorVersion()
null
if parsing this fails.public java.lang.Integer getMinorVersion()
null
if parsing this fails.public java.lang.Integer getMicroVersion()
null
if parsing this fails.public RuleSet getRuleSet()
public void setRuleSet(RuleSet ruleSet)
ruleSet
- The rule set of this project.public boolean isAssembly()
true
whether this project is an assembly for which
indirect dependencies need to be persisted in the project.xml.public void setAssembly(boolean assembly)
assembly
- true
whether this project is an assembly
for which indirect dependencies need to be persisted in
the project.xml.public boolean hasDependency(Project project)
project
- The project to check.
true
if this project has a dependency to the project
passed in.public boolean hasDependencyToSameArtifact(Project project)
project
- The project to check.
true
if this project has a dependency to the same
artifact represented by the project passed in.public Project getDependencyToSameArtifact(Project project)
project
- Holds the artifact to find the dependency for.
null
.public java.util.Iterator getDependencies()
Project
of this project.public void addDependency(Project dependency)
dependency
- The dependency to add.public void removeDependency(Project dependency)
dependency
- The dependency to remove.public boolean hasIndirectDependency(Project project)
project
- The project to check if it is an indirect dependency.
true
if the project passed in is an indirect
dependency of this project.public boolean hasIndirectDependencyToSameArtifact(Project project)
project
- Holds the artifact to check the dependency for.
true
if this project has an indirect dependency to
the same artifact as the project passed in has.public Project getIndirectDependencyToSameArtifact(Project project)
project
- Holds the artifact to find the indirect dependency for.
null
.public java.util.Iterator getIndirectDependencies()
Project
.public void addIndirectDependency(Project dependency)
dependency
- The indirect dependency to add.public void removeIndirectDependency(Project dependency)
dependency
- The dependency to remove.public void setIndirectDependencies(java.util.List indirectDependencies)
indirectDependencies
- The list of indirect dependencies of type
Project
.public boolean hasDirectOrIndirectDependency(Project project)
project
- The dependency to check for.
true
if this project has a direct or indirect
dependency to the project passed in.public void addDeprecatedDependency(Project deprecatedDependency)
deprecatedDependency
- The dependency to add.public java.util.List getAllDependencies()
Project
.public java.util.List getClients()
Project
which depend on this
project.public java.util.List getConflicts()
public void addDependencyPropertyList(java.lang.String dependencyArtifactId, java.util.List propertyXmlElements)
dependencyArtifactId
- The artifact id of the dependency that has
these properties defined in this project's
POM file.propertyXmlElements
- The list of associated properties of type
Element
.public java.util.List getDependencyPropertyList(java.lang.String dependencyArtifactId)
dependencyArtifactId
- The artifact id of the dependency to retrieve
properties for.
Element
or
null
.public void addChangeListener(ProjectChangeListener listener)
listener
- The listener to add.public void removeChangeListener(ProjectChangeListener listener)
listener
- The listener to remove.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |