org.sblim.slp

Interface ServiceLocationAttributeVerifier

public interface ServiceLocationAttributeVerifier

The ServiceLocationAttributeVerifier provides access to service templates. Classes implementing this interface parse SLP template definitions, provide information on attribute definitions for service types, and verify whether a ServiceLocationAttribute object matches a template for a particular service type. Clients obtain ServiceLocationAttributeVerifier objects for specific SLP service types through the TemplateRegistry.

Method Summary

abstract ServiceLocationAttributeDescriptor
getAttributeDescriptor(String pAttributeId)
Return the ServiceLocationAttributeDescriptor for the attribute having the named id.
abstract Enumeration
getAttributeDescriptors()
Returns an Enumeration allowing introspection on the attribute definition in the service template.
abstract String
getDescription()
Return the descriptive help text for the template.
abstract Locale
getLocale()
Return the language locale of the template.
abstract ServiceType
getServiceType()
Returns the SLP service type for which this is the verifier.
abstract String
getURLSyntax()
Return the URL syntax expression for the service: URL.
abstract String
getVersion()
Return the template version number identifier.
abstract void
verifyAttribute(ServiceLocationAttribute pAttribute)
Verify that the attribute matches the template definition.
abstract void
verifyRegistration(Vector pAttributeVector)
Verify that the Vector of ServiceLocationAttribute objects matches the template for this service type.

Method Details

getAttributeDescriptor

public abstract ServiceLocationAttributeDescriptor getAttributeDescriptor(String pAttributeId)
Return the ServiceLocationAttributeDescriptor for the attribute having the named id. If no such attribute exists in this template, return null. This method is primarily for GUI tools to display attribute information. Programmatic verification of attributes should use the verifyAttribute() method.
Parameters:
pAttributeId - The attribute id
Returns:
The descriptor

getAttributeDescriptors

public abstract Enumeration getAttributeDescriptors()
Returns an Enumeration allowing introspection on the attribute definition in the service template. The Enumeration returns ServiceLocationAttributeDescriptor objects for the attributes. This method is primarily for GUI tools to display attribute information. Programmatic verification of attributes should use the verifyAttribute() method.
Returns:
Enumeration of attribute descriptors

getDescription

public abstract String getDescription()
Return the descriptive help text for the template.
Returns:
The description

getLocale

public abstract Locale getLocale()
Return the language locale of the template.
Returns:
The locale

getServiceType

public abstract ServiceType getServiceType()
Returns the SLP service type for which this is the verifier.
Returns:
The service type

getURLSyntax

public abstract String getURLSyntax()
Return the URL syntax expression for the service: URL.
Returns:
The url syntax

getVersion

public abstract String getVersion()
Return the template version number identifier.
Returns:
The version

verifyAttribute

public abstract void verifyAttribute(ServiceLocationAttribute pAttribute)
            throws ServiceLocationException
Verify that the attribute matches the template definition. If the attribute doesn't match, ServiceLocationException is thrown with the error code as ServiceLocationException.PARSE_ERROR.
Parameters:
pAttribute - The ServiceLocationAttribute object to be verified.
Throws:
ServiceLocationException - if validation failed

verifyRegistration

public abstract void verifyRegistration(Vector pAttributeVector)
            throws ServiceLocationException
Verify that the Vector of ServiceLocationAttribute objects matches the template for this service type. The vector must contain all the required attributes, and all attributes must match their template definitions. If the attributes don't match, ServiceLocationException is thrown with the error code as ServiceLocationException.PARSE_ERROR
Parameters:
pAttributeVector - A Vector of ServiceLocationAttribute objects for the registration.
Throws:
ServiceLocationException - if attributes don't match

Copyright © 2005, 2006 IBM Corporation. All Rights Reserved.