Class URLRedirect
- java.lang.Object
-
- org.sakaiproject.entitybroker.entityprovider.extension.URLRedirect
-
- All Implemented Interfaces:
Comparable<URLRedirect>
public class URLRedirect extends Object implements Comparable<URLRedirect>
Storage for the redirects- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
-
-
Field Summary
Fields Modifier and Type Field Description booleancontrollableindicates 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 methodClass<?>[]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 setStringmethodName(optional) This will be non-null if there is a custom action method which was found or identified by the annotationEntityCustomActionor if the developer has defined this explicitlyTemplateParseUtil.PreProcessedTemplateoutgoingPreProcessedTemplateStringoutgoingTemplate(optional) the outgoing template to place the variables into, leave null if using the methodsTemplateParseUtil.PreProcessedTemplatepreProcessedTemplateStringtemplateThe 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
Constructors Constructor Description URLRedirect(String template)Use this for controllable template matches onlyURLRedirect(String template, String outgoingTemplate)URLRedirect(String template, String methodName, Class<?>[] methodArgTypes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(URLRedirect other)URLRedirectcopy()static URLRedirectcopy(URLRedirect redirect)booleanequals(Object obj)MethodgetMethod()INTERNAL USE ONLYinthashCode()voidsetMethod(Method m)INTERNAL USE ONLYvoidsetTemplate(String template)StringtoString()
-
-
-
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 annotationEntityCustomActionor 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-
-
-
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
-
compareTo
public int compareTo(URLRedirect other)
- Specified by:
compareToin interfaceComparable<URLRedirect>
-
-