org.codehaus.enunciate.main
Class FileArtifact

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

public class FileArtifact
extends BaseArtifact

A file artifact.

Author:
Ryan Heaton

Constructor Summary
FileArtifact(java.lang.String module, java.lang.String id, java.io.File file)
           
 
Method Summary
 void exportTo(java.io.File file, Enunciate enunciate)
          Exports this artifact to the specified file.
 ArtifactType getArtifactType()
          The artifact type.
 java.lang.String getDescription()
          The description of this file artifact.
 java.io.File getFile()
          The file for this artifact.
 long getSize()
          The size of the file.
 boolean isPublic()
          Whether this file artifact is a public artifact.
 void setArtifactType(ArtifactType artifactType)
          The artifact type.
 void setDescription(java.lang.String description)
          The description of this file artifact.
 void setPublic(boolean bundled)
          Whether this file artifact is a public artifact.
 
Methods inherited from class org.codehaus.enunciate.main.BaseArtifact
addAlias, addDependency, compareTo, getAliases, getDependencies, getId, getModule, setDependencies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileArtifact

public FileArtifact(java.lang.String module,
                    java.lang.String id,
                    java.io.File file)
Method Detail

getFile

public java.io.File getFile()
The file for this artifact.

Returns:
The file for this artifact.

exportTo

public void exportTo(java.io.File file,
                     Enunciate enunciate)
              throws java.io.IOException
Exports this artifact to the specified file. If this file is a directory, the directory will be zipped up.

Parameters:
file - The file to export to.
enunciate - The enunciate mechanism to use for utilities and properties as necessary.
Throws:
java.io.IOException - If an error occurs exporting it.

getSize

public long getSize()
The size of the file.

Returns:
The size of the file.

getDescription

public java.lang.String getDescription()
The description of this file artifact.

Returns:
The description of this file artifact.

setDescription

public void setDescription(java.lang.String description)
The description of this file artifact.

Parameters:
description - The description of this file artifact.

isPublic

public boolean isPublic()
Whether this file artifact is a public artifact.

Specified by:
isPublic in interface Artifact
Overrides:
isPublic in class BaseArtifact
Returns:
Whether this file artifact is a public artifact.

setPublic

public void setPublic(boolean bundled)
Whether this file artifact is a public artifact.

Parameters:
bundled - Whether this file artifact is a public artifact.

getArtifactType

public ArtifactType getArtifactType()
The artifact type.

Returns:
The artifact type.

setArtifactType

public void setArtifactType(ArtifactType artifactType)
The artifact type.

Parameters:
artifactType - The artifact type.