Child pages
  • Entity Broker Design
Skip to end of metadata
Go to start of metadata

Information

This documents the general design for the entity broker system in Sakai

Entity interface

  • The entity is the object which represents some kind of system "thing", it is implemented and used by the webapp developer, all of the model objects in the webapp which need to exist in Sakai could be represented as entities
  • In our way of doing things, this is now simply an Object and the Entity interface is no longer needed

EntityProvider

  • The entity provider (EP) handles the movement of entities, it must be implemented by the webapp developer, it will be accessed by Sakai and possibly other tools in sakai
  • String getEntityPrefix() - returns the globally unique prefix for the entity handled by this provider
  • boolean entityExists(String id) - check if a specific entity exists

Addable interfaces for EntityProvider

  • AutoRegister - causes the provider to be registered automatically by spring
  • Resolvable - allows the actual entity objects to be accessed (resolved)
  • Importable - can be imported into Sakai using the archive service
  • Archivable - can be exported from Sakai into an archive using the archive service
  • Searchable - can be searched using the search service
  • Gradeable - can have an associated grade
  • Addressible - can be located via a URL
  • Attachable - can be attached to another entity
  • Versionable - the entity is versionable and versions are stored and acessible
  • Trackable - Events are emitted by this event manager (e.g. entity created, entity deleted, etc.)
  • (question)

EntityProviderManager

  • Manages entity providers
    • EP registration can be done via Spring instead of manually using the manager, the EP just has to have a spring bean definition and implement a specific interface
  • Set<String> getRegisteredPrefixes() - access the set of all registered provider prefixes
  • registerEntityProvider(EntityProvider) - register an EP programmatically
  • unregisterEntityProvider(EntityProvider) - unregister an EP programmatically
  • EntityProvider getProviderByReference(String reference) - get the EP that handles the entity identified by this reference

EntityBroker

  • Outward facing service, allows retrieval of entities metadata without knowledge of the entity type, used by Sakai and by other developers (to get entities)
  • boolean entityExists(String reference) - check if an entity defined by a reference exists
  • register events
  • No labels