2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 1999 by Sun Microsystems, Inc.
2N/A * All rights reserved.
2N/A *
2N/A */
2N/A
2N/A// ServiceLocationAttributeVerifier.java: Attribute parser for SLP templates.
2N/A// Author: James Kempf
2N/A// Created On: Thu Jun 19 10:20:25 1997
2N/A// Last Modified By: James Kempf
2N/A// Last Modified On: Wed Jun 24 15:50:43 1998
2N/A// Update Count: 22
2N/A//
2N/A
2N/Apackage com.sun.slp;
2N/A
2N/Aimport java.util.*;
2N/A
2N/A/**
2N/A * Classes implementing the <b>ServiceLocationAttributeVerifier</b> interface
2N/A * parse SLP template definitions, provide information on attribute
2N/A * definitions for service types, and verify whether a
2N/A * <b>ServiceLocationAttribute</b> object matches a template for a particular
2N/A * service type. Clients obtain <b>ServiceLocationAttributeVerifier</b>
2N/A * objects for specific SLP service types through the <b>TemplateRegistry</b>.
2N/A *
2N/A * @author James Kempf
2N/A *
2N/A */
2N/A
2N/Apublic interface ServiceLocationAttributeVerifier {
2N/A
2N/A /**
2N/A * Returns the SLP service type for which this is the verifier.
2N/A *
2N/A * @return The SLP service type name.
2N/A */
2N/A
2N/A public ServiceType getServiceType();
2N/A
2N/A /**
2N/A * Returns the SLP language locale of this is the verifier.
2N/A *
2N/A * @return The SLP language locale.
2N/A */
2N/A
2N/A public Locale getLocale();
2N/A
2N/A /**
2N/A * Returns the SLP version of this is the verifier.
2N/A *
2N/A * @return The SLP version.
2N/A */
2N/A
2N/A public String getVersion();
2N/A
2N/A /**
2N/A * Returns the SLP URL syntax of this is the verifier.
2N/A *
2N/A * @return The SLP URL syntax.
2N/A */
2N/A
2N/A public String getURLSyntax();
2N/A
2N/A /**
2N/A * Returns the SLP description of this is the verifier.
2N/A *
2N/A * @return The SLP description.
2N/A */
2N/A
2N/A public String getDescription();
2N/A
2N/A /**
2N/A * Returns the <b>ServiceLocationAttributeDescriptor</b> object for the
2N/A * attribute having the named id. IF no such attribute exists in the
2N/A * template, returns null. This method is primarily for GUI tools to
2N/A * display attribute information. Programmatic verification of attributes
2N/A * should use the <b>verifyAttribute()</b> method.
2N/A *
2N/A * @param attrId Id of attribute to return.
2N/A * @return The <b>ServiceLocationAttributeDescriptor<b> object
2N/A * corresponding to the parameter, or null if none.
2N/A */
2N/A
2N/A public ServiceLocationAttributeDescriptor
2N/A getAttributeDescriptor(String attrId);
2N/A
2N/A /**
2N/A * Returns an <b>Enumeration</b> of
2N/A * <b>ServiceLocationAttributeDescriptors</b> for the template. This method
2N/A * is primarily for GUI tools to display attribute information.
2N/A * Programmatic verification of attributes should use the
2N/A * <b>verifyAttribute()</b> method. Note that small memory implementations
2N/A * may want to implement the <b>Enumeration</b> so that attributes are
2N/A * parsed on demand rather than at creation time.
2N/A *
2N/A * @return A <b>Dictionary</b> with attribute id's as the keys and
2N/A * <b>ServiceLocationAttributeDescriptor</b> objects for the
2N/A * attributes as the values.
2N/A */
2N/A
2N/A public Enumeration getAttributeDescriptors();
2N/A
2N/A /**
2N/A * Verify that the attribute parameter is a valid SLP attribute.
2N/A *
2N/A * @param <i>attribute</i> The <b>ServiceLocationAttribute</b> to be
2N/A * verified.
2N/A * @exception ServiceLocationException Thrown if the
2N/A * attribute vector is not valid. The message contains
2N/A * information on the attribute name and problem, and
2N/A * the error code is <b>ServiceLocation.PARSE_ERROR</b>.
2N/A */
2N/A
2N/A public void verifyAttribute(ServiceLocationAttribute attribute)
2N/A throws ServiceLocationException;
2N/A
2N/A /**
2N/A * Verify that the set of registration attributes matches the
2N/A * required attributes for the service.
2N/A *
2N/A * @param <i>attributeVector</i> A <b>Vector</b> of
2N/A * <b>ServiceLocationAttribute</b> objects
2N/A * for the registration.
2N/A * @exception ServiceLocationException Thrown if the
2N/A * attribute vector is not valid. The message contains
2N/A * information on the attribute name and problem, and
2N/A * the error code is <b>ServiceLocation.PARSE_ERROR</b>.
2N/A */
2N/A
2N/A public void verifyRegistration(Vector attributeVector)
2N/A throws ServiceLocationException;
2N/A}