edu.mit.stellar.directory
Interface Nexus


public interface Nexus

A class implementing the Nexus interface allows directory information about a nexus to be accessed.


Method Summary
 java.util.Locale[] getAvailableLocales()
          Returns an array of Locales that may be used to localize parameters.
 java.lang.String getDescription()
          Returns the description of the Nexus This is equivalent to getProperty("description"), but returns "" rather than null if there is no description.
 java.util.Locale getLocale()
          Returns the currently set Locale.
 java.lang.String getName()
          Returns the short name of the Nexus.
 java.lang.String getProperty(java.lang.String name)
          Returns the value of a Nexus's information property as a String in the current Locale, or null if the property does not exist.
 java.util.Map getPropertyMap()
          Returns a java.util.Map of the properties for this Nexus in the current Locale.
 java.util.Enumeration getPropertyNames()
          Returns an Enumeration of String objects containing the names of the properties for this Nexus.
 java.lang.String[] getPropertyValues(java.lang.String name)
          Returns an array of String objects containing all of the values the given Nexus's property has in the current Locale, or null if the property does not exist.
 java.lang.String getTitle()
          Returns the title of the Nexus (a one line description) This is equivalent to getProperty("title"), but returns "" rather than null if there is no title.
 void setLocale(java.util.Locale locale)
          Sets the current Locale to be used in parameter returns for this Nexus.
 

Method Detail

getAvailableLocales

public java.util.Locale[] getAvailableLocales()
Returns an array of Locales that may be used to localize parameters.

Returns:
an array of Locales that may be used as arguments to setLocale

setLocale

public void setLocale(java.util.Locale locale)
Sets the current Locale to be used in parameter returns for this Nexus.

Parameters:
locale - the desired Locale
See Also:
getLocale()

getLocale

public java.util.Locale getLocale()
Returns the currently set Locale.

Returns:
the current Locale.
See Also:
setLocale(java.util.Locale)

getProperty

public java.lang.String getProperty(java.lang.String name)
Returns the value of a Nexus's information property as a String in the current Locale, or null if the property does not exist. You should only use this method when you are sure the property has only one value. If the property might have more than one value, use getPropertyValues(java.lang.String). If you use this method with a multivalued property, the value returned is equal to the first value in the array returned by getPropertyValues.

Parameters:
name - - a String specifying the name of the property
Returns:
a String representing the single value of the property
See Also:
getPropertyValues(java.lang.String)

getPropertyValues

public java.lang.String[] getPropertyValues(java.lang.String name)
Returns an array of String objects containing all of the values the given Nexus's property has in the current Locale, or null if the property does not exist. If the property has a single value, the array has a length of 1.

Parameters:
name - - a String containing the name of the property whose value is requested
Returns:
an array of String objects containing the property's values
See Also:
getProperty(java.lang.String)

getPropertyMap

public java.util.Map getPropertyMap()
Returns a java.util.Map of the properties for this Nexus in the current Locale.

Returns:
an immutable java.util.Map containing property names as keys and property values as map values. The keys in the property map are of type String. The values in the property map are of type String array.

getPropertyNames

public java.util.Enumeration getPropertyNames()
Returns an Enumeration of String objects containing the names of the properties for this Nexus. If the Nexus has no properties, the method returns an empty Enumeration.

Returns:
an Enumeration of String objects, each String containing the name of a request property; or an empty Enumeration if the Nexus has no properties

getName

public java.lang.String getName()
Returns the short name of the Nexus. This is equivalent to getProperty("name"), but returns "" rather than null if there is no name property.

Returns:
the name

getTitle

public java.lang.String getTitle()
Returns the title of the Nexus (a one line description) This is equivalent to getProperty("title"), but returns "" rather than null if there is no title.

Returns:
the title

getDescription

public java.lang.String getDescription()
Returns the description of the Nexus This is equivalent to getProperty("description"), but returns "" rather than null if there is no description.

Returns:
the description


Copyright 2006-2006 MIT AMPS. All Rights Reserved.