Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Corona API Changes

This page is used to propose and discuss changes to Corona API.

First of all I think we need to define use cases and see if we can support it with current model.

Moving code to internal packages

Europa M6 milestone is an API freeze. Everything that is not in internal package is considered to be the API. So, we need to select interfaces and classes which are exposed to other projects to use. Those classes cannot be modified. All things in internal packages can be used as previously.

ContextContainer

The ContextContainer (and ProjectContainer) classes are generated from an EMF model. Additional methods need to be added to these classes as well as updating the functionality provided by some of the generated methods.

  • Modify our usage of EMF to generate the model from annotations from the ContextContainer interface instead of schema
  • Create a JET template to use by EMF/SDO code generation to merge new functionality as well as update existing methods
  • ContextContainer.postEvent()
    • Estabalish the only way to post a container event is by using the container's postEvent() method.
    • Refactor non-container event posting mechanisms as internal.
    • Annotate the postEvent() for WS-Notification
  • ContextContainer.addEventHandler()
    • Estabalish the only way to add a container event listener is by using the container's addEventHandler() method.
    • Refactor non-container event handler mechanisms as internal.
  • ContextContainer add/update/delete methods
    • embed within each add/update/delete methods an invocation of postEvent() to notify the collaboration environment that the container has been modified.

Repository adapter interface

We should define semantic and return types for all operations.

fetchResource()

  • Currently returns an object.
  • If repository adapter is expected to abstract repository access, the return type cannot change when repository is changed.
  • Some needs:
    • Repository contains files: we might require InputStream.
    • Definitely native resource should be available.
    • Some string representation (eg. file name). - toString()
    • Should be tree structure be some how supported?
    • MIME ??
  • An example object that could be returned:
    public interface IRepositoryResource {
        public InputStream getStream();
        public Object getNativeResource();
    }
  • What would return getStream() for SQL repository?

Content adapter

The new layer needs to be added - content adapters (or however it is called). It is supposed to handle content from repository. For instance if there is a file in a specified format within a repository handled by repository adapter, then the content adapter is to fetch records from the file.

Probably some default interface can be designed. It would be similar to repository adapter. But is it possible to have again some common return type for fetch operation? Don't think so :( But maybe at least generic could be used?

Back to the top