Child pages
  • Entity URLs in RSF

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Information

Describes the usage of entity URLs in RSF and how to define where your entity URLs go in your tools and webapps. This will allow you to tie into the direct url system which gives the developer control of their URL space and opens up access to what we call entity worlds.

Implementing Entity URLs in RSF

  1. Implement the EntityViewParamsInferrer (in Sakai RSF)
    • Suggested best practice is to name your inferrer MyEntityNameVPInferrer
    1. Note: You are defining the View (page) and ViewParameters (get params) which an entity resolves to, this gives the developer full control of direct URLs to their tool space without code crossing over into the service/component layer
  2. Add implementation as a spring bean to your RSF applicationContext.xml in your tool
    Example:
    No Format
    <bean class="org.sakaiproject.sample.tool.inferrers.SampleVPInferrer">
    </bean>
    
  3. Add in the extra spring config files to your tool web.xml if they are not already there:
    1. contextConfigLocation should have:
      No Format
      classpath:conf/sakai-entitybroker-applicationContext.xml
      
    2. requestContextConfigLocation should have:
      No Format
      classpath:conf/sakai-entitybroker-requestContext.xml
      
    • Suggested best practice is to put these lines above the applicationContext.xml and requestContext.xml
  4. Add the needed maven dependendencies to the tool maven files
    • Maven 1 users will need soemthing like this in the project.xml:
      No Format
      <dependency>
      	<groupId>sakaiproject</groupId>
      	<artifactId>sakai-entitybroker-api</artifactId>
      	<version>${sakai.version}</version>
      </dependency>
      
    • Maven 2 users will need something like this in the pom.xml:
      No Format
      <dependency>
          <groupId>org.sakaiproject.entitybroker</groupId>
          <artifactId>entitybroker-api</artifactId>
          <version>1.2.0</version>
          <scope>provided</scope>
      </dependency>
      

Usage of Entity URLs

There are methods in EntityBroker which will help you to generate URLs directly to entities. The URLs are like this: http://server:port/direct/prefix/id

More info at Entity URLs defined