Class UrlInfo
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean
If href is not set, the generated value of href is constructed (in general) as follows:
baseUrl + /controllerMapping + ? + methodToCall param + viewId param + other parameters
with any necessary tokens to construct a valid url. If baseUrl is not provided, the url is not valid and a
blank string is returned.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGenerate the url based on properties of this objectThe base url value (the value that comes before other properties).The controllerMapping for the url (string that represents the controllerMapping path appended to baseUrl)FormKey representing the key of the form data to retrievegetHref()Get the href value for this url object.MethodToCall representing the methodToCall on the controller (default base bean value is 'start')The original(set) href value.PageId representing the page of the view to retrieve by idMap of key value pairs that will be appended to the request parameters to pass in any custom dataTarget frame that this url should redirectViewId representing the view by id to retrieveThe viewType representing the View's base typebooleanvoidsetBaseUrl(String baseUrl) Set the baseUrlvoidsetControllerMapping(String controllerMapping) Set the controllerMappingvoidsetFormKey(String formKey) Set the formKeyvoidExplicitly set the href value - if this is called with a value, all other properties of the url object are ignored.voidsetMethodToCall(String methodToCall) Set the methodToCallprotected voidsetOriginalHref(String originalHref) toString returns the original href value of urlvoidSet pageIdvoidsetRequestParameters(Map<String, String> requestParameters) Set the requestParametersvoidvoidSet viewIdvoidsetViewType(String viewType) Set the viewTypetoString()toString override returns the href value of urlMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
-
Constructor Details
-
UrlInfo
public UrlInfo()Base constructor -
UrlInfo
Constructor that initializes an href value- Parameters:
href- the href value
-
UrlInfo
Constructor that sets the base url construction properties- Parameters:
baseUrl- the baseUrlcontrollerMapping- the controllerMappingviewId- the id of the viewmethodToCall- the methodToCall
-
-
Method Details
-
isFullyConfigured
public boolean isFullyConfigured() -
generateUrl
Generate the url based on properties of this object- Returns:
- the generatedUrl, blank if not a valid url (no baseUrl value provided)
-
getHref
Get the href value for this url object. This is the main call to this url object as it provides the full href value represented by this object.If href has NOT been explicitly set to a value, the href is generated by constructing pieces of the url set through the properties of this url object. The generated value of href is constructed (in general) as follows:
baseUrl + /controllerMapping + ? + methodToCall param + viewId param + other parameters
with any necessary tokens to construct a valid url. If baseUrl is not provided, the url is not valid and a blank string is returned.- Returns:
- THE href represented by this url object, or blank if not valid
-
setHref
Explicitly set the href value - if this is called with a value, all other properties of the url object are ignored. This call is basically a full override. This also sets the orginalHref value.- Parameters:
href-
-
getBaseUrl
The base url value (the value that comes before other properties). Default base bean value is set to use 'krad.url' of the configuration properties.- Returns:
- the baseUrl
-
setBaseUrl
Set the baseUrl- Parameters:
baseUrl-
-
getControllerMapping
The controllerMapping for the url (string that represents the controllerMapping path appended to baseUrl)- Returns:
- the controllerMapping string
-
setControllerMapping
Set the controllerMapping- Parameters:
controllerMapping-
-
getViewType
The viewType representing the View's base type- Returns:
- the viewType
-
setViewType
Set the viewType- Parameters:
viewType-
-
getViewId
ViewId representing the view by id to retrieve- Returns:
- the viewId
-
setViewId
Set viewId- Parameters:
viewId-
-
getPageId
PageId representing the page of the view to retrieve by id- Returns:
- the pageId
-
setPageId
Set pageId- Parameters:
pageId-
-
getFormKey
FormKey representing the key of the form data to retrieve- Returns:
- the formKey
-
setFormKey
Set the formKey- Parameters:
formKey-
-
getMethodToCall
MethodToCall representing the methodToCall on the controller (default base bean value is 'start')- Returns:
- methodToCall on controller
-
setMethodToCall
Set the methodToCall- Parameters:
methodToCall-
-
getRequestParameters
Map of key value pairs that will be appended to the request parameters to pass in any custom data- Returns:
- the requestParameters map
-
setRequestParameters
Set the requestParameters- Parameters:
requestParameters-
-
getOriginalHref
The original(set) href value. This is generally used to determine if the href was explicitly set and not generated by this url object.- Returns:
- the original(set) href value
-
setOriginalHref
toString returns the original href value of url- Parameters:
originalHref- original href value
-
getTarget
Target frame that this url should redirect- Returns:
- an enum representing one of the target options available to anchor tags
-
setTarget
-
toString
toString override returns the href value of url
-