org.sca4j.host.contribution
Class FileContributionSource

java.lang.Object
  extended by org.sca4j.host.contribution.FileContributionSource
All Implemented Interfaces:
ContributionSource

public class FileContributionSource
extends java.lang.Object
implements ContributionSource

A contribution artifact that is on a filesystem

Version:
$Rev: 4238 $ $Date: 2008-05-17 06:02:45 +0100 (Sat, 17 May 2008) $

Constructor Summary
FileContributionSource(java.net.URI uri, java.net.URL location, long timestamp, byte[] checksum)
           
FileContributionSource(java.net.URI uri, java.net.URL location, long timestamp, byte[] checksum, java.lang.String contentType)
           
FileContributionSource(java.net.URL location, long timestamp, byte[] checksum)
           
 
Method Summary
 byte[] getChecksum()
          Returns the source checksum.
 java.lang.String getContentType()
          Returns the content type of the source
 java.net.URL getLocation()
          If the source is local, returns the source URL
 java.io.InputStream getSource()
          Returns a input stream for the source.
 long getTimestamp()
          Returns the source timestamp.
 java.net.URI getUri()
          Returns the identifier for this contribution or null if one has not been assigned (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileContributionSource

public FileContributionSource(java.net.URL location,
                              long timestamp,
                              byte[] checksum)

FileContributionSource

public FileContributionSource(java.net.URI uri,
                              java.net.URL location,
                              long timestamp,
                              byte[] checksum)

FileContributionSource

public FileContributionSource(java.net.URI uri,
                              java.net.URL location,
                              long timestamp,
                              byte[] checksum,
                              java.lang.String contentType)
Method Detail

getUri

public java.net.URI getUri()
Description copied from interface: ContributionSource
Returns the identifier for this contribution or null if one has not been assigned (i.e. it is a new contribution and not an update).

Specified by:
getUri in interface ContributionSource
Returns:
the identifier for this contribution

getSource

public java.io.InputStream getSource()
                              throws java.io.IOException
Description copied from interface: ContributionSource
Returns a input stream for the source.

Specified by:
getSource in interface ContributionSource
Returns:
a input stream for the source
Throws:
java.io.IOException - if an error occurs returning the stream

getLocation

public java.net.URL getLocation()
Description copied from interface: ContributionSource
If the source is local, returns the source URL

Specified by:
getLocation in interface ContributionSource
Returns:
the source URL

getTimestamp

public long getTimestamp()
Description copied from interface: ContributionSource
Returns the source timestamp.

Specified by:
getTimestamp in interface ContributionSource
Returns:
the source timestamp

getChecksum

public byte[] getChecksum()
Description copied from interface: ContributionSource
Returns the source checksum.

Specified by:
getChecksum in interface ContributionSource
Returns:
the source checksum

getContentType

public java.lang.String getContentType()
Description copied from interface: ContributionSource
Returns the content type of the source

Specified by:
getContentType in interface ContributionSource
Returns:


Copyright © 2008-2010 Service Symphony. All Rights Reserved.