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

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

@Immutable
public class OneChildContribution
extends NonEmptyContribution

The record of a source contributing only a single child to a node.

Author:
Randall Hauch
See Also:
Serialized Form

Constructor Summary
OneChildContribution(String sourceName, String workspaceName, Location locationInSource, DateTime expirationTime, Location child)
          Create a contribution of a single child from the source with the supplied name.
 
Method Summary
 Iterator<Location> getChildren()
          Get the children that make up this contribution.
 int getChildrenCount()
          Get the number of children that make up this contribution.
 
Methods inherited from class org.jboss.dna.connector.federation.contribution.NonEmptyContribution
equals, getLocationInSource, hashCode
 
Methods inherited from class org.jboss.dna.connector.federation.contribution.Contribution
create, create, create, create, create, createPlaceholder, createPlaceholder, getExpirationTimeInUtc, getProperties, getProperty, getPropertyCount, getSourceName, getWorkspaceName, isEmpty, isExpired, isPlaceholder, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OneChildContribution

public OneChildContribution(String sourceName,
                            String workspaceName,
                            Location locationInSource,
                            DateTime expirationTime,
                            Location child)
Create a contribution of a single child from the source with the supplied name.

Parameters:
sourceName - the name of the source, which may not be null or blank
workspaceName - the name of the workspace, which may not be null or blank
locationInSource - the location in the source for this contributed information; may not be null
expirationTime - the time (in UTC) after which this contribution should be considered expired, or null if there is no expiration time
child - the child contributed from the source; may not be null
Method Detail

getChildren

public Iterator<Location> getChildren()
Get the children that make up this contribution. This resulting iterator does not support removal .

Overrides:
getChildren in class Contribution
Returns:
the children; never null
See Also:
Contribution.getChildren()

getChildrenCount

public int getChildrenCount()
Get the number of children that make up this contribution.

Overrides:
getChildrenCount in class Contribution
Returns:
the number of children
See Also:
Contribution.getChildrenCount()


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