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
Modifier and TypeMethodDescriptiongetAttributeDescriptor
(String pAttributeId) Return the ServiceLocationAttributeDescriptor for the attribute having the named id.Enumeration
<?> Returns an Enumeration allowing introspection on the attribute definition in the service template.Return the descriptive help text for the template.Return the language locale of the template.Returns the SLP service type for which this is the verifier.Return the URL syntax expression for the service: URL.Return the template version number identifier.void
verifyAttribute
(ServiceLocationAttribute pAttribute) Verify that the attribute matches the template definition.void
verifyRegistration
(Vector<?> pAttributeVector) Verify that the Vector of ServiceLocationAttribute objects matches the template for this service type.
-
Method Details
-
getServiceType
ServiceType getServiceType()Returns the SLP service type for which this is the verifier.- Returns:
- The service type
-
getLocale
-
getVersion
-
getURLSyntax
String getURLSyntax()Return the URL syntax expression for the service: URL.- Returns:
- The url syntax
-
getDescription
-
getAttributeDescriptor
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
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
-
verifyAttribute
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
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
-