net.shibboleth.metadata.util
Class ItemMetadataSupport

java.lang.Object
  extended by net.shibboleth.metadata.util.ItemMetadataSupport

public final class ItemMetadataSupport
extends Object

Helper class for dealing with ItemMetadata operations.


Constructor Summary
private ItemMetadataSupport()
          Constructor.
 
Method Summary
static void addAll(Item<?> item, Iterable<? extends ItemMetadata> metadatas)
          Adds all the given ItemMetadata items to the given Item element.
static void addToAll(Collection<? extends Item> itemCollection, Iterable<? extends ItemMetadata> metadatas)
          Adds all the give ItemMetadata items to each Item element in the given collection.
static void addToCollection(Collection<? extends Item> itemCollection, Iterable<? extends ItemMetadata> itemMetadatas)
          Adds one or more ItemMetadata to the given collection if the collection is an instance of ItemCollectionWithMetadata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemMetadataSupport

private ItemMetadataSupport()
Constructor.

Method Detail

addToAll

public static void addToAll(@Nullable
                            Collection<? extends Item> itemCollection,
                            @Nullable@NullableElements
                            Iterable<? extends ItemMetadata> metadatas)
Adds all the give ItemMetadata items to each Item element in the given collection.

Parameters:
itemCollection - collection of Item elements
metadatas - collection of ItemMetadata items to be added to each Item element of the given collection

addAll

public static void addAll(@Nullable
                          Item<?> item,
                          @Nullable@NullableElements
                          Iterable<? extends ItemMetadata> metadatas)
Adds all the given ItemMetadata items to the given Item element.

Parameters:
item - element to which ItemMetadata will be added
metadatas - ItemMetadata to be added to the metadata element

addToCollection

public static void addToCollection(@Nullable
                                   Collection<? extends Item> itemCollection,
                                   @Nullable@NullableElements
                                   Iterable<? extends ItemMetadata> itemMetadatas)
Adds one or more ItemMetadata to the given collection if the collection is an instance of ItemCollectionWithMetadata.

Parameters:
itemCollection - collection to which the metadata may be added
itemMetadatas - the metadata which may be added to the collection


Copyright © 1999-2012. All Rights Reserved.