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// ServiceLocationAttributeDescriptor.java: Describes an SLP attribute.
2N/A// Author: James Kempf
2N/A// Created On: Thu Jun 19 10:38:01 1997
2N/A// Last Modified By: James Kempf
2N/A// Last Modified On: Fri May 22 13:01:18 1998
2N/A// Update Count: 16
2N/A//
2N/A
2N/Apackage com.sun.slp;
2N/A
2N/Aimport java.util.*;
2N/A
2N/A/**
2N/A * Objects implementing the <b>ServiceLocationAttributeDescriptor</b>
2N/A * interface return information on a particular service location attribute.
2N/A * This information is primarily for GUI tools. Programmatic attribute
2N/A * verification should be done through the
2N/A * <b>ServiceLocationAttributeVerifier</b>.
2N/A *
2N/A * @author James Kempf
2N/A *
2N/A */
2N/A
2N/Apublic interface ServiceLocationAttributeDescriptor {
2N/A
2N/A /**
2N/A * Return the attribute's id.
2N/A *
2N/A * @return A <b>String</b> for the attribute's id.
2N/A */
2N/A
2N/A public String getId();
2N/A
2N/A /**
2N/A * Return the fully qualified Java type of the attribute. SLP types
2N/A * are translated into Java types as follows:<br>
2N/A *<ol>
2N/A * <li><i>STRING</i> -- <i>"java.lang.String"</i></li>
2N/A * <li><i>INTEGER</i> -- <i>"java.lang.Integer"</i></li>
2N/A * <li><i>BOOLEAN</i> -- <i>"java.lang.Boolean"</i></li>
2N/A * <li><i>OPAQUE</i> -- <i>"[B"</i> (i.e. array of byte,
2N/A * <b>byte[]</b>)</li>
2N/A * <li><i>KEYWORD</i> -- null string, <i>""</i></li>
2N/A *</ol>
2N/A *
2N/A * @return A <b>String</b> containing the Java type name for the
2N/A * attribute values.
2N/A */
2N/A
2N/A public String getValueType();
2N/A
2N/A /**
2N/A * Return attribute's help text.
2N/A *
2N/A * @return A <b>String</b> containing the attribute's help text.
2N/A */
2N/A
2N/A public String getDescription();
2N/A
2N/A /**
2N/A * Return an <b>Enumeration</b> of allowed values for the attribute type.
2N/A * For keyword attributes returns null. For no allowed values
2N/A * (i.e. unrestricted) returns an empty <b>Enumeration</b>. Small memory
2N/A * implementations may want to parse values on demand rather
2N/A * than at the time the descriptor is created.
2N/A *
2N/A * @return An <b>Enumeration</b> of allowed values for the attribute,
2N/A * or null if the attribute is keyword.
2N/A */
2N/A
2N/A public Enumeration getAllowedValues();
2N/A
2N/A /**
2N/A * Return an <b>Enumeration</b> of default values for the attribute type.
2N/A * For keyword attributes returns null. For no allowed values
2N/A * (i.e. unrestricted) returns an empty <b>Enumeration</b>. Small memory
2N/A * implementations may want to parse values on demand rather
2N/A * than at the time the descriptor is created.
2N/A *
2N/A * @return An <b>Enumeration</b> of default values for the attribute or
2N/A * null if the attribute is keyword.
2N/A */
2N/A
2N/A public Enumeration getDefaultValues();
2N/A
2N/A /**
2N/A * Returns true if the <i>"M"</i> flag is set.
2N/A *
2N/A * @return True if the <i>"M"</i> flag is set.
2N/A */
2N/A
2N/A public boolean getIsMultivalued();
2N/A
2N/A /**
2N/A * Returns true if the <i>"O"</i>" flag is set.
2N/A *
2N/A * @return True if the <i>"O"</i>" flag is set.
2N/A */
2N/A
2N/A public boolean getIsOptional();
2N/A
2N/A /**
2N/A * Returns true if the <i>"X"</i>" flag is set.
2N/A *
2N/A * @return True if the <i>"X"</i> flag is set.
2N/A */
2N/A
2N/A public boolean getRequiresExplicitMatch();
2N/A
2N/A /**
2N/A * Returns true if the <i>"L"</i> flag is set.
2N/A *
2N/A * @return True if the <i>"L"</i> flag is set.
2N/A */
2N/A
2N/A public boolean getIsLiteral();
2N/A
2N/A /**
2N/A * Returns <i>true</i> if the attribute is a keyword attribute.
2N/A *
2N/A * @return <i>true</i> if the attribute is a keyword attribute
2N/A */
2N/A
2N/A public boolean getIsKeyword();
2N/A
2N/A}