Information

This explains how to use the entity broker and entity provider system in Sakai

Usage of the Entity Broker

Defining EntityProviders

Helper code

DeveloperHelperService

Access the DeveloperHelperService service

  1. Using Spring to get the service for your class (e.g. YourAppClass) (recommended)
    1. Add the DeveloperHelperService bean to the bean for YourAppClass
      <bean id="org.sakaiproject.yourapp.logic.YourAppClass"
      		class="org.sakaiproject.yourapp.logic.impl.YourAppClassImpl">
      	<property name="developerHelperService"
      		ref="org.sakaiproject.entitybroker.DeveloperHelperService" />
      </bean>
      
    2. Add a variable and setter to YourAppClass to use the service in like so:
      private DeveloperHelperService developerHelperService;
      public void setDeveloperHelperService(DeveloperHelperService developerHelperService) {
      	this.developerHelperService = developerHelperService;
      }
      
  2. Using the Component Manager to get the service
    1. Use the CM cover to get the service
      import org.sakaiproject.component.cover.ComponentManager;
      import org.sakaiproject.entitybroker.DeveloperHelperService;
      ...
        private DeveloperHelperService developerHelperService;
      ...
          developerHelperService = (DeveloperHelperService) ComponentManager.get(DeveloperHelperService.class);
      

BeanCollector

ReloadableComponentProxy