edu.mit.stellar.directory
Interface SubjectLookupService


public interface SubjectLookupService

A class implementing the SubjectLookupService interface can be used to perform a number of mappings between: "master subject ID + term", "site url" and "site uuid" The "site uuid" is the key for accessing a "site information service" which is a directory service for site information and attributes. To support independent sections for a subject, the 'site url' and 'site uuid' may be lists. Non-academic sites or sites which are not related to a current master subject ID would need to be know their 'site uuid' or 'site url' and could get the other given either.


Method Summary
 java.lang.String getNexusUuidByUrl(java.lang.String url)
          Returns the Nexus UUID.
 java.lang.String[] getNexusUuids(java.lang.String subjectId, java.lang.String term)
          Returns an array of String objects containing all of the Nexus UUIDs representing the given subject ID for the given term.
 java.lang.String[] getSubjectAndTerm(java.lang.String nexusUuid)
          Returns a two element array containing the master subject id as the first element and the term as the second, or null if there is no such Nexus.
 java.lang.String[] getSubjectAndTermByUrl(java.lang.String url)
          Returns a two element array containing the master subject id as the first element and the term as the second, or null if there is no such Nexus.
 java.lang.String getUrl(java.lang.String nexusUuid)
          Returns the URL for the given Nexus UUID, or null if there is no such Nexus.
 java.lang.String[] getUrls(java.lang.String subjectId, java.lang.String term)
          Returns an array of String objects containing all of the URLs for the given subject ID for the given term.
 

Method Detail

getNexusUuids

public java.lang.String[] getNexusUuids(java.lang.String subjectId,
                                        java.lang.String term)
Returns an array of String objects containing all of the Nexus UUIDs representing the given subject ID for the given term. If there is no registered Nexus for the subject, the array has a length of 0. Most often the array will have a length of 1.

Parameters:
subjectId - - The ID of the subject
term - - The term (semester)
Returns:
an array of String objects containing the UUIDs

getUrls

public java.lang.String[] getUrls(java.lang.String subjectId,
                                  java.lang.String term)
Returns an array of String objects containing all of the URLs for the given subject ID for the given term. If there is no registered Url for the subject, the array has a length of 0. Most often the array will have a length of 1.

Parameters:
subjectId - - The ID of the subject
term - - The term (semester)
Returns:
an array of String objects containing the UUIDs

getUrl

public java.lang.String getUrl(java.lang.String nexusUuid)
Returns the URL for the given Nexus UUID, or null if there is no such Nexus.

Parameters:
nexusUuid - - The UUID of the Nexus
Returns:
the url corresponding to the given UUID

getNexusUuidByUrl

public java.lang.String getNexusUuidByUrl(java.lang.String url)
Returns the Nexus UUID.

Parameters:
url - - the url corresponding to the Nexus
Returns:
nexusUuid - The UUID of the Nexus

getSubjectAndTerm

public java.lang.String[] getSubjectAndTerm(java.lang.String nexusUuid)
Returns a two element array containing the master subject id as the first element and the term as the second, or null if there is no such Nexus.

Parameters:
nexusUuid - - The UUID of the Nexus
Returns:
the master subject id, term pair corresponding to the given UUID

getSubjectAndTermByUrl

public java.lang.String[] getSubjectAndTermByUrl(java.lang.String url)
Returns a two element array containing the master subject id as the first element and the term as the second, or null if there is no such Nexus.

Parameters:
url - - the url corresponding to the Nexus
Returns:
the master subject id, term pair corresponding to the given UUID


Copyright 2006-2006 MIT AMPS. All Rights Reserved.