10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7298SMark.J.Nelson@Sun.COM * Common Development and Distribution License (the "License"). 6*7298SMark.J.Nelson@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 220Sstevel@tonic-gate * Copyright (c) 1999 by Sun Microsystems, Inc. 230Sstevel@tonic-gate * All rights reserved. 240Sstevel@tonic-gate * 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate // ServiceLocationAttributeDescriptor.java: Describes an SLP attribute. 280Sstevel@tonic-gate // Author: James Kempf 290Sstevel@tonic-gate // Created On: Thu Jun 19 10:38:01 1997 300Sstevel@tonic-gate // Last Modified By: James Kempf 310Sstevel@tonic-gate // Last Modified On: Fri May 22 13:01:18 1998 320Sstevel@tonic-gate // Update Count: 16 330Sstevel@tonic-gate // 340Sstevel@tonic-gate 350Sstevel@tonic-gate package com.sun.slp; 360Sstevel@tonic-gate 370Sstevel@tonic-gate import java.util.*; 380Sstevel@tonic-gate 390Sstevel@tonic-gate /** 400Sstevel@tonic-gate * Objects implementing the <b>ServiceLocationAttributeDescriptor</b> 410Sstevel@tonic-gate * interface return information on a particular service location attribute. 420Sstevel@tonic-gate * This information is primarily for GUI tools. Programmatic attribute 430Sstevel@tonic-gate * verification should be done through the 440Sstevel@tonic-gate * <b>ServiceLocationAttributeVerifier</b>. 450Sstevel@tonic-gate * 460Sstevel@tonic-gate * @author James Kempf 470Sstevel@tonic-gate * 480Sstevel@tonic-gate */ 490Sstevel@tonic-gate 500Sstevel@tonic-gate public interface ServiceLocationAttributeDescriptor { 510Sstevel@tonic-gate 520Sstevel@tonic-gate /** 530Sstevel@tonic-gate * Return the attribute's id. 540Sstevel@tonic-gate * 550Sstevel@tonic-gate * @return A <b>String</b> for the attribute's id. 560Sstevel@tonic-gate */ 570Sstevel@tonic-gate getId()580Sstevel@tonic-gate public String getId(); 590Sstevel@tonic-gate 600Sstevel@tonic-gate /** 610Sstevel@tonic-gate * Return the fully qualified Java type of the attribute. SLP types 620Sstevel@tonic-gate * are translated into Java types as follows:<br> 630Sstevel@tonic-gate *<ol> 640Sstevel@tonic-gate * <li><i>STRING</i> -- <i>"java.lang.String"</i></li> 650Sstevel@tonic-gate * <li><i>INTEGER</i> -- <i>"java.lang.Integer"</i></li> 660Sstevel@tonic-gate * <li><i>BOOLEAN</i> -- <i>"java.lang.Boolean"</i></li> 670Sstevel@tonic-gate * <li><i>OPAQUE</i> -- <i>"[B"</i> (i.e. array of byte, 680Sstevel@tonic-gate * <b>byte[]</b>)</li> 690Sstevel@tonic-gate * <li><i>KEYWORD</i> -- null string, <i>""</i></li> 700Sstevel@tonic-gate *</ol> 710Sstevel@tonic-gate * 720Sstevel@tonic-gate * @return A <b>String</b> containing the Java type name for the 730Sstevel@tonic-gate * attribute values. 740Sstevel@tonic-gate */ 750Sstevel@tonic-gate getValueType()760Sstevel@tonic-gate public String getValueType(); 770Sstevel@tonic-gate 780Sstevel@tonic-gate /** 790Sstevel@tonic-gate * Return attribute's help text. 800Sstevel@tonic-gate * 810Sstevel@tonic-gate * @return A <b>String</b> containing the attribute's help text. 820Sstevel@tonic-gate */ 830Sstevel@tonic-gate getDescription()840Sstevel@tonic-gate public String getDescription(); 850Sstevel@tonic-gate 860Sstevel@tonic-gate /** 870Sstevel@tonic-gate * Return an <b>Enumeration</b> of allowed values for the attribute type. 880Sstevel@tonic-gate * For keyword attributes returns null. For no allowed values 890Sstevel@tonic-gate * (i.e. unrestricted) returns an empty <b>Enumeration</b>. Small memory 900Sstevel@tonic-gate * implementations may want to parse values on demand rather 910Sstevel@tonic-gate * than at the time the descriptor is created. 920Sstevel@tonic-gate * 930Sstevel@tonic-gate * @return An <b>Enumeration</b> of allowed values for the attribute, 940Sstevel@tonic-gate * or null if the attribute is keyword. 950Sstevel@tonic-gate */ 960Sstevel@tonic-gate getAllowedValues()970Sstevel@tonic-gate public Enumeration getAllowedValues(); 980Sstevel@tonic-gate 990Sstevel@tonic-gate /** 1000Sstevel@tonic-gate * Return an <b>Enumeration</b> of default values for the attribute type. 1010Sstevel@tonic-gate * For keyword attributes returns null. For no allowed values 1020Sstevel@tonic-gate * (i.e. unrestricted) returns an empty <b>Enumeration</b>. Small memory 1030Sstevel@tonic-gate * implementations may want to parse values on demand rather 1040Sstevel@tonic-gate * than at the time the descriptor is created. 1050Sstevel@tonic-gate * 1060Sstevel@tonic-gate * @return An <b>Enumeration</b> of default values for the attribute or 1070Sstevel@tonic-gate * null if the attribute is keyword. 1080Sstevel@tonic-gate */ 1090Sstevel@tonic-gate getDefaultValues()1100Sstevel@tonic-gate public Enumeration getDefaultValues(); 1110Sstevel@tonic-gate 1120Sstevel@tonic-gate /** 1130Sstevel@tonic-gate * Returns true if the <i>"M"</i> flag is set. 1140Sstevel@tonic-gate * 1150Sstevel@tonic-gate * @return True if the <i>"M"</i> flag is set. 1160Sstevel@tonic-gate */ 1170Sstevel@tonic-gate getIsMultivalued()1180Sstevel@tonic-gate public boolean getIsMultivalued(); 1190Sstevel@tonic-gate 1200Sstevel@tonic-gate /** 1210Sstevel@tonic-gate * Returns true if the <i>"O"</i>" flag is set. 1220Sstevel@tonic-gate * 1230Sstevel@tonic-gate * @return True if the <i>"O"</i>" flag is set. 1240Sstevel@tonic-gate */ 1250Sstevel@tonic-gate getIsOptional()1260Sstevel@tonic-gate public boolean getIsOptional(); 1270Sstevel@tonic-gate 1280Sstevel@tonic-gate /** 1290Sstevel@tonic-gate * Returns true if the <i>"X"</i>" flag is set. 1300Sstevel@tonic-gate * 1310Sstevel@tonic-gate * @return True if the <i>"X"</i> flag is set. 1320Sstevel@tonic-gate */ 1330Sstevel@tonic-gate getRequiresExplicitMatch()1340Sstevel@tonic-gate public boolean getRequiresExplicitMatch(); 1350Sstevel@tonic-gate 1360Sstevel@tonic-gate /** 1370Sstevel@tonic-gate * Returns true if the <i>"L"</i> flag is set. 1380Sstevel@tonic-gate * 1390Sstevel@tonic-gate * @return True if the <i>"L"</i> flag is set. 1400Sstevel@tonic-gate */ 1410Sstevel@tonic-gate getIsLiteral()1420Sstevel@tonic-gate public boolean getIsLiteral(); 1430Sstevel@tonic-gate 1440Sstevel@tonic-gate /** 1450Sstevel@tonic-gate * Returns <i>true</i> if the attribute is a keyword attribute. 1460Sstevel@tonic-gate * 1470Sstevel@tonic-gate * @return <i>true</i> if the attribute is a keyword attribute 1480Sstevel@tonic-gate */ 1490Sstevel@tonic-gate getIsKeyword()1500Sstevel@tonic-gate public boolean getIsKeyword(); 1510Sstevel@tonic-gate 1520Sstevel@tonic-gate } 153