org.sakaiproject.entitybroker.rest
Class EntityRedirectsManager

java.lang.Object
  extended by org.sakaiproject.entitybroker.rest.EntityRedirectsManager

public class EntityRedirectsManager
extends Object

Handles everything related the URL redirects handling and processing

Author:
Aaron Zeckoski (azeckoski @ gmail.com)

Constructor Summary
protected EntityRedirectsManager()
          Empty constructor
  EntityRedirectsManager(EntityBrokerManager entityBrokerManager, EntityProviderMethodStore entityProviderMethodStore, RequestStorageWrite requestStorage)
          Base constructor
 
Method Summary
 String checkForTemplateMatch(EntityProvider entityProvider, String incomingURL, String queryString)
          Do a check to see if the current incoming URL is a match to any of the redirect templates for the given entity provider
 void setEntityBrokerManager(EntityBrokerManager entityBrokerManager)
           
 void setEntityProviderMethodStore(EntityProviderMethodStore entityProviderMethodStore)
           
 void setRequestStorage(RequestStorageWrite requestStorage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityRedirectsManager

protected EntityRedirectsManager()
Empty constructor


EntityRedirectsManager

public EntityRedirectsManager(EntityBrokerManager entityBrokerManager,
                              EntityProviderMethodStore entityProviderMethodStore,
                              RequestStorageWrite requestStorage)
Base constructor

Parameters:
entityProviderMethodStore - the provider method store service
requestStorage - the request storage service
Method Detail

setEntityBrokerManager

public void setEntityBrokerManager(EntityBrokerManager entityBrokerManager)

setEntityProviderMethodStore

public void setEntityProviderMethodStore(EntityProviderMethodStore entityProviderMethodStore)

setRequestStorage

public void setRequestStorage(RequestStorageWrite requestStorage)

checkForTemplateMatch

public String checkForTemplateMatch(EntityProvider entityProvider,
                                    String incomingURL,
                                    String queryString)
Do a check to see if the current incoming URL is a match to any of the redirect templates for the given entity provider

Parameters:
entityProvider - an entity provider
queryString - the query string (e.g. auto=true) for the incoming URL
incomingUrl - the incoming URL to try to match
Returns:
the URL to redirect to (will start with /direct if it should be forwarded) OR null if no matches were found


Copyright © 2007-2012 Sakai Project. All Rights Reserved.