org.jafer.registry.uddi.model
Class Category

java.lang.Object
  extended by org.jafer.registry.uddi.model.Category
All Implemented Interfaces:
java.io.Serializable, Category

public class Category
extends java.lang.Object
implements Category

This class represents an instance of a category. A category can be attached to any service provider or service to allow easy identification when using the service locator. A category for the UDDI is related to a TModelkey that is hidden inside this implementation

See Also:
Serialized Form

Field Summary
private  java.lang.String key
          Stores a reference to the TModel key for the category
private  java.lang.String name
          Stores a reference to the name of the category
private  java.lang.String value
          Stores a reference to the value of this category
 
Constructor Summary
Category(org.uddi4j.util.KeyedReference reference)
          Create a category from a Keyed Reference
Category(TModel categoryTModel, java.lang.String value)
          Constructor
 
Method Summary
 org.uddi4j.util.CategoryBag addToCategoryBag(org.uddi4j.util.CategoryBag categoryBag)
          This method adds this category to the category bag supplied.
 boolean equalsKeyedReference(org.uddi4j.util.KeyedReference reference)
          Checks if the keyed reference values match the values in the category
static java.util.List getCategories(org.uddi4j.util.CategoryBag categoryBag)
          Helper method to extract all categories out of a category bag.
 java.lang.String getKey()
          Gets the TModel key for the category.This is not exposed on the interface to the caller and therfore should not be used outside of this framework.
 java.lang.String getName()
          Gets the name of this category
 java.lang.String getValue()
          Gets the value of this category
 org.uddi4j.util.CategoryBag removeFromCategoryBag(org.uddi4j.util.CategoryBag categoryBag)
          This method removes this category to the category bag supplied.
 void setValue(java.lang.String value)
          Sets the value on this category
 org.uddi4j.util.KeyedReference toKeyedReference()
          Converts the category to a keyed reference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

private java.lang.String key
Stores a reference to the TModel key for the category


name

private java.lang.String name
Stores a reference to the name of the category


value

private java.lang.String value
Stores a reference to the value of this category

Constructor Detail

Category

public Category(TModel categoryTModel,
                java.lang.String value)
Constructor

Parameters:
categoryTModel - The TModel representing the category
value - The value to apply to the category

Category

public Category(org.uddi4j.util.KeyedReference reference)
Create a category from a Keyed Reference

Parameters:
reference - The keyed reference to create from
Method Detail

toKeyedReference

public org.uddi4j.util.KeyedReference toKeyedReference()
Converts the category to a keyed reference

Returns:
The cretaed keyed reference

equalsKeyedReference

public boolean equalsKeyedReference(org.uddi4j.util.KeyedReference reference)
Checks if the keyed reference values match the values in the category

Parameters:
reference - The reference to check
Returns:
true if all values match

getKey

public java.lang.String getKey()
Gets the TModel key for the category.This is not exposed on the interface to the caller and therfore should not be used outside of this framework.

Returns:
Returns the key.

getName

public java.lang.String getName()
Gets the name of this category

Specified by:
getName in interface Category
Returns:
Returns the name.

getValue

public java.lang.String getValue()
Gets the value of this category

Specified by:
getValue in interface Category
Returns:
Returns the value.

setValue

public void setValue(java.lang.String value)
Sets the value on this category

Parameters:
value - The value to set.

getCategories

public static java.util.List getCategories(org.uddi4j.util.CategoryBag categoryBag)
Helper method to extract all categories out of a category bag. This is not exposed on the interface to the caller and therefore should not be used outside of this framework.

Parameters:
categoryBag - The category bag to extract from
Returns:
The list of created categories

addToCategoryBag

public org.uddi4j.util.CategoryBag addToCategoryBag(org.uddi4j.util.CategoryBag categoryBag)
This method adds this category to the category bag supplied. This is not exposed on the interface to the caller and therefore should not be used outside of this framework.

Parameters:
categoryBag - The category bag to add category to
Returns:
The updated category bag

removeFromCategoryBag

public org.uddi4j.util.CategoryBag removeFromCategoryBag(org.uddi4j.util.CategoryBag categoryBag)
                                                  throws CategoryDoesNotExistException
This method removes this category to the category bag supplied. This is not exposed on the interface to the caller and therefore should not be used outside of this framework.

Parameters:
categoryBag - The category bag to delete category from
Returns:
The updated category bag
Throws:
CategoryDoesNotExistException