本文整理汇总了Java中org.kuali.rice.krad.util.UrlFactory类的典型用法代码示例。如果您正苦于以下问题:Java UrlFactory类的具体用法?Java UrlFactory怎么用?Java UrlFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UrlFactory类属于org.kuali.rice.krad.util包,在下文中一共展示了UrlFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: getExternalizableDataObjectLookupUrl
import org.kuali.rice.krad.util.UrlFactory; //导入依赖的package包/类
/**
* @see org.kuali.rice.krad.service.ModuleService#getExternalizableDataObjectLookupUrl(java.lang.Class,
* java.util.Properties)
*/
@Override
public String getExternalizableDataObjectLookupUrl(Class<?> lookupDataObjectClass, Properties parameters) {
String baseUrl = getBaseLookupUrl();
// if external business object, replace data object in request with the actual impl object class
if (ExternalizableBusinessObject.class.isAssignableFrom(lookupDataObjectClass)) {
Class implementationClass = getExternalizableBusinessObjectImplementation(lookupDataObjectClass.asSubclass(
ExternalizableBusinessObject.class));
if (implementationClass == null) {
throw new RuntimeException("Can't find ExternalizableBusinessObject implementation class for "
+ lookupDataObjectClass.getName());
}
parameters.put(UifParameters.DATA_OBJECT_CLASS_NAME, implementationClass.getName());
}
return UrlFactory.parameterizeUrl(baseUrl, parameters);
}
示例3: 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));
}
示例4: getExternalizableBusinessObjectInquiryUrl
import org.kuali.rice.krad.util.UrlFactory; //导入依赖的package包/类
@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));
}
示例5: prepareToReturnNone
import org.kuali.rice.krad.util.UrlFactory; //导入依赖的package包/类
/**
* This method returns none of the selected results and redirects back to the lookup caller.
* @param mapping
* @param form must be an instance of MultipleValueLookupForm
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward prepareToReturnNone(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
MultipleValueLookupForm multipleValueLookupForm = (MultipleValueLookupForm) form;
prepareToReturnNone(multipleValueLookupForm);
// build the parameters for the refresh url
Properties parameters = new Properties();
parameters.put(KRADConstants.DOC_FORM_KEY, multipleValueLookupForm.getFormKey());
parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.RETURN_METHOD_TO_CALL);
parameters.put(KRADConstants.REFRESH_CALLER, KRADConstants.MULTIPLE_VALUE);
parameters.put(KRADConstants.ANCHOR, multipleValueLookupForm.getLookupAnchor());
if(multipleValueLookupForm.getDocNum() != null){
parameters.put(KRADConstants.DOC_NUM, multipleValueLookupForm.getDocNum());
}
String backUrl = UrlFactory.parameterizeUrl(multipleValueLookupForm.getBackLocation(), parameters);
return new ActionForward(backUrl, true);
}
示例6: getInquiryUrlForPrimaryKeys
import org.kuali.rice.krad.util.UrlFactory; //导入依赖的package包/类
@Deprecated
protected AnchorHtmlData getInquiryUrlForPrimaryKeys(Class clazz, Object businessObject, List<String> primaryKeys,
String displayText) {
if (businessObject == null)
return new AnchorHtmlData(KRADConstants.EMPTY_STRING, KRADConstants.EMPTY_STRING);
Properties parameters = new Properties();
parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.START_METHOD);
parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, clazz.getName());
String titleAttributeValue;
Map<String, String> fieldList = new HashMap<String, String>();
for (String primaryKey : primaryKeys) {
titleAttributeValue = (String) ObjectUtils.getPropertyValue(businessObject, primaryKey);
parameters.put(primaryKey, titleAttributeValue);
fieldList.put(primaryKey, titleAttributeValue);
}
if (StringUtils.isEmpty(displayText))
return getHyperLink(clazz, fieldList, UrlFactory.parameterizeUrl(KRADConstants.INQUIRY_ACTION, parameters));
else
return getHyperLink(clazz, fieldList, UrlFactory.parameterizeUrl(KRADConstants.INQUIRY_ACTION, parameters),
displayText);
}
示例7: 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;
}
示例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: 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;
}
示例10: 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;
}
示例11: getCreateNewUrl
import org.kuali.rice.krad.util.UrlFactory; //导入依赖的package包/类
@Override
public String getCreateNewUrl() {
String url = "";
if((getLookupableHelperService()).allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_PERSON_DOCUMENT_TYPE_NAME)
&& canModifyEntity(GlobalVariables.getUserSession().getPrincipalId(), null)){
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);
if (StringUtils.isNotBlank(getReturnLocation())) {
parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());
}
url = getCreateNewUrl(UrlFactory.parameterizeUrl(
KimCommonUtilsInternal.getKimBasePath()+ KimConstants.KimUIConstants.KIM_PERSON_DOCUMENT_ACTION, parameters));
//String url = "lookup.do?businessObjectClassName=org.kuali.rice.kim.bo.types.impl.KimTypeImpl&returnLocation=portal.do&docFormKey="+KimApiConstants.KimUIConstants.KIM_ROLE_DOCUMENT_SHORT_KEY;
//url = "../kim/identityManagementPersonDocument.do?methodToCall=docHandler&command=initiate&docTypeName=IdentityManagementPersonDocument";
//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;
}
示例12: 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;
}
示例13: getCustomRoleInquiryHref
import org.kuali.rice.krad.util.UrlFactory; //导入依赖的package包/类
static String getCustomRoleInquiryHref(String backLocation, String href){
Properties parameters = new Properties();
String hrefPart = "";
String docTypeAction = "";
if(StringUtils.isBlank(backLocation) || backLocation.contains(KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_ACTION)
|| !backLocation.contains(KimConstants.KimUIConstants.KIM_GROUP_DOCUMENT_ACTION)){
docTypeAction = KimConstants.KimUIConstants.KIM_ROLE_INQUIRY_ACTION;
} else{
docTypeAction = KimConstants.KimUIConstants.KIM_GROUP_DOCUMENT_ACTION;
}
if (StringUtils.isNotBlank(href) && href.contains(ROLE_ID_URL_KEY)) {
int idx1 = href.indexOf("&"+ KimConstants.PrimaryKeyConstants.ROLE_ID+"=");
int idx2 = href.indexOf("&", idx1+1);
if (idx2 < 0) {
idx2 = href.length();
}
parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.PARAM_MAINTENANCE_VIEW_MODE_INQUIRY);
hrefPart = href.substring(idx1, idx2);
}
return UrlFactory.parameterizeUrl(KimCommonUtilsInternal.getKimBasePath()+docTypeAction, parameters)+hrefPart;
}
示例14: 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);
}
示例15: 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);
}