org.sakaiproject.entitybroker.entityprovider.extension
Class URLRedirect

java.lang.Object
  extended by org.sakaiproject.entitybroker.entityprovider.extension.URLRedirect

public class URLRedirect
extends Object

Storage for the redirects

Author:
Aaron Zeckoski (azeckoski @ gmail.com)

Field Summary
 boolean controllable
          indicates that this is controllable or not, if this is controllable then all the other fields will be ignored and the redirects will be sent to the execute method
 Class<?>[] methodArgTypes
          (optional) These are the argument types found in the custom action method in order, this should not be populated manually as any value in this will be overwritten
Must be set if the methodName is set
 String methodName
          (optional) This will be non-null if there is a custom action method which was found or identified by the annotation EntityCustomAction or if the developer has defined this explicitly
 TemplateParseUtil.PreProcessedTemplate outgoingPreProcessedTemplate
           
 String outgoingTemplate
          (optional) the outgoing template to place the variables into, leave null if using the methods
 TemplateParseUtil.PreProcessedTemplate preProcessedTemplate
           
 String template
          The incoming url template the URL pattern to match AFTER the /prefix using {name} to indicate variables
Example: /{thing}/site/{siteId} will match the following URL:
/myprefix/123/site/456, the variables will be {prefix => myprefix, thing => 123, siteId => 456}
 
Constructor Summary
URLRedirect(String template)
          Use this for controllable template matches only
URLRedirect(String template, String outgoingTemplate)
           
URLRedirect(String template, String methodName, Class<?>[] methodArgTypes)
           
 
Method Summary
 URLRedirect copy()
           
static URLRedirect copy(URLRedirect redirect)
           
 boolean equals(Object obj)
           
 Method getMethod()
          INTERNAL USE ONLY
 int hashCode()
           
 void setMethod(Method m)
          INTERNAL USE ONLY
 void setTemplate(String template)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

template

public String template
The incoming url template the URL pattern to match AFTER the /prefix using {name} to indicate variables
Example: /{thing}/site/{siteId} will match the following URL:
/myprefix/123/site/456, the variables will be {prefix => myprefix, thing => 123, siteId => 456}


preProcessedTemplate

public TemplateParseUtil.PreProcessedTemplate preProcessedTemplate

outgoingTemplate

public String outgoingTemplate
(optional) the outgoing template to place the variables into, leave null if using the methods


outgoingPreProcessedTemplate

public TemplateParseUtil.PreProcessedTemplate outgoingPreProcessedTemplate

methodName

public String methodName
(optional) This will be non-null if there is a custom action method which was found or identified by the annotation EntityCustomAction or if the developer has defined this explicitly


methodArgTypes

public Class<?>[] methodArgTypes
(optional) These are the argument types found in the custom action method in order, this should not be populated manually as any value in this will be overwritten
Must be set if the methodName is set


controllable

public boolean controllable
indicates that this is controllable or not, if this is controllable then all the other fields will be ignored and the redirects will be sent to the execute method

Constructor Detail

URLRedirect

public URLRedirect(String template)
Use this for controllable template matches only

Parameters:
template -

URLRedirect

public URLRedirect(String template,
                   String outgoingTemplate)

URLRedirect

public URLRedirect(String template,
                   String methodName,
                   Class<?>[] methodArgTypes)
Method Detail

getMethod

public Method getMethod()
INTERNAL USE ONLY


setMethod

public void setMethod(Method m)
INTERNAL USE ONLY


setTemplate

public void setTemplate(String template)
Parameters:
template -

copy

public URLRedirect copy()
Returns:
a copy of this object

copy

public static URLRedirect copy(URLRedirect redirect)
Parameters:
redirect -
Returns:
a copy of the supplied object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


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