/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright (c) 1999 by Sun Microsystems, Inc. * All rights reserved. * */ // ServiceLocationAttributeDescriptor.java: Describes an SLP attribute. // Author: James Kempf // Created On: Thu Jun 19 10:38:01 1997 // Last Modified By: James Kempf // Last Modified On: Fri May 22 13:01:18 1998 // Update Count: 16 // package com.sun.slp; import java.util.*; /** * Objects implementing the ServiceLocationAttributeDescriptor * interface return information on a particular service location attribute. * This information is primarily for GUI tools. Programmatic attribute * verification should be done through the * ServiceLocationAttributeVerifier. * * @author James Kempf * */ public interface ServiceLocationAttributeDescriptor { /** * Return the attribute's id. * * @return A String for the attribute's id. */ public String getId(); /** * Return the fully qualified Java type of the attribute. SLP types * are translated into Java types as follows:
*
    *
  1. STRING -- "java.lang.String"
  2. *
  3. INTEGER -- "java.lang.Integer"
  4. *
  5. BOOLEAN -- "java.lang.Boolean"
  6. *
  7. OPAQUE -- "[B" (i.e. array of byte, * byte[])
  8. *
  9. KEYWORD -- null string, ""
  10. *
* * @return A String containing the Java type name for the * attribute values. */ public String getValueType(); /** * Return attribute's help text. * * @return A String containing the attribute's help text. */ public String getDescription(); /** * Return an Enumeration of allowed values for the attribute type. * For keyword attributes returns null. For no allowed values * (i.e. unrestricted) returns an empty Enumeration. Small memory * implementations may want to parse values on demand rather * than at the time the descriptor is created. * * @return An Enumeration of allowed values for the attribute, * or null if the attribute is keyword. */ public Enumeration getAllowedValues(); /** * Return an Enumeration of default values for the attribute type. * For keyword attributes returns null. For no allowed values * (i.e. unrestricted) returns an empty Enumeration. Small memory * implementations may want to parse values on demand rather * than at the time the descriptor is created. * * @return An Enumeration of default values for the attribute or * null if the attribute is keyword. */ public Enumeration getDefaultValues(); /** * Returns true if the "M" flag is set. * * @return True if the "M" flag is set. */ public boolean getIsMultivalued(); /** * Returns true if the "O"" flag is set. * * @return True if the "O"" flag is set. */ public boolean getIsOptional(); /** * Returns true if the "X"" flag is set. * * @return True if the "X" flag is set. */ public boolean getRequiresExplicitMatch(); /** * Returns true if the "L" flag is set. * * @return True if the "L" flag is set. */ public boolean getIsLiteral(); /** * Returns true if the attribute is a keyword attribute. * * @return true if the attribute is a keyword attribute */ public boolean getIsKeyword(); }