org.sakaiproject.component.osid.registry
Class RegistryManager

java.lang.Object
  extended byorg.sakaiproject.component.osid.registry.RegistryManager
All Implemented Interfaces:
org.osid.OsidManager, edu.mit.osid.registry.RegistryManager, Serializable

public class RegistryManager
extends Object
implements edu.mit.osid.registry.RegistryManager

RegistryManager implements a "straw-man" registry interface.

Version:
$Id: PresenceTool.java 632 2005-07-14 21:22:50Z jeffkahn@mit.edu $
Author:
Massachusetts Institute of Technology
See Also:
Serialized Form

Constructor Summary
RegistryManager()
           
 
Method Summary
 void assignConfiguration(Properties configuration)
          Store the configuration from the consumer and perform other intialization.
 void assignOsidContext(org.osid.OsidContext context)
          Store away an OsidContext from the consumer.
 edu.mit.osid.registry.Provider createProvider(String osidService, String osidVersion, String osidLoadKey, String displayName, String description, org.osid.shared.Id id, String creator, String publisher, String registrationDate, String rights)
          Append a new record element to registry XML file.
 void deleteProvider(org.osid.shared.Id providerId)
          Find the record element in the registry XML file whose identifier node matches the input.
 org.osid.OsidContext getOsidContext()
          Return the OsidContext assigned earlier.
 edu.mit.osid.registry.Provider getProvider(org.osid.shared.Id providerId)
          Return a Provider from the content in the registry XML file
 edu.mit.osid.registry.ProviderIterator getProviders()
          Examine the registry XML for information and maker Providers
 edu.mit.osid.registry.ProviderIterator getProvidersByType(org.osid.shared.Type providerType)
          Unimplemented method.
 void osidVersion_2_0()
          Checked by the org.osid.OsidLoader.getManager() method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryManager

public RegistryManager()
Method Detail

getOsidContext

public org.osid.OsidContext getOsidContext()
                                    throws edu.mit.osid.registry.RegistryException
Return the OsidContext assigned earlier.

Specified by:
getOsidContext in interface edu.mit.osid.registry.RegistryManager
Throws:
edu.mit.osid.registry.RegistryException

assignOsidContext

public void assignOsidContext(org.osid.OsidContext context)
                       throws org.osid.repository.RepositoryException
Store away an OsidContext from the consumer.

Specified by:
assignOsidContext in interface edu.mit.osid.registry.RegistryManager
Throws:
org.osid.repository.RepositoryException

assignConfiguration

public void assignConfiguration(Properties configuration)
                         throws org.osid.repository.RepositoryException
Store the configuration from the consumer and perform other intialization. This method should be called after assignOsidContext() and before any others. The default OsidLoader does this automatically.

Specified by:
assignConfiguration in interface edu.mit.osid.registry.RegistryManager
Throws:
org.osid.repository.RepositoryException

getProviders

public edu.mit.osid.registry.ProviderIterator getProviders()
                                                    throws edu.mit.osid.registry.RegistryException
Examine the registry XML for information and maker Providers

Specified by:
getProviders in interface edu.mit.osid.registry.RegistryManager
Throws:
edu.mit.osid.registry.RegistryException

getProvidersByType

public edu.mit.osid.registry.ProviderIterator getProvidersByType(org.osid.shared.Type providerType)
                                                          throws edu.mit.osid.registry.RegistryException
Unimplemented method. We have no Provider Types for the community at this time.

Specified by:
getProvidersByType in interface edu.mit.osid.registry.RegistryManager
Throws:
edu.mit.osid.registry.RegistryException

getProvider

public edu.mit.osid.registry.Provider getProvider(org.osid.shared.Id providerId)
                                           throws edu.mit.osid.registry.RegistryException
Return a Provider from the content in the registry XML file

Specified by:
getProvider in interface edu.mit.osid.registry.RegistryManager
Throws:
edu.mit.osid.registry.RegistryException

createProvider

public edu.mit.osid.registry.Provider createProvider(String osidService,
                                                     String osidVersion,
                                                     String osidLoadKey,
                                                     String displayName,
                                                     String description,
                                                     org.osid.shared.Id id,
                                                     String creator,
                                                     String publisher,
                                                     String registrationDate,
                                                     String rights)
                                              throws edu.mit.osid.registry.RegistryException
Append a new record element to registry XML file. Omit any nodes where the input argument is null, except for the Registration Date. If that is null, insert the current date and time.

Specified by:
createProvider in interface edu.mit.osid.registry.RegistryManager
Throws:
edu.mit.osid.registry.RegistryException

deleteProvider

public void deleteProvider(org.osid.shared.Id providerId)
                    throws edu.mit.osid.registry.RegistryException
Find the record element in the registry XML file whose identifier node matches the input. Remove that record and re-save the XML.

Specified by:
deleteProvider in interface edu.mit.osid.registry.RegistryManager
Throws:
edu.mit.osid.registry.RegistryException

osidVersion_2_0

public void osidVersion_2_0()
                     throws edu.mit.osid.registry.RegistryException
Checked by the org.osid.OsidLoader.getManager() method

Specified by:
osidVersion_2_0 in interface edu.mit.osid.registry.RegistryManager
Throws:
edu.mit.osid.registry.RegistryException