org.codehaus.enunciate.main
Class ClientLibraryArtifact

java.lang.Object
  extended by org.codehaus.enunciate.main.BaseArtifact
      extended by org.codehaus.enunciate.main.ClientLibraryArtifact
All Implemented Interfaces:
java.lang.Comparable<Artifact>, Artifact, ArtifactBundle, NamedArtifact

public class ClientLibraryArtifact
extends BaseArtifact
implements ArtifactBundle, NamedArtifact

A client-side libarary artifact.

Author:
Ryan Heaton

Constructor Summary
ClientLibraryArtifact(java.lang.String module, java.lang.String id, java.lang.String name)
           
 
Method Summary
 void addArtifact(FileArtifact artifact)
          The artifact to add.
 void exportTo(java.io.File file, Enunciate enunciate)
          If the file to export to is an existing directoy, copy the artifacts to that directory.
 java.util.Collection<? extends Artifact> getArtifacts()
          The artifacts that are associated with this bundle.
 java.util.Date getCreated()
          The date this artifact was created (defaults to the date this artifact was constructed).
 java.lang.String getDescription()
          A description of this library.
 java.lang.String getName()
          The name for this library.
 java.lang.String getPlatform()
          A string describing the platform this library applies to.
 long getSize()
          If this artifact has been exported to a zip file, it will return the size in bytes of that file.
 void setCreated(java.util.Date created)
          The date this artifact was created.
 void setDescription(java.lang.String description)
          A description of this library.
 void setPlatform(java.lang.String platform)
          A string describing the platform this library applies to.
 
Methods inherited from class org.codehaus.enunciate.main.BaseArtifact
addAlias, addDependency, compareTo, getAliases, getDependencies, getId, getModule, isPublic, setDependencies
 
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
getAliases, getDependencies, getId, getModule, isPublic
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ClientLibraryArtifact

public ClientLibraryArtifact(java.lang.String module,
                             java.lang.String id,
                             java.lang.String name)
Method Detail

exportTo

public void exportTo(java.io.File file,
                     Enunciate enunciate)
              throws java.io.IOException
If the file to export to is an existing directoy, copy the artifacts to that directory. Otherwise, assume that the export is a file and zip up all the artifacts to that file.

Specified by:
exportTo in interface Artifact
Parameters:
file - The file to write to.
enunciate - The utilities to use.
Throws:
java.io.IOException - If an error occurs exporting it.

getName

public java.lang.String getName()
The name for this library.

Specified by:
getName in interface NamedArtifact
Returns:
The name for this library.

getArtifacts

public java.util.Collection<? extends Artifact> getArtifacts()
The artifacts that are associated with this bundle.

Specified by:
getArtifacts in interface ArtifactBundle
Returns:
The artifacts that are associated with this bundle.

getSize

public long getSize()
If this artifact has been exported to a zip file, it will return the size in bytes of that file. Otherwise, -1.

Specified by:
getSize in interface Artifact
Returns:
The size in bytes of the zip file, or -1 if no zip file has been created yet.

addArtifact

public void addArtifact(FileArtifact artifact)
The artifact to add.

Parameters:
artifact - The artifact to add.

getCreated

public java.util.Date getCreated()
The date this artifact was created (defaults to the date this artifact was constructed).

Returns:
The date this artifact was created.

setCreated

public void setCreated(java.util.Date created)
The date this artifact was created.

Parameters:
created - The date this artifact was created.

getPlatform

public java.lang.String getPlatform()
A string describing the platform this library applies to.

Returns:
A string describing the platform this library applies to.

setPlatform

public void setPlatform(java.lang.String platform)
A string describing the platform this library applies to.

Parameters:
platform - A string describing the platform this library applies to.

getDescription

public java.lang.String getDescription()
A description of this library.

Returns:
A description of this library.

setDescription

public void setDescription(java.lang.String description)
A description of this library.

Parameters:
description - A description of this library.