|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.common.connection.BaseTransaction com.metamatrix.common.extensionmodule.spi.jdbc.JDBCExtensionModuleTransaction
public class JDBCExtensionModuleTransaction
Method Summary | |
---|---|
ExtensionModuleDescriptor |
addSource(java.lang.String principalName,
java.lang.String type,
java.lang.String sourceName,
byte[] data,
long checksum,
java.lang.String description,
boolean enabled)
Adds an extension module to the end of the list of modules |
byte[] |
getSource(java.lang.String sourceName)
Retrieves an extension module in byte[] form |
ExtensionModuleDescriptor |
getSourceDescriptor(java.lang.String sourceName)
Returns the ExtensionModuleDescriptor object for the extension module indicated by sourceName |
java.util.List |
getSourceDescriptors()
Returns List of ExtensionModuleDescriptor objects, in order of their search ordering |
java.util.List |
getSourceDescriptors(java.lang.String type,
boolean includeDisabled)
Returns List of ExtensionModuleDescriptor objects of indicated type, in order of their search ordering |
java.util.List |
getSourceNames()
Returns List (of Strings) of all extension module names, in order of their search ordering |
boolean |
isNameInUse(java.lang.String sourceName)
Indicates if an extension module name is already in used. |
boolean |
needsRefresh()
Indicates that ExtensionModuleManager should clear its cache and refresh itself because the data this object fronts has changed (optional operation). |
void |
removeSource(java.lang.String principalName,
java.lang.String sourceName)
Deletes a module from the list of modules |
void |
setEnabled(java.lang.String principalName,
java.util.Collection sourceNames,
boolean enabled)
Sets the "enabled" (for searching) property of all of the indicated extension modules. |
void |
setSearchOrder(java.lang.String principalName,
java.util.List sourceNames)
Sets the positions in the search order of all modules (all modules must be included or an ExtensionModuleOrderingException will be thrown) The sourceNames List parameter should indicate the new desired order. |
ExtensionModuleDescriptor |
setSource(java.lang.String principalName,
java.lang.String sourceName,
byte[] data,
long checksum)
Updates the indicated extension module |
ExtensionModuleDescriptor |
setSourceDescription(java.lang.String principalName,
java.lang.String sourceName,
java.lang.String description)
Updates the indicated extension module's description |
ExtensionModuleDescriptor |
setSourceName(java.lang.String principalName,
java.lang.String sourceName,
java.lang.String newName)
Updates the indicated extension module's source name |
Methods inherited from class com.metamatrix.common.connection.BaseTransaction |
---|
close, commit, finalize, getConnection, getRollbackOnFinalize, isClosed, isEnded, isReadonly, rollback, setRollbackOnFinalize |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.metamatrix.common.connection.TransactionInterface |
---|
close, commit, isClosed, isReadonly, rollback |
Method Detail |
---|
public ExtensionModuleDescriptor addSource(java.lang.String principalName, java.lang.String type, java.lang.String sourceName, byte[] data, long checksum, java.lang.String description, boolean enabled) throws DuplicateExtensionModuleException, MetaMatrixComponentException
addSource
in interface ExtensionModuleTransaction
principalName
- name of principal requesting this additiontype
- one of the known types of extension filesourceName
- name (e.g. filename) of extension moduledata
- actual contents of modulechecksum
- Checksum of file contentsdescription
- (optional) description of the extension moduleenabled
- indicates whether each extension module is enabled for
being searched or not (for convenience, a module can be disabled
without being removed)
DuplicateExtensionModuleException
- if an extension module
with the same sourceName already exists
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public void removeSource(java.lang.String principalName, java.lang.String sourceName) throws ExtensionModuleNotFoundException, MetaMatrixComponentException
removeSource
in interface ExtensionModuleTransaction
principalName
- name of principal requesting this additionsourceName
- name (e.g. filename) of extension module
ExtensionModuleNotFoundException
- if no extension module with
name sourceName can be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public java.util.List getSourceNames() throws MetaMatrixComponentException
getSourceNames
in interface ExtensionModuleTransaction
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public java.util.List getSourceDescriptors() throws MetaMatrixComponentException
getSourceDescriptors
in interface ExtensionModuleTransaction
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public java.util.List getSourceDescriptors(java.lang.String type, boolean includeDisabled) throws MetaMatrixComponentException
getSourceDescriptors
in interface ExtensionModuleTransaction
type
- one of the known types of extension fileincludeDisabled
- if "false", only descriptors for enabled
extension modules will be returned; otherwise all modules will be.
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public ExtensionModuleDescriptor getSourceDescriptor(java.lang.String sourceName) throws ExtensionModuleNotFoundException, MetaMatrixComponentException
getSourceDescriptor
in interface ExtensionModuleTransaction
sourceName
- name (e.g. filename) of extension module
ExtensionModuleNotFoundException
- if no extension module with
name sourceName can be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public void setSearchOrder(java.lang.String principalName, java.util.List sourceNames) throws ExtensionModuleOrderingException, MetaMatrixComponentException
setSearchOrder
in interface ExtensionModuleTransaction
principalName
- name of principal requesting this additionsourceNames
- Collection of String names of existing
extension modules whose search position is to be set
ExtensionModuleOrderingException
- 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)public void setEnabled(java.lang.String principalName, java.util.Collection sourceNames, boolean enabled) throws ExtensionModuleNotFoundException, MetaMatrixComponentException
setEnabled
in interface ExtensionModuleTransaction
principalName
- name of principal requesting this additionsourceNames
- Collection of String names of existing
extension modules whose "enabled" status is to be setenabled
- indicates whether each extension module is enabled for
being searched or not (for convenience, a module can be disabled
without being removed)
ExtensionModuleNotFoundException
- if no extension module with
name sourceName can be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public byte[] getSource(java.lang.String sourceName) throws ExtensionModuleNotFoundException, MetaMatrixComponentException
getSource
in interface ExtensionModuleTransaction
sourceName
- name (e.g. filename) of extension module
ExtensionModuleNotFoundException
- if no extension module with
name sourceName can be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public ExtensionModuleDescriptor setSource(java.lang.String principalName, java.lang.String sourceName, byte[] data, long checksum) throws ExtensionModuleNotFoundException, MetaMatrixComponentException
ExtensionModuleTransaction
setSource
in interface ExtensionModuleTransaction
principalName
- name of principal requesting this additionsourceName
- name (e.g. filename) of extension moduledata
- actual contents of modulechecksum
- Checksum of file contents
ExtensionModuleNotFoundException
- if no extension module with
name sourceName can be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public ExtensionModuleDescriptor setSourceName(java.lang.String principalName, java.lang.String sourceName, java.lang.String newName) throws ExtensionModuleNotFoundException, MetaMatrixComponentException
setSourceName
in interface ExtensionModuleTransaction
principalName
- name of principal requesting this additionsourceName
- name (e.g. filename) of extension modulenewName
- new name for the module
ExtensionModuleNotFoundException
- if no extension module with
name sourceName can be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public ExtensionModuleDescriptor setSourceDescription(java.lang.String principalName, java.lang.String sourceName, java.lang.String description) throws ExtensionModuleNotFoundException, MetaMatrixComponentException
setSourceDescription
in interface ExtensionModuleTransaction
principalName
- name of principal requesting this additionsourceName
- name (e.g. filename) of extension moduledescription
- (optional) description of the extension module.
null
can be passed in to indicate no description.
ExtensionModuleNotFoundException
- if no extension module with
name sourceName can be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)public boolean needsRefresh() throws MetaMatrixComponentException, java.lang.UnsupportedOperationException
needsRefresh
in interface ExtensionModuleTransaction
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)
java.lang.UnsupportedOperationException
- - this operation is not supported by this Transaction.public boolean isNameInUse(java.lang.String sourceName) throws MetaMatrixComponentException
ExtensionModuleTransaction
true
if the source name is already used,
isNameInUse
in interface ExtensionModuleTransaction
sourceName
- is the name of the extension module to check
MetaMatrixComponentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |