本文整理汇总了Java中org.kuali.rice.krad.util.UrlFactory.parameterizeUrl方法的典型用法代码示例。如果您正苦于以下问题:Java UrlFactory.parameterizeUrl方法的具体用法?Java UrlFactory.parameterizeUrl怎么用?Java UrlFactory.parameterizeUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.krad.util.UrlFactory
的用法示例。
在下文中一共展示了UrlFactory.parameterizeUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCustomActionUrls
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public List<HtmlData> getCustomActionUrls(BusinessObject bo, List pkNames) {
List<HtmlData> anchorHtmlDataList = new ArrayList<HtmlData>();
if(allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_PERSON_DOCUMENT_TYPE_NAME)){
String href = "";
Properties parameters = new Properties();
parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.DOC_HANDLER_METHOD);
parameters.put(KRADConstants.PARAMETER_COMMAND, KewApiConstants.INITIATE_COMMAND);
parameters.put(KRADConstants.DOCUMENT_TYPE_NAME, KimConstants.KimUIConstants.KIM_PERSON_DOCUMENT_TYPE_NAME);
parameters.put(KimConstants.PrimaryKeyConstants.PRINCIPAL_ID, ((PersonImpl)bo).getPrincipalId());
if (StringUtils.isNotBlank(getReturnLocation())) {
parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());
}
href = UrlFactory.parameterizeUrl(KimCommonUtilsInternal.getKimBasePath()+KimConstants.KimUIConstants.KIM_PERSON_DOCUMENT_ACTION, parameters);
HtmlData.AnchorHtmlData anchorHtmlData = new HtmlData.AnchorHtmlData(href,
KRADConstants.DOC_HANDLER_METHOD, KRADConstants.MAINTENANCE_EDIT_METHOD_TO_CALL);
anchorHtmlDataList.add(anchorHtmlData);
}
return anchorHtmlDataList;
}
示例2: getMaintenanceActionUrl
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
@Override
protected String getMaintenanceActionUrl(LookupForm lookupForm, Object dataObject, String methodToCall,
List<String> pkNames) {
Properties props = new Properties();
props.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, methodToCall);
Map<String, String> primaryKeyValues = KRADUtils.getPropertyKeyValuesFromDataObject(pkNames, dataObject);
for (String primaryKey : primaryKeyValues.keySet()) {
String primaryKeyValue = primaryKeyValues.get(primaryKey);
props.put(primaryKey, primaryKeyValue);
props.put(KRADConstants.OVERRIDE_KEYS, primaryKey);
}
if (StringUtils.isNotBlank(lookupForm.getReturnLocation())) {
props.put(KRADConstants.RETURN_LOCATION_PARAMETER, lookupForm.getReturnLocation());
}
props.put(UifParameters.DATA_OBJECT_CLASS_NAME, AgendaEditor.class.getName());
props.put(UifParameters.VIEW_TYPE_NAME, UifConstants.ViewType.MAINTENANCE.name());
return UrlFactory.parameterizeUrl(org.kuali.rice.krms.impl.util.KrmsImplConstants.WebPaths.AGENDA_EDITOR_PATH, props);
}
示例3: getExternalizableDataObjectInquiryUrl
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.krad.service.ModuleService#getExternalizableDataObjectInquiryUrl(java.lang.Class,
* java.util.Properties)
*/
@Override
public String getExternalizableDataObjectInquiryUrl(Class<?> inquiryDataObjectClass, Properties parameters) {
String baseUrl = getBaseInquiryUrl();
// if external business object, replace data object in request with the actual impl object class
if (ExternalizableBusinessObject.class.isAssignableFrom(inquiryDataObjectClass)) {
Class implementationClass = getExternalizableBusinessObjectImplementation(inquiryDataObjectClass.asSubclass(
ExternalizableBusinessObject.class));
if (implementationClass == null) {
throw new RuntimeException("Can't find ExternalizableBusinessObject implementation class for "
+ inquiryDataObjectClass.getName());
}
parameters.put(UifParameters.DATA_OBJECT_CLASS_NAME, implementationClass.getName());
}
return UrlFactory.parameterizeUrl(baseUrl, parameters);
}
示例4: getEditGroupUrl
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
protected HtmlData getEditGroupUrl(GroupBo groupBo) {
String href = "";
Properties parameters = new Properties();
parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.DOC_HANDLER_METHOD);
parameters.put(KRADConstants.PARAMETER_COMMAND, KewApiConstants.INITIATE_COMMAND);
parameters.put(KRADConstants.DOCUMENT_TYPE_NAME, KimConstants.KimUIConstants.KIM_GROUP_DOCUMENT_TYPE_NAME);
parameters.put(KimConstants.PrimaryKeyConstants.GROUP_ID, groupBo.getId());
if (StringUtils.isNotBlank(getReturnLocation())) {
parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());
}
href = UrlFactory.parameterizeUrl(KimCommonUtilsInternal.getKimBasePath()+KimConstants.KimUIConstants.KIM_GROUP_DOCUMENT_ACTION, parameters);
HtmlData.AnchorHtmlData anchorHtmlData = new HtmlData.AnchorHtmlData(href,
KRADConstants.DOC_HANDLER_METHOD, KRADConstants.MAINTENANCE_EDIT_METHOD_TO_CALL);
return anchorHtmlData;
}
示例5: getExternalizableBusinessObjectInquiryUrl
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
@Override
@Deprecated
public String getExternalizableBusinessObjectInquiryUrl(Class inquiryBusinessObjectClass,
Map<String, String[]> parameters) {
if (!isExternalizable(inquiryBusinessObjectClass)) {
return KRADConstants.EMPTY_STRING;
}
String businessObjectClassAttribute;
Class implementationClass = getExternalizableBusinessObjectImplementation(inquiryBusinessObjectClass);
if (implementationClass == null) {
LOG.error("Can't find ExternalizableBusinessObject implementation class for " + inquiryBusinessObjectClass
.getName());
throw new RuntimeException("Can't find ExternalizableBusinessObject implementation class for interface "
+ inquiryBusinessObjectClass.getName());
}
businessObjectClassAttribute = implementationClass.getName();
return UrlFactory.parameterizeUrl(getInquiryUrl(inquiryBusinessObjectClass), getUrlParameters(
businessObjectClassAttribute, parameters));
}
示例6: getCreateNewUrl
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
@Override
public String getCreateNewUrl() {
String url = "";
if (getLookupableHelperService().allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_REVIEW_RESPONSIBILITY_DOCUMENT_TYPE_NAME)) {
Properties parameters = new Properties();
parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.MAINTENANCE_NEW_METHOD_TO_CALL);
parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, ReviewResponsibilityBo.class.getName());
if (StringUtils.isNotBlank(getReturnLocation())) {
parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());
}
url = UrlFactory.parameterizeUrl(KRADConstants.MAINTENANCE_ACTION, parameters);
url = "<a title=\"Create a new record\" href=\"" + url + "\"><img src=\"images/tinybutton-createnew.gif\" alt=\"create new\" width=\"70\" height=\"15\"/></a>";
}
return url;
}
示例7: getMaintenanceActionUrl
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
@Override
protected String getMaintenanceActionUrl(LookupForm lookupForm, Object dataObject, String methodToCall,
List<String> pkNames) {
Properties props = new Properties();
props.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, methodToCall);
Map<String, String> primaryKeyValues = KRADUtils.getPropertyKeyValuesFromDataObject(pkNames, dataObject);
for (String primaryKey : primaryKeyValues.keySet()) {
String primaryKeyValue = primaryKeyValues.get(primaryKey);
props.put(primaryKey, primaryKeyValue);
props.put(KRADConstants.OVERRIDE_KEYS, primaryKey);
}
if (StringUtils.isNotBlank(lookupForm.getReturnLocation())) {
props.put(KRADConstants.RETURN_LOCATION_PARAMETER, lookupForm.getReturnLocation());
}
props.put(UifParameters.DATA_OBJECT_CLASS_NAME, PropositionBo.class.getName());
props.put(UifParameters.VIEW_TYPE_NAME, UifConstants.ViewType.MAINTENANCE.name());
return UrlFactory.parameterizeUrl(org.kuali.rice.krms.impl.util.KrmsImplConstants.WebPaths.PROPOSITION_PATH, props);
}
示例8: getHeaderMenuBar
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
public String getHeaderMenuBar() {
Properties parameters = new Properties();
parameters.put("showFuture", isShowFuture());
parameters.put("showNotes", isShowNotes());
if (getDocumentId() != null) {
parameters.put("documentId", getDocumentId());
}
if (getDocId() != null) {
parameters.put("docId", getDocId());
}
if (getReturnUrlLocation() != null) {
parameters.put("backUrl", getReturnUrlLocation());
}
String url = UrlFactory.parameterizeUrl("RouteLog.do", parameters);
String krBaseUrl = ConfigContext.getCurrentContextConfig().getKRBaseURL();
url = "<div class=\"lookupcreatenew\" title=\"Refresh\"><a href=\"" + url + "\"><img src=\""+krBaseUrl+"/images/tinybutton-refresh.gif\" alt=\"refresh\"></a></div>";
return url;
}
示例9: getInquiryUrl
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl#getInquiryUrl(org.kuali.rice.krad.bo.BusinessObject,
* java.lang.String)
*/
@Override
public HtmlData getInquiryUrl(BusinessObject bo, String propertyName) {
AnchorHtmlData inquiryUrl = (AnchorHtmlData) super.getInquiryUrl(bo, propertyName);
PaymentProcess paymentProcess = (PaymentProcess) bo;
if (propertyName.equalsIgnoreCase(PdpPropertyConstants.PaymentProcess.PAYMENT_PROCESS_ID)) {
Properties params = new Properties();
params.put(OLEConstants.DISPATCH_REQUEST_PARAMETER, OLEConstants.SEARCH_METHOD);
params.put(OLEConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, ProcessSummary.class.getName());
params.put(KRADConstants.DOC_FORM_KEY, "88888888");
params.put(OLEConstants.HIDE_LOOKUP_RETURN_LINK, "true");
params.put(OLEConstants.RETURN_LOCATION_PARAMETER, OLEConstants.MAPPING_PORTAL + ".do");
params.put(PdpPropertyConstants.ProcessSummary.PROCESS_SUMMARY_PROCESS_ID, UrlFactory.encode(String.valueOf(paymentProcess.getId())));
String url = UrlFactory.parameterizeUrl(KRADConstants.LOOKUP_ACTION, params);
inquiryUrl.setHref(url);
}
return inquiryUrl;
}
示例10: getActionUrlHref
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
/**
* This method returns URL for checklist maintenance action.
*
* @param lookupForm
* @param dataObject
* @param methodToCall
* @param pkNames
* @return String
*/
@Override
protected String getActionUrlHref(LookupForm lookupForm, Object dataObject, String methodToCall,
List<String> pkNames) {
LookupView lookupView = (LookupView) lookupForm.getView();
Properties props = new Properties();
props.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, methodToCall);
Map<String, String> primaryKeyValues = KRADUtils.getPropertyKeyValuesFromDataObject(pkNames, dataObject);
for (String primaryKey : primaryKeyValues.keySet()) {
String primaryKeyValue = primaryKeyValues.get(primaryKey);
props.put(primaryKey, primaryKeyValue);
}
if (StringUtils.isNotBlank(lookupForm.getReturnLocation())) {
props.put(KRADConstants.RETURN_LOCATION_PARAMETER, lookupForm.getReturnLocation());
}
props.put(UifParameters.DATA_OBJECT_CLASS_NAME, lookupForm.getDataObjectClassName());
props.put(UifParameters.VIEW_TYPE_NAME, UifConstants.ViewType.MAINTENANCE.name());
String maintenanceMapping = OLEConstants.OleGloballyProtectedField.GLOBALLY_PROTECTED_ACTION_LINK;
return UrlFactory.parameterizeUrl(maintenanceMapping, props);
}
示例11: createReceivingLine
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
public ActionForward createReceivingLine(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PurchaseOrderForm poForm = (PurchaseOrderForm) form;
PurchaseOrderDocument document = (PurchaseOrderDocument) poForm.getDocument();
String basePath = getApplicationBaseUrl();
String methodToCallDocHandler = "docHandler";
String methodToCallReceivingLine = "initiate";
//set parameters
Properties parameters = new Properties();
parameters.put(OLEConstants.DISPATCH_REQUEST_PARAMETER, methodToCallDocHandler);
parameters.put(OLEConstants.PARAMETER_COMMAND, methodToCallReceivingLine);
parameters.put(OLEConstants.DOCUMENT_TYPE_NAME, OLEConstants.FinancialDocumentTypeCodes.LINE_ITEM_RECEIVING);
parameters.put("purchaseOrderId", document.getPurapDocumentIdentifier().toString());
//create url
String receivingUrl = UrlFactory.parameterizeUrl(basePath + "/" + "purapLineItemReceiving.do", parameters);
//create forward
ActionForward forward = new ActionForward(receivingUrl, true);
return forward;
}
示例12: getCreateNewUrl
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
/**
* This overridden method ...
*
* @see org.kuali.rice.krad.lookup.KualiLookupableImpl#getCreateNewUrl()
*/
@Override
public String getCreateNewUrl() {
String url = "";
if (getLookupableHelperService().allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_PERMISSION_DOCUMENT_TYPE_NAME)) {
Properties parameters = new Properties();
parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.MAINTENANCE_NEW_METHOD_TO_CALL);
parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, GenericPermissionBo.class.getName());
if (StringUtils.isNotBlank(getReturnLocation())) {
parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());
}
url = UrlFactory.parameterizeUrl(KRADConstants.MAINTENANCE_ACTION, parameters);
url = "<a title=\"Create a new record\" href=\"" + url + "\"><img src=\"images/tinybutton-createnew.gif\" alt=\"create new\" width=\"70\" height=\"15\"/></a>";
}
return url;
}
示例13: getCustomActionUrls
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
/**
* @see org.kuali.rice.kns.lookup.LookupableHelperService#getCustomActionUrls(org.kuali.rice.krad.bo.BusinessObject, java.util.List, java.util.List pkNames)
*/
@Override
public List<HtmlData> getCustomActionUrls(BusinessObject businessObject, List pkNames) {
BudgetConstructionAccountSelect accountSelect = (BudgetConstructionAccountSelect) businessObject;
Properties parameters = new Properties();
parameters.put(KFSConstants.DISPATCH_REQUEST_PARAMETER, BCConstants.BC_DOCUMENT_METHOD);
parameters.put(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR, accountSelect.getUniversityFiscalYear().toString());
parameters.put(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE, accountSelect.getChartOfAccountsCode());
parameters.put(KFSPropertyConstants.ACCOUNT_NUMBER, accountSelect.getAccountNumber());
parameters.put(KFSPropertyConstants.SUB_ACCOUNT_NUMBER, accountSelect.getSubAccountNumber());
parameters.put(BCConstants.PICK_LIST_MODE, "true");
parameters.put(BCPropertyConstants.MAIN_WINDOW, "false");
String href = UrlFactory.parameterizeUrl(BCConstants.BC_DOCUMENT_ACTION, parameters);
List<HtmlData> anchorHtmlDataList = new ArrayList<HtmlData>();
AnchorHtmlData anchorHtmlData = new AnchorHtmlData(href, BCConstants.BC_DOCUMENT_METHOD, "Load Document");
anchorHtmlData.setTarget(BCConstants.SECOND_WINDOW_TARGET_NAME);
anchorHtmlDataList.add(anchorHtmlData);
return anchorHtmlDataList;
}
示例14: performRedirect
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public ModelAndView performRedirect(UifFormBase form, String baseUrl, Properties urlParameters) {
String redirectUrl = UrlFactory.parameterizeUrl(baseUrl, urlParameters);
return performRedirect(form, redirectUrl);
}
示例15: getCreateNewUrl
import org.kuali.rice.krad.util.UrlFactory; //导入方法依赖的package包/类
/**
* @see Lookupable#getCreateNewUrl()
*/
public String getCreateNewUrl() {
String url = "";
if (getLookupableHelperService().allowsMaintenanceNewOrCopyAction()) {
Properties parameters = new Properties();
parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.MAINTENANCE_NEW_METHOD_TO_CALL);
parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, this.businessObjectClass.getName());
url = UrlFactory.parameterizeUrl(KRADConstants.MAINTENANCE_ACTION, parameters);
url = "<a title=\"Create a new record\" href=\"" + url + "\"><img src=\"images/tinybutton-createnew.gif\" alt=\"create new\" width=\"70\" height=\"15\"/></a>";
}
return url;
}