|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.vdb.runtime.BasicVDBInfo com.metamatrix.vdb.runtime.BasicVDBDefn
public class BasicVDBDefn
Date Dec 3, 2002
To import a VDB, the following information is required:
1. VDB Jar #setVDBJar(Object)
. This jar will provide
the model and their model info.
2. Add a model to connector binding mapping #addModelToConnectorMapping(String, String)
that indicates which binding should be used for that model
3. set VDB name (version will be assign at creation time)
Optional information:
1. Add a ConnectorBinding addConnectorBinding(ConnectorBinding)
. If this
already exist in the configration, it will not be loaded. The
model will reference the existing binding.
If not added, the connector binding mapping will indicate an
assumed already existing binding.
2. Add a ConnectorType {@link #addConnectorType(ComponentType). If
already exist in the configration, it will not be loaded. The
binding will reference the existing type.
Field Summary |
---|
Fields inherited from class com.metamatrix.vdb.runtime.BasicVDBInfo |
---|
modelInfos |
Constructor Summary | |
---|---|
BasicVDBDefn(java.lang.String name)
|
Method Summary | |
---|---|
void |
addConnectorBinding(ConnectorBinding binding)
|
void |
addConnectorBinding(java.lang.String modelName,
ConnectorBinding binding)
Call to add the binding to the VDBDefn set of bindings and add the binding to the model-to-binding mapping. |
void |
addConnectorType(ComponentType type)
|
void |
determineVdbsStatus()
|
boolean |
doesVDBHaveValidityError()
Returns true if the VDBDefn was built from a .VDB file
that had a validity error; |
ConnectorBinding |
getConnectorBindingByName(java.lang.String bindingName)
Returns the connector binding for the specified connector binding name. |
ConnectorBinding |
getConnectorBindingByRouting(java.lang.String routingUUID)
Returns the connector binding for the specified routing UUID. |
java.util.Map |
getConnectorBindings()
Returns the connector bindings that are used in this VDB. |
ComponentType |
getConnectorType(java.lang.String componentTypeName)
Returns the component type for the specified componentTypeName. |
java.util.Map |
getConnectorTypes()
Returns the connector types that are used in this VDB. |
char[] |
getDataRoles()
Get the XML contents of data roles defined for the VDB; |
java.util.Properties |
getHeaderProperties()
Header Properties |
java.util.Properties |
getInfoProperties()
|
ModelInfo |
getMatertializationModel()
Get the Materialization model in this VDB if one exists. |
java.util.Collection |
getModelNames()
Returns the collection of all the model names contained in the vdb archive. |
java.util.Map |
getModelToBindingMappings()
Returns the model to connector binding mappings. |
short |
getStatus()
Returns a short indicating if the status of the VirtualDatabase. |
VDBStream |
getVDBStream()
This will let the uses stream the VDB contents the way they would need. |
java.lang.String[] |
getVDBValidityErrors()
During the load of the VDB, if there are any validity errors reported in the VDB manifest file, they will be loaded into Defn file for observation or for the logging. |
boolean |
isActiveStatus()
|
boolean |
isBindingInUse(ConnectorBinding binding)
|
boolean |
isBindingInUse(java.lang.String bindingName)
|
boolean |
isVisible(java.lang.String resourcePath)
Is the given resource file is visible to the user. |
void |
removeConnectorBinding(java.lang.String bindingName)
|
void |
removeConnectorBinding(java.lang.String modelName,
java.lang.String bindingName)
|
void |
removeConnectorBindingNameOnly(java.lang.String bindingName)
|
void |
removeConnectorType(java.lang.String typeName)
|
ModelInfo |
removeModelInfo(java.lang.String modelName)
|
ModelInfo |
removeModelInfo(java.lang.String modelName,
boolean removeBindings)
|
void |
removeUnmappedBindings()
Remove ConnectorBindings from this VDBDefn that are not referenced by any of the ModelInfos |
void |
renameConnectorBinding(java.lang.String existingBindingName,
java.lang.String newBindingName)
|
void |
renameModelInfo(java.lang.String modelName,
java.lang.String newModelName)
|
void |
setConnectorBinding(java.lang.String modelName,
ConnectorBinding binding)
Call to add the binding to the VDBDefn set of bindings and initializes the set of model-to-binding mappings with the binding. |
protected void |
setConnectorBindings(java.util.Map bindings)
|
protected void |
setConnectorTypes(java.util.Map types)
|
void |
setDataRoles(char[] roles)
|
void |
setHeaderProperties(java.util.Properties props)
|
void |
setInfoProperties(java.util.Properties props)
|
void |
setStatus(short status)
Set the status of the VDB see MetadataConstants.VDB_STATUS |
void |
setVDBStream(VDBStream stream)
|
void |
setVDBValidityError(boolean hasError)
|
void |
setVDBValidityError(boolean hasError,
java.lang.String msg)
|
void |
setVisibility(java.lang.String resoucePath,
boolean visible)
|
Methods inherited from class com.metamatrix.vdb.runtime.BasicVDBInfo |
---|
addModelInfo, getCreatedBy, getDateCreated, getDescription, getFileName, getModel, getModels, getName, getUUID, getVersion, hasWSDLDefined, setCreatedBy, setDateCreated, setDescription, setFileName, setHasWSDLDefined, setModelInfos, setName, setUUID, setVersion, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.metamatrix.common.vdb.api.VDBDefn |
---|
getVersion |
Methods inherited from interface com.metamatrix.common.vdb.api.VDBInfo |
---|
getCreatedBy, getDateCreated, getDescription, getFileName, getModel, getModels, getName, getUUID, hasWSDLDefined |
Constructor Detail |
---|
public BasicVDBDefn(java.lang.String name)
Method Detail |
---|
public VDBStream getVDBStream()
VDBDefn
getVDBStream
in interface VDBDefn
VDBDefn.getVDBStream()
public void setVDBStream(VDBStream stream)
public boolean doesVDBHaveValidityError()
VDBDefn
true
if the VDBDefn was built from a .VDB file
that had a validity error;
doesVDBHaveValidityError
in interface VDBDefn
public void addConnectorBinding(java.lang.String modelName, ConnectorBinding binding)
modelName
- binding
- public void addConnectorBinding(ConnectorBinding binding)
public void renameConnectorBinding(java.lang.String existingBindingName, java.lang.String newBindingName)
public void removeConnectorBinding(java.lang.String bindingName)
public void removeConnectorBindingNameOnly(java.lang.String bindingName)
public void removeConnectorBinding(java.lang.String modelName, java.lang.String bindingName)
public boolean isBindingInUse(ConnectorBinding binding)
public boolean isBindingInUse(java.lang.String bindingName)
public void setConnectorBinding(java.lang.String modelName, ConnectorBinding binding)
modelName
- binding
- protected void setConnectorBindings(java.util.Map bindings)
protected void setConnectorTypes(java.util.Map types)
public void removeConnectorType(java.lang.String typeName)
public void addConnectorType(ComponentType type)
public java.util.Map getConnectorTypes()
VDBDefn
ComponentType
getConnectorTypes
in interface VDBDefn
public ComponentType getConnectorType(java.lang.String componentTypeName)
VDBDefn
getConnectorType
in interface VDBDefn
public java.util.Map getConnectorBindings()
VDBDefn
ConnectorBinding
getConnectorBindings
in interface VDBDefn
public ConnectorBinding getConnectorBindingByRouting(java.lang.String routingUUID)
VDBDefn
getConnectorBindingByRouting
in interface VDBDefn
public ConnectorBinding getConnectorBindingByName(java.lang.String bindingName)
VDBDefn
getConnectorBindingByName
in interface VDBDefn
public java.util.Map getModelToBindingMappings()
VDBDefn
getModelToBindingMappings
in interface VDBDefn
public java.util.Collection getModelNames()
getModelNames
in interface VDBDefn
public ModelInfo removeModelInfo(java.lang.String modelName, boolean removeBindings)
public ModelInfo removeModelInfo(java.lang.String modelName)
removeModelInfo
in class BasicVDBInfo
public ModelInfo getMatertializationModel()
VDBDefn
getMatertializationModel
in interface VDBDefn
null
if none exists.VDBDefn.getMatertializationModel()
public short getStatus()
VDBDefn
getStatus
in interface VDBDefn
MetadataConstants.VDB_STATUS VDB_STATUS}
public void setStatus(short status)
MetadataConstants.VDB_STATUS
status
- public boolean isActiveStatus()
isActiveStatus
in interface VDBDefn
public void setVDBValidityError(boolean hasError)
public void setVDBValidityError(boolean hasError, java.lang.String msg)
public java.lang.String[] getVDBValidityErrors()
VDBDefn
getVDBValidityErrors
in interface VDBDefn
public void determineVdbsStatus()
public void removeUnmappedBindings()
public boolean isVisible(java.lang.String resourcePath)
VDBDefn
isVisible
in interface VDBDefn
resourcePath
- - path in the VDB file
VDBDefn.isVisible(java.lang.String)
public void setVisibility(java.lang.String resoucePath, boolean visible)
public char[] getDataRoles()
VDBDefn
getDataRoles
in interface VDBDefn
VDBDefn.getDataRoles()
public void setDataRoles(char[] roles)
public void renameModelInfo(java.lang.String modelName, java.lang.String newModelName)
public java.util.Properties getHeaderProperties()
VDBDefn
getHeaderProperties
in interface VDBDefn
public void setHeaderProperties(java.util.Properties props)
public java.util.Properties getInfoProperties()
public void setInfoProperties(java.util.Properties props)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |