org.sca4j.host.contribution
Class DefaultContributionSource

java.lang.Object
  extended by org.sca4j.host.contribution.DefaultContributionSource
All Implemented Interfaces:
ContributionSource
Direct Known Subclasses:
JarContributionSource

public class DefaultContributionSource
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
DefaultContributionSource(java.net.URL location, long timestamp, java.lang.String type)
          Initialises the contribution source state.
 
Method Summary
 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.lang.String getType()
          Returns the type of the contribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContributionSource

public DefaultContributionSource(java.net.URL location,
                                 long timestamp,
                                 java.lang.String type)
Initialises the contribution source state.

Parameters:
location - The location of the contribution.
timestamp - Contribution timestamp.
type - Contribution type.
Method Detail

getSource

public java.io.InputStream getSource()
                              throws java.io.IOException
Returns a input stream for the source.

Specified by:
getSource in interface ContributionSource
Returns:
Input stream to the contribution source.
Throws:
java.io.IOException - If a stream cannot be open.
See Also:
ContributionSource.getSource()

getLocation

public java.net.URL getLocation()
If the source is local, returns the source URL

Specified by:
getLocation in interface ContributionSource
Returns:
The contribution URL.
See Also:
ContributionSource.getLocation()

getTimestamp

public long getTimestamp()
Returns the source timestamp.

Specified by:
getTimestamp in interface ContributionSource
Returns:
Timestamp of the contribution.
See Also:
ContributionSource.getTimestamp()

getType

public java.lang.String getType()
Returns the type of the contribution.

Specified by:
getType in interface ContributionSource
Returns:
Type of the contribution.
See Also:
ContributionSource.getType()


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