|  1 |     | 
     | 
  |  2 |     | 
     | 
  |  3 |     | 
     | 
  |  4 |     | 
     | 
  |  5 |     | 
     | 
  |  6 |     | 
     | 
  |  7 |     | 
     | 
  |  8 |     | 
     | 
  |  9 |     | 
     | 
  |  10 |     | 
     | 
  |  11 |     | 
     | 
  |  12 |     | 
     | 
  |  13 |     | 
     | 
  |  14 |     | 
     | 
  |  15 |     | 
     | 
  |  16 |     | 
   package org.kuali.rice.kim.impl.responsibility;  | 
  |  17 |     | 
     | 
  |  18 |     | 
   import java.util.Properties;  | 
  |  19 |     | 
     | 
  |  20 |     | 
   import org.apache.commons.lang.StringUtils;  | 
  |  21 |     | 
   import org.kuali.rice.kim.util.KimConstants;  | 
  |  22 |     | 
   import org.kuali.rice.krad.lookup.KualiLookupableImpl;  | 
  |  23 |     | 
   import org.kuali.rice.krad.util.KRADConstants;  | 
  |  24 |     | 
   import org.kuali.rice.krad.util.UrlFactory;  | 
  |  25 |     | 
     | 
  |  26 |    0 |    public class ResponsibilityLookupableImpl extends KualiLookupableImpl { | 
  |  27 |     | 
     | 
  |  28 |     | 
       @Override  | 
  |  29 |     | 
       public String getCreateNewUrl() { | 
  |  30 |    0 |            String url = "";  | 
  |  31 |     | 
     | 
  |  32 |    0 |            if (getLookupableHelperService().allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_REVIEW_RESPONSIBILITY_DOCUMENT_TYPE_NAME)) { | 
  |  33 |    0 |                Properties parameters = new Properties();  | 
  |  34 |    0 |                parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.MAINTENANCE_NEW_METHOD_TO_CALL);  | 
  |  35 |    0 |                parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, ReviewResponsibilityBo.class.getName());  | 
  |  36 |    0 |                if (StringUtils.isNotBlank(getReturnLocation())) { | 
  |  37 |    0 |                    parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());  | 
  |  38 |     | 
               }  | 
  |  39 |    0 |                url = UrlFactory.parameterizeUrl(KRADConstants.MAINTENANCE_ACTION, parameters);  | 
  |  40 |    0 |                url = "<a href=\"" + url + "\"><img src=\"images/tinybutton-createnew.gif\" alt=\"create new\" width=\"70\" height=\"15\"/></a>";  | 
  |  41 |     | 
           }  | 
  |  42 |     | 
     | 
  |  43 |    0 |            return url;  | 
  |  44 |     | 
       }  | 
  |  45 |     | 
   }  |