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

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.OnePropertyContribution
All Implemented Interfaces:
Serializable

@Immutable
public class OnePropertyContribution
extends NonEmptyContribution

The record of a source contributing only properties to a node.

Author:
Randall Hauch
See Also:
Serialized Form

Constructor Summary
OnePropertyContribution(String sourceName, String workspaceName, Location locationInSource, DateTime expirationTime, Property property)
          Create a contribution of node properties from the source with the supplied name.
 
Method Summary
 Iterator<Property> getProperties()
          Get the properties that are in this contribution.
 Property getProperty(Name name)
          Get the contributed property with the supplied name.
 int getPropertyCount()
          Get the number of properties that are in 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, getChildren, getChildrenCount, getExpirationTimeInUtc, getSourceName, getString, getWorkspaceName, isEmpty, isExpired, isPlaceholder, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OnePropertyContribution

public OnePropertyContribution(String sourceName,
                               String workspaceName,
                               Location locationInSource,
                               DateTime expirationTime,
                               Property property)
Create a contribution of node properties 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
property - the property from the source; may not be null
Method Detail

getProperties

public Iterator<Property> getProperties()
Get the properties that are in this contribution. This resulting iterator does not support removal.

Overrides:
getProperties in class Contribution
Returns:
the properties; never null
See Also:
Contribution.getProperties()

getPropertyCount

public int getPropertyCount()
Get the number of properties that are in this contribution.

Overrides:
getPropertyCount in class Contribution
Returns:
the number of properties
See Also:
Contribution.getPropertyCount()

getProperty

public Property getProperty(Name name)
Get the contributed property with the supplied name.

Overrides:
getProperty in class Contribution
Parameters:
name - the name of the property
Returns:
the contributed property that matches the name, or null if no such property is in the contribution
See Also:
Contribution.getProperty(org.jboss.dna.graph.property.Name)


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