本文整理汇总了Java中org.kuali.rice.kns.lookup.HtmlData.AnchorHtmlData方法的典型用法代码示例。如果您正苦于以下问题:Java HtmlData.AnchorHtmlData方法的具体用法?Java HtmlData.AnchorHtmlData怎么用?Java HtmlData.AnchorHtmlData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kns.lookup.HtmlData
的用法示例。
在下文中一共展示了HtmlData.AnchorHtmlData方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInquiryUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的package包/类
@Override
public HtmlData getInquiryUrl(BusinessObject businessObject, String attributeName, boolean forceInquiry) {
if(DOCUMENT_ID.equals(attributeName)) {
HtmlData.AnchorHtmlData link = new HtmlData.AnchorHtmlData();
RuleBaseValues rule = (RuleBaseValues)businessObject;
String documentId = rule.getDocumentId();
link.setDisplayText(documentId+"");
String href = ConfigContext.getCurrentContextConfig().getKEWBaseURL() + "/" +
KewApiConstants.DOC_HANDLER_REDIRECT_PAGE + "?" + KewApiConstants.COMMAND_PARAMETER + "=" +
KewApiConstants.DOCSEARCH_COMMAND + "&" + KewApiConstants.DOCUMENT_ID_PARAMETER + "=" + documentId;
link.setHref(href);
return link;
}
return super.getInquiryUrl(businessObject, attributeName, forceInquiry);
}
示例2: generateInitiatorUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的package包/类
protected HtmlData.AnchorHtmlData generateInitiatorUrl(String principalId) {
HtmlData.AnchorHtmlData link = new HtmlData.AnchorHtmlData();
if (StringUtils.isBlank(principalId) ) {
return link;
}
if (isRouteLogPopup()) {
link.setTarget("_blank");
}
else {
link.setTarget("_self");
}
link.setDisplayText("Initiator Inquiry for User with ID:" + principalId);
String url = ConfigContext.getCurrentContextConfig().getProperty(Config.KIM_URL) + "/" +
"identityManagementPersonInquiry.do?principalId=" + principalId;
link.setHref(url);
return link;
}
示例3: getAssignedRoleInquiryUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的package包/类
protected HtmlData getAssignedRoleInquiryUrl(BusinessObject businessObject){
UberPermissionBo permission = (UberPermissionBo)businessObject;
List<RoleBo> assignedToRoles = permission.getAssignedToRoles();
List<HtmlData.AnchorHtmlData> htmlData = new ArrayList<HtmlData.AnchorHtmlData>();
if(assignedToRoles!=null && !assignedToRoles.isEmpty()){
RoleService roleService = KimApiServiceLocator.getRoleService();
for(RoleBo roleImpl: assignedToRoles){
Role roleInfo = roleService.getRole(roleImpl.getId());
HtmlData.AnchorHtmlData inquiryHtmlData = getInquiryUrlForPrimaryKeys(RoleBo.class, roleInfo, Collections.singletonList(ID),
roleInfo.getNamespaceCode()+ " " + roleInfo.getName());
inquiryHtmlData.setHref(RoleLookupableHelperServiceImpl.getCustomRoleInquiryHref(inquiryHtmlData.getHref()));
inquiryHtmlData.setTarget(HtmlData.AnchorHtmlData.TARGET_BLANK);
htmlData.add(inquiryHtmlData);
}
}
return new HtmlData.MultipleAnchorHtmlData(htmlData);
}
示例4: getEditGroupUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的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: getCustomActionUrls
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的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;
}
示例6: getAssignedRoleInquiryUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的package包/类
protected HtmlData getAssignedRoleInquiryUrl(BusinessObject businessObject){
UberResponsibilityBo responsibility = (UberResponsibilityBo)businessObject;
List<RoleBo> assignedToRoles = responsibility.getAssignedToRoles();
List<HtmlData.AnchorHtmlData> htmlData = new ArrayList<HtmlData.AnchorHtmlData>();
if(assignedToRoles!=null && !assignedToRoles.isEmpty()){
List<String> primaryKeys = Collections.singletonList(ID);
RoleService roleService = KimApiServiceLocator.getRoleService();
for(RoleBo roleImpl: assignedToRoles){
Role role = roleService.getRole(roleImpl.getId());
HtmlData.AnchorHtmlData inquiryHtmlData = getInquiryUrlForPrimaryKeys(RoleBo.class, role, primaryKeys,
role.getNamespaceCode()+" "+
role.getName());
inquiryHtmlData.setHref(RoleLookupableHelperServiceImpl.getCustomRoleInquiryHref(inquiryHtmlData.getHref()));
htmlData.add(inquiryHtmlData);
}
}
return new HtmlData.MultipleAnchorHtmlData(htmlData);
}
示例7: generateRouteLogUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的package包/类
protected HtmlData.AnchorHtmlData generateRouteLogUrl(String documentId) {
HtmlData.AnchorHtmlData link = new HtmlData.AnchorHtmlData();
// KULRICE-6822 Route log link target parameter always causing pop-up
if (isRouteLogPopup()) {
link.setTarget("_blank");
}
else {
link.setTarget("_self");
}
link.setDisplayText("Route Log for document " + documentId);
String url = ConfigContext.getCurrentContextConfig().getProperty(Config.KEW_URL) + "/" +
"RouteLog.do?documentId=" + documentId;
link.setHref(url);
return link;
}
示例8: getAttributesInquiryUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的package包/类
protected HtmlData getAttributesInquiryUrl(BusinessObject businessObject, String attributeName){
DataObjectWrapper<BusinessObject> wrapper = KradDataServiceLocator.getDataObjectService().wrap(businessObject);
List<PermissionAttributeBo> permissionAttributeData =
(List<PermissionAttributeBo>) wrapper.getPropertyValueNullSafe(attributeName);
List<HtmlData.AnchorHtmlData> htmlData = new ArrayList<HtmlData.AnchorHtmlData>();
List<String> primaryKeys = new ArrayList<String>();
primaryKeys.add(ATTRIBUTE_DATA_ID);
for(PermissionAttributeBo permissionAttributeDataImpl: permissionAttributeData){
htmlData.add(getInquiryUrlForPrimaryKeys(PermissionAttributeBo.class, permissionAttributeDataImpl, primaryKeys,
getKimAttributeLabelFromDD(permissionAttributeDataImpl.getKimAttribute().getAttributeName())+
KimConstants.KimUIConstants.NAME_VALUE_SEPARATOR+
permissionAttributeDataImpl.getAttributeValue()));
}
return new HtmlData.MultipleAnchorHtmlData(htmlData);
}
示例9: getEditRoleUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的package包/类
protected HtmlData getEditRoleUrl(RoleBo roleBo) {
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_ROLE_DOCUMENT_TYPE_NAME);
parameters.put(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, roleBo.getId());
if (StringUtils.isNotBlank(getReturnLocation())) {
parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());
}
String href = UrlFactory.parameterizeUrl(KimCommonUtilsInternal.getKimBasePath()+KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_ACTION, parameters);
HtmlData.AnchorHtmlData anchorHtmlData = new HtmlData.AnchorHtmlData(href,
KRADConstants.DOC_HANDLER_METHOD, KRADConstants.MAINTENANCE_EDIT_METHOD_TO_CALL);
return anchorHtmlData;
}
示例10: getAttributesInquiryUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的package包/类
protected HtmlData getAttributesInquiryUrl(BusinessObject businessObject, String attributeName){
DataObjectWrapper<BusinessObject> wrapper = KradDataServiceLocator.getDataObjectService().wrap(businessObject);
List<ResponsibilityAttributeBo> responsibilityAttributeData =
(List<ResponsibilityAttributeBo>) wrapper.getPropertyValueNullSafe(attributeName);
List<HtmlData.AnchorHtmlData> htmlData = new ArrayList<HtmlData.AnchorHtmlData>();
List<String> primaryKeys = new ArrayList<String>();
primaryKeys.add(ATTRIBUTE_DATA_ID);
for(ResponsibilityAttributeBo responsibilityAttributeDataImpl: responsibilityAttributeData){
htmlData.add(getInquiryUrlForPrimaryKeys(ResponsibilityAttributeBo.class, responsibilityAttributeDataImpl, primaryKeys,
getKimAttributeLabelFromDD(responsibilityAttributeDataImpl.getKimAttribute().getAttributeName())+ KimConstants.KimUIConstants.NAME_VALUE_SEPARATOR+
responsibilityAttributeDataImpl.getAttributeValue()));
}
return new HtmlData.MultipleAnchorHtmlData(htmlData);
}
示例11: getCreateDocumentUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的package包/类
protected HtmlData getCreateDocumentUrl(EDocLiteAssociation edlAssociation) {
String href = "";
Properties parameters = new Properties();
parameters.put("userAction", UserAction.ACTION_CREATE);
parameters.put("edlName", edlAssociation.getEdlName());
href = UrlFactory.parameterizeUrl(
ConfigContext.getCurrentContextConfig().getKEWBaseURL()+"/EDocLite",
parameters);
HtmlData.AnchorHtmlData anchorHtmlData = new HtmlData.AnchorHtmlData(href, null, "Create Document");
return anchorHtmlData;
}
示例12: getInquiryUrl
import org.kuali.rice.kns.lookup.HtmlData; //导入方法依赖的package包/类
/**
* @see AbstractPayeeLookupableHelperServiceImpl#getInquiryUrl
* For payeeName, creates an inquiry link for the PayeeACHAccount record only if the user is allowed to inquire the record.
*/
@Override
public HtmlData getInquiryUrl(BusinessObject bo, String propertyName) {
// for properties other than payeeName, or if the user is allowed to inquire the record, return inquiry link as done in super
// NOTE: Since we don't have separate permission for inquiring PayeeACHAccount, we regard the permission for inquiry as equivalent to the permission for edit.
if (!StringUtils.equals(PdpPropertyConstants.PAYEE_NAME, propertyName) || allowsMaintenanceEditAction(bo))
return super.getInquiryUrl(bo, propertyName);
// otherwise return empty inquiry link
return new HtmlData.AnchorHtmlData();
}