org.axway.grapes.commons.datamodel
Class Module

java.lang.Object
  extended by org.axway.grapes.commons.datamodel.Module

public class Module
extends Object

Module Model Class

Model Objects are used in the communication with the Grapes server. These objects are serialized/un-serialized in JSON objects to be exchanged via http REST calls.

Author:
jdcoffre

Constructor Summary
protected Module()
           
 
Method Summary
 void addAllArtifacts(List<Artifact> artifacts)
          Adds a set of artifact to the module.
 void addArtifact(Artifact artifact)
          Adds an artifact to the module.
 void addDependency(Dependency dependency)
          Add a dependency to the module.
 void addSubmodule(Module submodule)
          Adds a submodule to the module.
 boolean equals(Object obj)
          Checks if the module is the same than an other one.
 Set<Artifact> getArtifacts()
           
 Set<Dependency> getDependencies()
           
 String getName()
           
 Set<Module> getSubmodules()
           
 String getVersion()
           
 int hashCode()
           
 boolean isPromoted()
           
 boolean isSubmodule()
           
 void setName(String name)
           
 void setPromoted(boolean promoted)
          Sets the promotion state.
 void setSubmodule(boolean isSubmodule)
           
 void setVersion(String version)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Module

protected Module()
Method Detail

getName

public String getName()

setName

public void setName(String name)

getVersion

public String getVersion()

setVersion

public void setVersion(String version)

getArtifacts

public Set<Artifact> getArtifacts()

isPromoted

public boolean isPromoted()

getDependencies

public Set<Dependency> getDependencies()

getSubmodules

public Set<Module> getSubmodules()

isSubmodule

public boolean isSubmodule()

setSubmodule

public void setSubmodule(boolean isSubmodule)

setPromoted

public void setPromoted(boolean promoted)
Sets the promotion state.

INFO: This method updates automatically all the contained artifacts.

Parameters:
promoted - boolean

addDependency

public void addDependency(Dependency dependency)
Add a dependency to the module.

Parameters:
dependency - Dependency

addSubmodule

public void addSubmodule(Module submodule)
Adds a submodule to the module.

INFO: If the module is promoted, all added submodule will be promoted.

Parameters:
submodule - Module

addArtifact

public void addArtifact(Artifact artifact)
Adds an artifact to the module.

INFO: If the module is promoted, all added artifacts will be promoted.

Parameters:
artifact - Artifact

addAllArtifacts

public void addAllArtifacts(List<Artifact> artifacts)
Adds a set of artifact to the module.

INFO: If the module is promoted, all added artifacts will be promoted.

Parameters:
artifacts - Listof Artifact

equals

public boolean equals(Object obj)
Checks if the module is the same than an other one.

Overrides:
equals in class Object
Parameters:
obj - Object
Returns:
true only if name/version are the same in both.

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2014. All Rights Reserved.