| java.lang.Object com.metaboss.sdlctools.models.impl.ModelRepositoryImpl
Inner Class :class MetaModelDescriptor | |
Inner Class :class ModelDescriptor | |
Inner Class :static class ModelPartitionDescriptor | |
Inner Class :static class ModelAttachmentUpdateDescriptor | |
Inner Class :class ModelUpdatePlan | |
Inner Class :class ModelExportPlan | |
Method Summary | |
public void | beginTransaction() | public void | clearDataAttachedToObject(RefObject lObject) | public void | close() | public void | closeModel(String pModelName) Closes model in repository without saving any changes to the location specified at the time model was created or opened. | public void | commitTransaction() | public boolean | containsMetaModel(String pMetaModelName) Parameters: pMetaModelName - the unique name of the MetaModel. | public boolean | containsModel(String pModelName) Parameters: pModelName - the unique name of the Model given to it when it was opened or created. | public RefObject | copyModelElement(RefObject pSourceObject, String pTargetModelName, boolean pDeepCopy, ModelElementResolver pExternalElementResolver) This helper method copies given object to different model and returns newly created object.
Parameters: pSourceObject - the object to copy from Parameters: pTargetModelName - the model to copy. | public void | createModel(String pModelName, File pModelRootFile, String pMetaModelName, Properties pModelStorageProperties) Creates a new model in the model repository. | public ModelExportPlan | createModelExportPlan(ModelDescriptor pModelDescriptor, File pTargetModelRootFile, Properties pTargetStorageProperties) Helper. | public ModelUpdatePlan | createModelUpdatePlan(ModelDescriptor pModelDescriptor) Helper. | public RefObject | duplicateModelElement(RefObject pSourceObject) This helper method duplicates given object in the same model and returns newly created object. | public void | emptyModelElement(RefObject pModelElement) | public void | exportModel(String pModelName, boolean pValidateModel, File pModelRootFile, Properties pModelStorageProperties) Saves model at the location specified explicitly in this call.
Repository must not be in transaction at the time of this call.
All files will be saved as this is not an existing location. | public byte[] | getDataAttachedToObject(RefObject lObject) | public RefPackage | getDefaultModelExtent() Retrieves the RefPackage representing the outermost package of the default Model.
The model is set as default by using setDefaultModel()
All model exploration and navigation and editing can start from here
the requested RefPackage. | public String | getDefaultModelMetaModelName() | public String | getDefaultModelName() | public ModelPackage | getMetaModelExtent(String pMetaModelName) Retrieves the ModelPackage representing the outermost package of the specified MetaModel. | public String | getMetaModelName(String pModelName) Retrieves the name of the MetaModel for this model
Parameters: pModelName - the unique name of the Model. | ModelDescriptor | getModelDescriptor(RefBaseObject pModelObject) | Collection | getModelDescriptors() | public RefPackage | getModelExtent(String pModelName) Retrieves the RefPackage representing the outermost package of the specified Model. | public RefBaseObject | getModelObjectByRepositoryId(String pRepositoryId) Retrieves the RefBaseObject represented by the RepositoryId (MOF Id). | public RefPackage | getModelPackage(String pModelName, MofPackage pPackageDescriptor) Retrieves the RefPackage described by supplied package descriptor.
Parameters: pModelName - the unique name of the Model. | public String | getOwnerMetaModelName(RefBaseObject pModelObject) Retrieves the name of the model given object belongs to.
Parameters: pModelObject - the object from the model. | public String | getOwnerModelName(RefBaseObject pModelObject) Retrieves the name of the model given object belongs to.
Parameters: pModelObject - the object from the model. | public static ModelRepositoryImpl | getRepository() | public List | getTopLevelModelObjects(String pModelName) Retrieves the collection of the RefObjects which are at the top level
that is they are not owned by any other object.
Parameters: pModelName - the unique name of the Model. | public boolean | isClosed() | public boolean | isInTransaction() | boolean | isLoadedModelObject(RefObject pRefObject) | public boolean | isModelModified(String pModelName) Checks if model has been modified and needs saving
Repository must not be in transaction at the time of this call.
Only files modified since last save will be considered. | public String[] | listMetaModelNames() Lists names of the loaded MetaModels.
array of strings containg the names of the loaded MetaModels. | public String[] | listModelNames() Lists names of the loaded Models.
array of strings containg the names of the loaded Models. | public void | loadMetaModel(String pMetaModelName, File pMetaModelFile, String pModelRootPackageMetaObjectName, Properties pDefaultModelStorageProperties) Loads meta model from the specified URL to the model repository. | public void | loadMetaModel(String pMetaModelName, InputStream pMetaModelInputStream, String pMetaModelURIString, String pModelRootPackageMetaObjectName, Properties pDefaultModelStorageProperties) Loads meta model from the specified URL to the model repository. | public void | openModel(String pModelName, File pModelRootFile, String pMetaModelName) Opens the model from the specified URL to the model repository. | public void | processCreateInstance(ModelRepositoryImpl.ModelDescriptor pAffectedModelDescriptor, RefObject pAffectedParentInstance, RefObject pNewlyCreatedInstance) | public void | processDeleteInstance(ModelRepositoryImpl.ModelDescriptor pAffectedModelDescriptor, RefObject pInstanceBeingDeleted) | public void | processPostCommitTransaction(ModelRepositoryImpl.ModelDescriptor pAffectedModelDescriptor) | public void | processPostCreateInstance(ModelRepositoryImpl.ModelDescriptor pAffectedModelDescriptor, String pAffectedParentObjectRepositoryId, String pCreatedObjectRepositoryId) | public void | processPostDeleteInstance(ModelRepositoryImpl.ModelDescriptor pAffectedModelDescriptor, String pAffectedParentInstanceRepositoryId, String pDeletedInstanceRepositoryId) | public void | processPostUpdateInstanceAttribute(ModelRepositoryImpl.ModelDescriptor pAffectedModelDescriptor, String pUpdatedInstanceRepositoryId, String pUpdatedAttributeName, Object pOldAttributeValue, Object pNewAttributeValue) | public void | processUpdateInstanceAttribute(ModelRepositoryImpl.ModelDescriptor pAffectedModelDescriptor, RefObject pAffectedInstance, String pAffectedAttributeName, Object pOldAttributeValue, Object pNewAttributeValue) | public void | processUpdateInstanceReference(ModelRepositoryImpl.ModelDescriptor pAffectedModelDescriptor, RefObject pAffectedInstance, String pAfectedReferenceName, RefObject pReferencedModelElementToRemove, RefObject pReferencedModelElementToAdd) | public void | rectifyModel(String pModelName) Attempts to correct the errors in the given model.
Repository must not be in transaction at the time of this call.
Parameters: pModelName - the unique name of the model which must be loaded into the repository prior to this call. exception: ModelRepositoryException - thrown if there was a general problem with accessing the model. | public void | registerModelAssistant(String pMetaModelName, ModelAssistant pAssistant) Adds the assistant to the metamodel. | public void | registerModelListener(String pModelName, ModelListener pModelListener) Adds a listener object to the model. | public void | removeMetaModel(String pMetaModelName) Removes MetaModel with the specified name. | public void | retrofitModelElement(RefObject pSampleObject, RefObject pTargetObject, ModelElementResolver pExternalElementResolver) This helper method changes all internals of the target object to be exactly the same as
the internals of the sample object. | public void | rollbackTransaction() | public void | saveDefaultModel(boolean pValidateModel) Saves default model at the location specified at the time model was created or opened.
Repository must not be in transaction at the time of this call. | public void | saveDefaultModelAs(boolean pValidateModel, File pNewModelRootFile, Properties pNewModelStorageProperties) Saves default model at the location specified in this method call. | public void | saveModel(String pModelName, boolean pValidateModel) Saves model at the location specified at the time model was created or opened.
Repository must not be in transaction at the time of this call. | public void | saveModelAs(String pModelName, boolean pValidateModel, File pNewModelRootFile, Properties pNewModelStorageProperties) Saves model at the location specified in this method call. | public List | searchByXPath(String pModelName, String pXPathExpression) Retrieves the collection of the RefBaseObjects matching given XPath expression
Parameters: pModelName - the unique name of the Model. | public List | searchByXPath(RefBaseObject pRootObject, String pXPathExpression) Retrieves the collection of the RefBaseObjects matching given XPath expression
Parameters: pContextObject - the object relative to which the given XPath expression should be executed. Parameters: pXPathExpression - the xpath expression the requested RefBaseObject. | public List | searchByXPath(Collection pRootObjects, String pXPathExpression) Retrieves the collection of the Objects matching given XPath expression. | public void | setDataAttachedToObject(RefObject lObject, byte[] pAttachedData) | public String | setDefaultModel(String pModelName) Sets the default model name. | public void | unregisterModelAssistant(String pMetaModelName, ModelAssistant pAssistant) Removes the assistant from the metamodel. | public void | unregisterModelListener(String pModelName, ModelListener pModelListener) Removes a listener object from the metamodel. | public void | validateModel(String pModelName) Verifies model constraints on the given model. |
clearDataAttachedToObject | public void clearDataAttachedToObject(RefObject lObject) throws ModelRepositoryException(Code) | | Clears data attached to the object
|
closeModel | public void closeModel(String pModelName) throws ModelRepositoryException(Code) | | Closes model in repository without saving any changes to the location specified at the time model was created or opened.
Repository must not be in transaction at the time of this call.
All modifications to the model will be lost
Parameters: pModelName - the unique name of the model. exception: ModelRepositoryException - thrown if there was a problem with the closing of the Model |
containsMetaModel | public boolean containsMetaModel(String pMetaModelName) throws ModelRepositoryException(Code) | | Parameters: pMetaModelName - the unique name of the MetaModel. true if metamodel with the specified name is already loaded exception: ModelRepositoryException - thrown if there is a problem with answering the question |
containsModel | public boolean containsModel(String pModelName) throws ModelRepositoryException(Code) | | Parameters: pModelName - the unique name of the Model given to it when it was opened or created. true if model with the specified name is already loaded exception: ModelRepositoryException - thrown if there is a problem with answering the question |
copyModelElement | public RefObject copyModelElement(RefObject pSourceObject, String pTargetModelName, boolean pDeepCopy, ModelElementResolver pExternalElementResolver) throws ModelRepositoryException(Code) | | This helper method copies given object to different model and returns newly created object.
Parameters: pSourceObject - the object to copy from Parameters: pTargetModelName - the model to copy. Must be different to the model which ownssource object and also must be of the same type (same metamodel) Parameters: pDeepCopy - - if equals true - all contained objects are also copied. Associations withincopied hierarchy are copied, but external associations are dropped (note that this may make newly copiedobject tree invalid). |
createModel | public void createModel(String pModelName, File pModelRootFile, String pMetaModelName, Properties pModelStorageProperties) throws ModelRepositoryException(Code) | | Creates a new model in the model repository. This model is to be kept at the specified file location.
The metamodel of the model must have been loaded prior to this call. The created empty model can be
modified and results saved back if required.
Parameters: pModelName - the unique name caller wishes to refer to this model in the future. Must be unique name not used before in this repository session. Parameters: pModelRootFile - the file where definition of the Model shall be kept. Must refer to the non-existing xmi file in the existingand accessible directory. If model storage is partitioned - this file must refer to the root file. Locations of all otherpartitions are expected to be relative to this file. Parameters: pMetaModelName - the unique name of the MetaModel. MetaModel with this name must have been added previously to the repository. Parameters: pModelStorageProperties - model storage properties to use. null passed hereindicates that default properties should be used (default properties are set when MetaModel is openedvia ModelRepositoryImpl.loadMetaModel(String,URL,String,Properties) loadMetaModel method. If default properties are indicating partititoning and model being opened is not partitioned - empty properties object must be specified. exception: ModelRepositoryException - thrown if there was a problem with the loading of the Model |
createModelExportPlan | public ModelExportPlan createModelExportPlan(ModelDescriptor pModelDescriptor, File pTargetModelRootFile, Properties pTargetStorageProperties) throws ModelRepositoryException(Code) | | Helper. Creates ModelUpdatePlan for the moment.
Assumes that the repository is synchronised not closed and not in transaction
Uses default storage properties and threfore default XMI reference provider
Parameters: pModelDescriptor - the descriptor of the model to generate plan for exception: ModelRepositoryException - thrown if there was a problem with the saving the Model |
createModelUpdatePlan | public ModelUpdatePlan createModelUpdatePlan(ModelDescriptor pModelDescriptor) throws ModelRepositoryException(Code) | | Helper. Creates ModelUpdatePlan for the moment.
Assumes that the repository is synchronised not closed and not in transaction
Uses default storage properties and threfore default XMI reference provider
Parameters: pModelDescriptor - the descriptor of the model to generate plan for exception: ModelRepositoryException - thrown if there was a problem with the saving the Model |
duplicateModelElement | public RefObject duplicateModelElement(RefObject pSourceObject) throws ModelRepositoryException(Code) | | This helper method duplicates given object in the same model and returns newly created object.
Parameters: pSourceObject - the object to copy from. |
emptyModelElement | public void emptyModelElement(RefObject pModelElement) throws ModelRepositoryException(Code) | | This helper method empties given model element, which means it deletes all
attributes and contained objects
Parameters: pModelElement - the model element to empty |
exportModel | public void exportModel(String pModelName, boolean pValidateModel, File pModelRootFile, Properties pModelStorageProperties) throws ModelRepositoryException(Code) | | Saves model at the location specified explicitly in this call.
Repository must not be in transaction at the time of this call.
All files will be saved as this is not an existing location.
Parameters: pModelName - the unique name of the model. Parameters: pValidateModel - if set to true - model will be validated before saving andin case if validation errors have been discovered - exception will be thrown andmodel will not be saved. Parameters: pModelRootFile - the file where top level definition of the Model should besaved to. If file exists it will be overwritten. If directory does not exist - it will be created. If model storage is partitioned - more files and subdirectories will be created as needed. Parameters: pModelStorageProperties - model storage properties to use. null passed hereindicates that default properties should be used (default properties are set when MetaModel is openedvia ModelRepositoryImpl.loadMetaModel(String,URL,String,Properties) loadMetaModel method.If it is desired to save model in unpartitioned fashion - empty properties object must be specified. exception: ModelRepositoryException - thrown if there was a general problem with the saving the Model exception: ModelValidationException - thrown if there was one or more validation problems.Caller may use getExplanation() method offered by this exception to discover what is actually wrong |
getDataAttachedToObject | public byte[] getDataAttachedToObject(RefObject lObject) throws ModelRepositoryException(Code) | | the data attached to object or null if no data is attached to object |
getDefaultModelExtent | public RefPackage getDefaultModelExtent() throws ModelRepositoryException(Code) | | Retrieves the RefPackage representing the outermost package of the default Model.
The model is set as default by using setDefaultModel()
All model exploration and navigation and editing can start from here
the requested RefPackage. |
getDefaultModelMetaModelName | public String getDefaultModelMetaModelName() throws ModelRepositoryException(Code) | | the name of the metamodel of the default model or null if default model is not setup |
getMetaModelExtent | public ModelPackage getMetaModelExtent(String pMetaModelName) throws ModelRepositoryException(Code) | | Retrieves the ModelPackage representing the outermost package of the specified MetaModel.
All MetaModel exporation and navigation can start from here.
Parameters: pMetaModelName - the unique name of the Model. Model with this name must have been opened or created previously in the repository. the requested MetaModelPackage. exception: ModelRepositoryException - thrown if there is a problem with obtaining the extent |
getMetaModelName | public String getMetaModelName(String pModelName) throws ModelRepositoryException(Code) | | Retrieves the name of the MetaModel for this model
Parameters: pModelName - the unique name of the Model. Model with this name must have been opened or created previously in the repository. the matching MetaModel name. |
getModelDescriptor | ModelDescriptor getModelDescriptor(RefBaseObject pModelObject) throws ModelRepositoryException(Code) | | Retrieves the ModelDescriptor given any RefObject belonging to the model
valid ModelDescriptor exception: ModelRepositoryException - thrown if given object is not part of any model |
getModelExtent | public RefPackage getModelExtent(String pModelName) throws ModelRepositoryException(Code) | | Retrieves the RefPackage representing the outermost package of the specified Model. All model exporation and navigation and editing can start from here
Parameters: pModelName - the unique name of the Model. Model with this name must have been opened or created previously in the repository. the requested RefPackage. |
getModelObjectByRepositoryId | public RefBaseObject getModelObjectByRepositoryId(String pRepositoryId) throws ModelRepositoryException(Code) | | Retrieves the RefBaseObject represented by the RepositoryId (MOF Id). All model exploration and navigation and editing can start from here
Parameters: pRepositoryId - the unique repository id of the object. Object with the same name must exist in the repository. the requested RefBaseObject. |
getModelPackage | public RefPackage getModelPackage(String pModelName, MofPackage pPackageDescriptor) throws ModelRepositoryException(Code) | | Retrieves the RefPackage described by supplied package descriptor.
Parameters: pModelName - the unique name of the Model. Model with this name must have been opened or created previously in the repository. Parameters: pPackageDescriptor - the descriptor of the package we are after. the requested RefPackage. exception: ModelRepositoryException - thrown if there is a problem with obtaining the package from the model |
getOwnerMetaModelName | public String getOwnerMetaModelName(RefBaseObject pModelObject) throws ModelRepositoryException(Code) | | Retrieves the name of the model given object belongs to.
Parameters: pModelObject - the object from the model. the name of the model exception: ModelRepositoryException - thrown if there is a problem with obtaining the name of the model |
getOwnerModelName | public String getOwnerModelName(RefBaseObject pModelObject) throws ModelRepositoryException(Code) | | Retrieves the name of the model given object belongs to.
Parameters: pModelObject - the object from the model. the name of the model exception: ModelRepositoryException - thrown if there is a problem with obtaining the name of the model |
getTopLevelModelObjects | public List getTopLevelModelObjects(String pModelName) throws ModelRepositoryException(Code) | | Retrieves the collection of the RefObjects which are at the top level
that is they are not owned by any other object.
Parameters: pModelName - the unique name of the Model. Model with this name must have been opened or created previously in the repository. the list with zero or more RefObjects, which are not owned by any other object. |
isClosed | public boolean isClosed()(Code) | | |
isLoadedModelObject | boolean isLoadedModelObject(RefObject pRefObject) throws ModelRepositoryException(Code) | | true if object is part of any loaded model, false otherwise |
isModelModified | public boolean isModelModified(String pModelName) throws ModelRepositoryException(Code) | | Checks if model has been modified and needs saving
Repository must not be in transaction at the time of this call.
Only files modified since last save will be considered.
Parameters: pModelName - the unique name of the model. exception: ModelRepositoryException - thrown if there was a general problem with checking if model needs saving or not |
listMetaModelNames | public String[] listMetaModelNames() throws ModelRepositoryException(Code) | | Lists names of the loaded MetaModels.
array of strings containg the names of the loaded MetaModels. Can be zero length array if repository is empty. exception: ModelRepositoryException - thrown if there is a problem with obtaining the list of MetaModels |
listModelNames | public String[] listModelNames() throws ModelRepositoryException(Code) | | Lists names of the loaded Models.
array of strings containg the names of the loaded Models. Can be zero length array if repository has no models loaded. exception: ModelRepositoryException - thrown if there is a problem with obtaining the list of Models |
loadMetaModel | public void loadMetaModel(String pMetaModelName, File pMetaModelFile, String pModelRootPackageMetaObjectName, Properties pDefaultModelStorageProperties) throws ModelRepositoryException(Code) | | Loads meta model from the specified URL to the model repository. After loading
meta model becomes available and models (i.e. instances of this metamodel) can be loaded.
Parameters: pMetaModelName - the unique name caller wishes to refer to this metamodel in the future. Must be unique name not used before in this repository session. Parameters: pMetaModelFile - the File where MOF definition of the MetaModel can be loaded from. Must refer to the xmi file containing MOF model (i.e. definition of this metamodel). Parameters: pDefaultModelStorageProperties - model storage properties to use as default in case model specific properties are not supplied when model is loaded the package for newly loaded metamodel exception: ModelRepositoryException - thrown if there was a problem with the loading of the metamodel |
loadMetaModel | public void loadMetaModel(String pMetaModelName, InputStream pMetaModelInputStream, String pMetaModelURIString, String pModelRootPackageMetaObjectName, Properties pDefaultModelStorageProperties) throws ModelRepositoryException(Code) | | Loads meta model from the specified URL to the model repository. After loading
meta model becomes available and models (i.e. instances of this metamodel) can be loaded.
Parameters: pMetaModelName - the unique name caller wishes to refer to this metamodel in the future. Must be unique name not used before in this repository session. Parameters: pMetaModelInputStream - the input stream where MOF definition of the MetaModel can be loaded from. Must refer to the xmi file containing MOF model (i.e. definition of this metamodel). Parameters: pMetaModelURIString - Parameters: pDefaultModelStorageProperties - model storage properties to use as default in case model specific properties are not supplied when model is loaded. null passed hereindicates that there is no default properties. This primarily indicates that model storage will not be partitioned by default. the package for newly loaded metamodel exception: ModelRepositoryException - thrown if there was a problem with the loading of the metamodel |
openModel | public void openModel(String pModelName, File pModelRootFile, String pMetaModelName) throws ModelRepositoryException(Code) | | Opens the model from the specified URL to the model repository. The metamodel
of the model must have been loaded prior to this call. The opened model can be
modified and results saved back if required.
Parameters: pModelName - the unique name caller wishes to refer to this model in the future. Must be unique name not used before in this repository session. Parameters: pModelURL - the URL where definition of the Model can be loaded from. Must refer to the xmi file containing the model (i.e. definition of this Model in XMI as per MetaModel).If model storage is partitioned - this URL must refer to the root file. Locations of all otherpartitions are expected to be relative to this URL. Parameters: pMetaModelName - the unique name of the MetaModel. MetaModel with this name must have been added previously to the repository. Parameters: pModelStorageProperties - model storage properties to use. null passed hereindicates that default properties should be used (default properties are set when MetaModel is openedvia ModelRepositoryImpl.loadMetaModel(String,URL,String,Properties) loadMetaModel method. If default properties are indicating partititoning and model being opened is not partitioned - empty properties object must be specified. exception: ModelRepositoryException - thrown if there was a problem with the loading of the Model |
processUpdateInstanceReference | public void processUpdateInstanceReference(ModelRepositoryImpl.ModelDescriptor pAffectedModelDescriptor, RefObject pAffectedInstance, String pAfectedReferenceName, RefObject pReferencedModelElementToRemove, RefObject pReferencedModelElementToAdd)(Code) | | |
rectifyModel | public void rectifyModel(String pModelName) throws ModelRepositoryException(Code) | | Attempts to correct the errors in the given model.
Repository must not be in transaction at the time of this call.
Parameters: pModelName - the unique name of the model which must be loaded into the repository prior to this call. exception: ModelRepositoryException - thrown if there was a general problem with accessing the model. |
registerModelAssistant | public void registerModelAssistant(String pMetaModelName, ModelAssistant pAssistant) throws ModelRepositoryException(Code) | | Adds the assistant to the metamodel. Supplied assistant will be assigned to
each model of this type. Assistants registered by this method will be installed in the
order of registration, but after all assitants declared in configuration/
Parameters: pMetaModelName - - the name of metamodel to attach this assistant to Parameters: pAssistant - - the asssitant itself throws: ModelRepositoryException - thrown if there is a problem with registering the assistant |
registerModelListener | public void registerModelListener(String pModelName, ModelListener pModelListener) throws ModelRepositoryException(Code) | | Adds a listener object to the model.
Parameters: pModelName - - the name of model to attach this listener to Parameters: pModelListener - - the listener object to use throws: ModelRepositoryException - in case if there was a problem assigning the listener |
removeMetaModel | public void removeMetaModel(String pMetaModelName) throws ModelRepositoryException(Code) | | Removes MetaModel with the specified name. Also removes all Models governed by this MetaModel
Parameters: pMetaModelName - the unique name of the MetaModel. MetaModel with this name must have been added previously to the repository. exception: ModelRepositoryException - thrown if there is a problem with the removing of the MetaModel |
retrofitModelElement | public void retrofitModelElement(RefObject pSampleObject, RefObject pTargetObject, ModelElementResolver pExternalElementResolver) throws ModelRepositoryException(Code) | | This helper method changes all internals of the target object to be exactly the same as
the internals of the sample object. Similar to the copyModelElement method the associations within copied hierarchy are copied, but external associations are dropped
(note that this may make newly copied object tree invalid).
Parameters: pSampleObject - the sample object to mirror all attributes and child elements from Parameters: pTargetObject - the object which will get whole new content. Everything it has inside (Attributes and Contained objects) will be replaced. Objects must be of the same type and belong to themodel (same or different - does not matter). |
saveDefaultModel | public void saveDefaultModel(boolean pValidateModel) throws ModelRepositoryException, ModelValidationException(Code) | | Saves default model at the location specified at the time model was created or opened.
Repository must not be in transaction at the time of this call. Only files modified since last save
will be saved.
|
saveModel | public void saveModel(String pModelName, boolean pValidateModel) throws ModelRepositoryException(Code) | | Saves model at the location specified at the time model was created or opened.
Repository must not be in transaction at the time of this call. Only files modified since last save
will be saved
Parameters: pModelName - the unique name of the model. exception: ModelRepositoryException - thrown if there was a problem with the saving the Model |
searchByXPath | public List searchByXPath(String pModelName, String pXPathExpression) throws ModelRepositoryException(Code) | | Retrieves the collection of the RefBaseObjects matching given XPath expression
Parameters: pModelName - the unique name of the Model. Model with this name must have been opened or created previously in the repository. Parameters: pXPathExpression - the xpath expression the requested RefBaseObject. |
searchByXPath | public List searchByXPath(RefBaseObject pRootObject, String pXPathExpression) throws ModelRepositoryException(Code) | | Retrieves the collection of the RefBaseObjects matching given XPath expression
Parameters: pContextObject - the object relative to which the given XPath expression should be executed. Parameters: pXPathExpression - the xpath expression the requested RefBaseObject. |
searchByXPath | public List searchByXPath(Collection pRootObjects, String pXPathExpression) throws ModelRepositoryException(Code) | | Retrieves the collection of the Objects matching given XPath expression.
Parameters: pContextObjects - the List of the RefBaseObjects to run XPath expression against. Parameters: pXPathExpression - the xpath expression the list with matching zero or more Objects. Objects may be RefObjects if expression has matched model elements or plain java objects (eg. Strings) if expression has matched attributes |
setDataAttachedToObject | public void setDataAttachedToObject(RefObject lObject, byte[] pAttachedData) throws ModelRepositoryException(Code) | | Attaches data to the object
|
setDefaultModel | public String setDefaultModel(String pModelName) throws ModelRepositoryException(Code) | | Sets the default model name. This repository has a few methods
dealing with the default model, which do not require the name of the model
Parameters: pModelName - the unique name of the Model. Model with this name must have been opened or created previously in the repository.null can be passed to clear existing default model without setting a new one the name of previous default model or null if there was no default model before exception: ModelRepositoryException - thrown if there is a problem with setting default model |
unregisterModelAssistant | public void unregisterModelAssistant(String pMetaModelName, ModelAssistant pAssistant) throws ModelRepositoryException(Code) | | Removes the assistant from the metamodel. First the assistant will
be disassociated from all models it is attached to.
Parameters: pMetaModelName - - the name of metamodel to remove this assistant from Parameters: pAssistant - - the asssitant itself throws: ModelRepositoryException - thrown if there is a problem with unregistering the assistant |
unregisterModelListener | public void unregisterModelListener(String pModelName, ModelListener pModelListener) throws ModelRepositoryException(Code) | | Removes a listener object from the metamodel.
Parameters: pModelName - - the name of model to remove this listener from Parameters: pModelListener - - the listener object to remove throws: ModelRepositoryException - in case if there was a problem removing the listener |
validateModel | public void validateModel(String pModelName) throws ModelRepositoryException, ModelValidationException(Code) | | Verifies model constraints on the given model.
Repository must not be in transaction at the time of this call.
Parameters: pModelName - the unique name of the model which must be loaded into the repository prior to this call. exception: ModelRepositoryException - thrown if there was a general problem with accessing the model exception: ModelValidationException - thrown if there was one or more validation problems.Caller may use getExplanation() method offered by this exception to discover what is actually wrong |
|
|