com.metamatrix.platform.admin.api
Interface ExtensionSourceAdminAPI

All Superinterfaces:
SubSystemAdminAPI
All Known Implementing Classes:
ExtensionSourceAdminAPIImpl

public interface ExtensionSourceAdminAPI
extends SubSystemAdminAPI

Administrative subsystem API for managing extension sources: JAR files and other assorted XML files centrally accessible via the Platform.


Field Summary
static int SOURCE_DESCRIPTION_LENGTH_LIMIT
          The limit to the number of characters an extension source description can be.
static int SOURCE_NAME_LENGTH_LIMIT
          The limit to the number of characters an extension source name can be.
 
Method Summary
 ExtensionModuleDescriptor addSource(java.lang.String type, java.lang.String sourceName, byte[] source, java.lang.String description, boolean enabled)
          Adds an extension source to the end of the list of sources
 ExtensionModuleDescriptor getSourceDescriptor(java.lang.String sourceName)
          Returns the ExtensionSourceDescriptor object for the extension source indicated by sourceName
 java.util.List getSourceDescriptors()
          Returns List of ExtensionSourceDescriptor objects, in order of their search ordering
 java.util.List getSourceNames()
          Returns List (of Strings) of all extension source names, in order of their search ordering
 java.util.Collection getSourceTypes()
          Returns List (of Strings) of all extension source types currently supported.
 boolean isSourceExists(java.lang.String sourceName)
          Checks if the extension module exists.
 void removeSource(java.lang.String sourceName)
          Deletes a source from the list of sources
 java.util.List setEnabled(java.util.Collection sourceNames, boolean enabled)
          Sets the "enabled" (for searching) property of all of the indicated extension sources.
 java.util.List setSearchOrder(java.util.List sourceNames)
          Sets the positions in the search order of all sources (all sources must be included or an ExtensionSourceOrderingException will be thrown) The sourceNames List parameter should indicate the new desired order.
 ExtensionModuleDescriptor setSource(java.lang.String sourceName, byte[] source)
          Updates the indicated extension source
 ExtensionModuleDescriptor setSourceDescription(java.lang.String sourceName, java.lang.String description)
          Updates the indicated extension source's description
 ExtensionModuleDescriptor setSourceName(java.lang.String sourceName, java.lang.String newName)
          Updates the indicated extension source's source name
 

Field Detail

SOURCE_NAME_LENGTH_LIMIT

static final int SOURCE_NAME_LENGTH_LIMIT
The limit to the number of characters an extension source name can be.

See Also:
Constant Field Values

SOURCE_DESCRIPTION_LENGTH_LIMIT

static final int SOURCE_DESCRIPTION_LENGTH_LIMIT
The limit to the number of characters an extension source description can be.

See Also:
Constant Field Values
Method Detail

addSource

ExtensionModuleDescriptor addSource(java.lang.String type,
                                    java.lang.String sourceName,
                                    byte[] source,
                                    java.lang.String description,
                                    boolean enabled)
                                    throws InvalidSessionException,
                                           AuthorizationException,
                                           DuplicateExtensionModuleException,
                                           InvalidExtensionModuleTypeException,
                                           MetaMatrixComponentException
Adds an extension source to the end of the list of sources

Parameters:
type - one of the known types of extension file
sourceName - name (e.g. filename) of extension source
source - actual contents of source
description - (optional) description of the extension source
enabled - indicates whether each extension source is enabled for being searched or not (for convenience, a source can be disabled without being removed)
Returns:
ExtensionSourceDescriptor describing the newly-added extension source
Throws:
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
DuplicateExtensionSourceException - if an extension source with the same sourceName already exists
InvalidExtensionTypeException - if the indicated type is not one of the currently-supported extension source types
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
DuplicateExtensionModuleException
InvalidExtensionModuleTypeException

removeSource

void removeSource(java.lang.String sourceName)
                  throws InvalidSessionException,
                         AuthorizationException,
                         ExtensionModuleNotFoundException,
                         MetaMatrixComponentException
Deletes a source from the list of sources

Parameters:
sourceName - name (e.g. filename) of extension source
Throws:
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
ExtensionSourceNotFoundException - if no extension source with name sourceName can be found
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
ExtensionModuleNotFoundException

getSourceTypes

java.util.Collection getSourceTypes()
                                    throws InvalidSessionException,
                                           AuthorizationException,
                                           MetaMatrixComponentException
Returns List (of Strings) of all extension source types currently supported.

Returns:
List of the String names of the currently-supported extension source types
Throws:
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)

getSourceNames

java.util.List getSourceNames()
                              throws InvalidSessionException,
                                     AuthorizationException,
                                     MetaMatrixComponentException
Returns List (of Strings) of all extension source names, in order of their search ordering

Returns:
List (of Strings) of all extension source names, in order of their search ordering
Throws:
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)

getSourceDescriptors

java.util.List getSourceDescriptors()
                                    throws InvalidSessionException,
                                           AuthorizationException,
                                           MetaMatrixComponentException
Returns List of ExtensionSourceDescriptor objects, in order of their search ordering

Returns:
List of ExtensionSourceDescriptor objects, in order of their search ordering
Throws:
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)

getSourceDescriptor

ExtensionModuleDescriptor getSourceDescriptor(java.lang.String sourceName)
                                              throws InvalidSessionException,
                                                     AuthorizationException,
                                                     ExtensionModuleNotFoundException,
                                                     MetaMatrixComponentException
Returns the ExtensionSourceDescriptor object for the extension source indicated by sourceName

Parameters:
sourceName - name (e.g. filename) of extension source
Returns:
the ExtensionSourceDescriptor object for the extension source indicated by sourceName
Throws:
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
ExtensionSourceNotFoundException - if no extension source with name sourceName can be found
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
ExtensionModuleNotFoundException

setSearchOrder

java.util.List setSearchOrder(java.util.List sourceNames)
                              throws InvalidSessionException,
                                     AuthorizationException,
                                     ExtensionModuleOrderingException,
                                     MetaMatrixComponentException
Sets the positions in the search order of all sources (all sources must be included or an ExtensionSourceOrderingException will be thrown) The sourceNames List parameter should indicate the new desired order.

Parameters:
sourceNames - Collection of String names of existing extension sources whose search position is to be set
Returns:
updated List of ExtensionSourceDescriptor objects, in order of their search ordering
Throws:
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
ExtensionSourceOrderingException - if the extension files could not be ordered as requested because another administrator had concurrently added or removed an extension file or files, or because an indicated position is out of bounds.
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
ExtensionModuleOrderingException

setEnabled

java.util.List setEnabled(java.util.Collection sourceNames,
                          boolean enabled)
                          throws InvalidSessionException,
                                 AuthorizationException,
                                 ExtensionModuleNotFoundException,
                                 MetaMatrixComponentException
Sets the "enabled" (for searching) property of all of the indicated extension sources.

Parameters:
sourceNames - Collection of String names of existing extension sources whose "enabled" status is to be set
enabled - indicates whether each extension source is enabled for being searched or not (for convenience, a source can be disabled without being removed)
Returns:
updated List of ExtensionSourceDescriptor objects, in order of their search ordering
Throws:
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
ExtensionSourceNotFoundException - if no extension source with name sourceName can be found
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
ExtensionModuleNotFoundException

setSource

ExtensionModuleDescriptor setSource(java.lang.String sourceName,
                                    byte[] source)
                                    throws InvalidSessionException,
                                           AuthorizationException,
                                           ExtensionModuleNotFoundException,
                                           MetaMatrixComponentException
Updates the indicated extension source

Parameters:
sourceName - name (e.g. filename) of extension source
source - actual contents of source
Returns:
ExtensionSourceDescriptor describing the newly-updated extension source
Throws:
InvalidSessionException - if there is not a valid administrative session
AuthorizationException - if the administrator does not have privileges to use this method
ExtensionSourceNotFoundException - if no extension source with name sourceName can be found
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
ExtensionModuleNotFoundException

setSourceName

ExtensionModuleDescriptor setSourceName(java.lang.String sourceName,
                                        java.lang.String newName)
                                        throws InvalidSessionException,
                                               AuthorizationException,
                                               ExtensionModuleNotFoundException,
                                               MetaMatrixComponentException
Updates the indicated extension source's source name

Parameters:
sourceName - name (e.g. filename) of extension source
newName - new name for the source
Returns:
ExtensionSourceDescriptor describing the newly-updated extension source
Throws:
ExtensionSourceNotFoundException - if no extension source with name sourceName can be found
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
InvalidSessionException
AuthorizationException
ExtensionModuleNotFoundException

setSourceDescription

ExtensionModuleDescriptor setSourceDescription(java.lang.String sourceName,
                                               java.lang.String description)
                                               throws InvalidSessionException,
                                                      AuthorizationException,
                                                      ExtensionModuleNotFoundException,
                                                      MetaMatrixComponentException
Updates the indicated extension source's description

Parameters:
sourceName - name (e.g. filename) of extension source
description - (optional) description of the extension source. null can be passed in to indicate no description.
Returns:
ExtensionSourceDescriptor describing the newly-updated extension source
Throws:
ExtensionSourceNotFoundException - if no extension source with name sourceName can be found
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
InvalidSessionException
AuthorizationException
ExtensionModuleNotFoundException

isSourceExists

boolean isSourceExists(java.lang.String sourceName)
                       throws InvalidSessionException,
                              AuthorizationException,
                              MetaMatrixComponentException
Checks if the extension module exists.

Parameters:
sourceName - name (e.g. filename) of extension source
Returns:
Returns true if the Extension module exists. false otherwise.
Throws:
InvalidSessionException
AuthorizationException
MetaMatrixComponentException


Copyright © 2009. All Rights Reserved.