org.jboss.dna.connector.federation.contribution
Class EmptyContribution

java.lang.Object
  extended by org.jboss.dna.connector.federation.contribution.Contribution
      extended by org.jboss.dna.connector.federation.contribution.EmptyContribution
All Implemented Interfaces:
Serializable

@Immutable
public class EmptyContribution
extends Contribution

A source contribution that is empty. In other words, the source has no contribution to make.

Note that this is different than an unknown contribution, which may occur when a source is added to a federated repository after the contributions have already been determined for nodes. In this case, the new source's contribution for a node is not known and must be determined.

Author:
Randall Hauch
See Also:
Serialized Form

Constructor Summary
EmptyContribution(String sourceName, DateTime expirationTime)
          Create a contribution for the source with the supplied name.
 
Method Summary
 boolean equals(Object obj)
          

This implementation only compares the source name.

 Location getLocationInSource()
          Get the source-specific location of this information.
 boolean isEmpty()
          Return whether this contribution is an empty contribution.
 
Methods inherited from class org.jboss.dna.connector.federation.contribution.Contribution
create, create, create, create, create, createPlaceholder, createPlaceholder, getChildren, getChildrenCount, getExpirationTimeInUtc, getProperties, getProperty, getPropertyCount, getSourceName, hashCode, isExpired, isPlaceholder, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmptyContribution

public EmptyContribution(String sourceName,
                         DateTime expirationTime)
Create a contribution for the source with the supplied name.

Parameters:
sourceName - the name of the source, which may not be null or blank
expirationTime - the time (in UTC) after which this contribution should be considered expired, or null if there is no expiration time
Method Detail

getLocationInSource

public Location getLocationInSource()
Get the source-specific location of this information.

Specified by:
getLocationInSource in class Contribution
Returns:
the location as known to the source, or null for EmptyContribution
See Also:
Contribution.getLocationInSource()

isEmpty

public boolean isEmpty()
Return whether this contribution is an empty contribution.

Overrides:
isEmpty in class Contribution
Returns:
true if this contribution is empty, or false otherwise
See Also:
Contribution.isEmpty()

equals

public boolean equals(Object obj)

This implementation only compares the source name.

Overrides:
equals in class Contribution


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.