# Introduction

This document lists changes made to the Metadata Repository Module APIs. Please ask on the `dev@mdr.netbeans.org` mailing list if you have any questions about the details of a change, or are wondering how to convert existing code to be compatible.

## What do the Dates Mean?

The supplied dates indicate when the API change was made, on the CVS trunk. From this you can generally tell whether the change should be present in a given build or not.

# Index of APIs

- Events API
- Facility API
- Services API
- XMI API

# Incompatible changes by date

Fuller descriptions of all changes can be found below (follow links).

Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.

# All changes by date

- (Jan 28 '05) API and SPI finalized.
- (May 2 '04) Deprecated API removed.
- (Nov 18 '02) New methods added to XMIOutputConfig.
- (Sep 20 '02) JMIMapper.JMIStreamFactory was moved from JMIMapper and extended.
- (Aug 11 '02) XMIReader and XMIWriter made deprecated, added new XMI API package.
- (Jul 18 '02) Added transaction events, extended events API to allow events filtering.
- (May 9 '02) Added MDRManager.shutdownAll and MDRepository.shutdown methods.

# Changes by version

These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled `1.20`, your manifest should contain in its main attributes the line:

    OpenIDE-Module-Module-Dependencies: org.netbeans.api.mdr/1 > 1.20

- (1.1) API and SPI finalized.
- (0.986) Deprecated API removed.
- (0.984) New methods added to XMIOutputConfig.
- (0.983) JMIMapper.JMIStreamFactory was moved from JMIMapper and extended.
- (0.982) XMIReader and XMIWriter made deprecated, added new XMI API package.
- (0.981) Added transaction events, extended events API to allow events filtering.
- (0.98) Added MDRManager.shutdownAll and MDRepository.shutdown methods.

# Changes by affected class

## `org.netbeans.api.mdr.events.AssociationEvent`

- (Jul 18 '02) Added transaction events, extended events API to allow events filtering.

## `org.netbeans.api.mdr.events.AttributeEvent`

- (Jul 18 '02) Added transaction events, extended events API to allow events filtering.

## `org.netbeans.api.mdr.events.ExtentEvent`

- (Jul 18 '02) Added transaction events, extended events API to allow events filtering.

## `org.netbeans.api.mdr.events.InstanceEvent`

- (Jul 18 '02) Added transaction events, extended events API to allow events filtering.

## `org.netbeans.api.mdr.JMIMapper`

- (Sep 20 '02) JMIMapper.JMIStreamFactory was moved from JMIMapper and extended.

## `org.netbeans.api.mdr.JMIStreamFactory`

- (Sep 20 '02) JMIMapper.JMIStreamFactory was moved from JMIMapper and extended.

## `org.netbeans.api.mdr.events.MDRChangeSource`

- (Jul 18 '02) Added transaction events, extended events API to allow events filtering.

## `org.netbeans.api.mdr.MDRepository`

- (May 9 '02) Added MDRManager.shutdownAll and MDRepository.shutdown methods.

## `org.netbeans.api.mdr.MDRManager`

- (May 9 '02) Added MDRManager.shutdownAll and MDRepository.shutdown methods.

## `org.netbeans.api.mdr.events.MDRPreChangeListener`

- (Jan 28 '05) API and SPI finalized.

## `org.netbeans.api.mdr.events.TransactionEvent`

- (Jul 18 '02) Added transaction events, extended events API to allow events filtering.

## `org.netbeans.api.mdr.events.VetoChangeException`

- (Jan 28 '05) API and SPI finalized.

## `org.netbeans.api.xmi.XMIOutputConfig`

- (Nov 18 '02) New methods added to XMIOutputConfig.

# Details of all changes by API and date

## Events API

### API and SPI finalized.

Jan 28 '05; API spec. version: 1.1; affected top-level classes: `VetoChangeException` `MDRPreChangeListener`; made by: mmatula; issues: #51937
VetoChangeException added to allow vetoable "preChange" events. The exception can be thrown from MDRPreChangeListener.plannedChange().

### Added transaction events, extended events API to allow events filtering.

Jul 18 '02; API spec. version: 0.981; affected top-level classes: `TransactionEvent` `MDRChangeSource` `InstanceEvent` `ExtentEvent` `AttributeEvent` `AssociationEvent`; made by: hkrug mmatula; issues: #25186 #25214
Added transaction events fired when a writable transaction starts and ends. These events are fired on repository object (new subclass of MDRChangeEvent named TransactionEvent was introduced to represent transaction events). In addition the events API was extended to allow users to specify a bitmask used for filtering events delivered to a listener. For this purpose, additional addListener and removeListener methods were introduced to MDRChangeSource interface. Also new bitmask constants were added to existing event objects.

## Facility API

### Added MDRManager.shutdownAll and MDRepository.shutdown methods.

May 9 '02; API spec. version: 0.98; affected top-level classes: `MDRManager` `MDRepository`; made by: mmatula
Added additional shutdownAll method to MDRManager and MDRepository.shutdown method to MDRepository which can be implemented to perform any cleanup actions needed at the MDR shutdown.

## Services API

### JMIMapper.JMIStreamFactory was moved from JMIMapper and extended.

Sep 20 '02; API spec. version: 0.983; affected top-level classes: `JMIMapper` `JMIStreamFactory`; made by: mmatula
JMIStreamFactory was made a regular class (as opposed to being innerclass of JMIMapper). It was changed from interface to abstract class and a new method was added with additional parameter to enable specifying file extension for the generated data.

### XMIReader and XMIWriter made deprecated, added new XMI API package.

Aug 11 '02; API spec. version: 0.982; affected packages: `org.netbeans.api.xmi`; made by: mmatula
Old org.netbeans.api.mdr.XMIReader and XMIWriter classes were made deprecated as the new refactored XMI API was created in org.netbeans.api.xmi package.

## XMI API

### Deprecated API removed.

May 2 '04; API spec. version: 0.986; made by: mmatula; issues: #41562
Deprecated API classes (org.netbeans.api.mdr.XMIReader and org.netbeans.api.mdr.XMIWriter) removed.

### New methods added to XMIOutputConfig.

Nov 18 '02; API spec. version: 0.984; affected top-level classes: `XMIOutputConfig`; made by: dprusa
getEncoding and setEncoding abstract methods were added to XMIOutputConfig