org.codehaus.enunciate.main
Class BaseArtifact

java.lang.Object
  extended by org.codehaus.enunciate.main.BaseArtifact
All Implemented Interfaces:
java.lang.Comparable<Artifact>, Artifact
Direct Known Subclasses:
ClientLibraryArtifact, DownloadBundle, FileArtifact, TextArtifact

public abstract class BaseArtifact
extends java.lang.Object
implements Artifact

Base implementation for an artifact.

Author:
Ryan Heaton

Constructor Summary
protected BaseArtifact(java.lang.String module, java.lang.String id)
           
 
Method Summary
 void addAlias(java.lang.String alias)
          Add an alias to this artifact.
 void addDependency(ArtifactDependency dependency)
          Adds a dependency to this artifact.
 int compareTo(Artifact artifact)
          Compares artifacts by module then by id.
 java.util.Set<java.lang.String> getAliases()
          The aliases for this artifact.
 java.util.List<ArtifactDependency> getDependencies()
          The dependencies for this artifact.
 java.lang.String getId()
          The id.
 java.lang.String getModule()
          The module.
 boolean isPublic()
          This artifact is, by default, not bundled if it's an artifact bundle.
 void setDependencies(java.util.List<ArtifactDependency> dependencies)
          Sets the dependencies for this artifact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.enunciate.main.Artifact
exportTo, getSize
 

Constructor Detail

BaseArtifact

protected BaseArtifact(java.lang.String module,
                       java.lang.String id)
Parameters:
module - The name of the module.
id - The module id.
Method Detail

getModule

public java.lang.String getModule()
The module.

Specified by:
getModule in interface Artifact
Returns:
The module.

getId

public java.lang.String getId()
The id.

Specified by:
getId in interface Artifact
Returns:
The id.

compareTo

public int compareTo(Artifact artifact)
Compares artifacts by module then by id.

Specified by:
compareTo in interface java.lang.Comparable<Artifact>
Parameters:
artifact - The artifact to compare.
Returns:
The comparison.

isPublic

public boolean isPublic()
This artifact is, by default, not bundled if it's an artifact bundle.

Specified by:
isPublic in interface Artifact
Returns:
This artifact is, by default, not bundled if it's an artifact bundle.

getDependencies

public java.util.List<ArtifactDependency> getDependencies()
The dependencies for this artifact.

Specified by:
getDependencies in interface Artifact
Returns:
The dependencies for this artifact.

addDependency

public void addDependency(ArtifactDependency dependency)
Adds a dependency to this artifact.

Parameters:
dependency - The dependency to add.

setDependencies

public void setDependencies(java.util.List<ArtifactDependency> dependencies)
Sets the dependencies for this artifact.

Parameters:
dependencies - The dependencies to set.

getAliases

public java.util.Set<java.lang.String> getAliases()
The aliases for this artifact.

Specified by:
getAliases in interface Artifact
Returns:
The aliases for this artifact.

addAlias

public void addAlias(java.lang.String alias)
Add an alias to this artifact.

Parameters:
alias - An alias for this artifact.