Coverage Report - org.kuali.rice.kim.lookup.RoleLookupableImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
RoleLookupableImpl
0%
0/9
0%
0/2
2
 
 1  
 /*
 2  
  * Copyright 2007-2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kim.lookup;
 17  
 
 18  
 import java.util.Properties;
 19  
 
 20  
 import org.kuali.rice.kim.bo.types.impl.KimTypeImpl;
 21  
 import org.kuali.rice.kim.util.KimConstants;
 22  
 import org.kuali.rice.kns.lookup.KualiLookupableImpl;
 23  
 import org.kuali.rice.kns.util.KNSConstants;
 24  
 import org.kuali.rice.kns.util.UrlFactory;
 25  
 
 26  
 /**
 27  
  * This is a description of what this class does - shyu don't forget to fill this in. 
 28  
  * 
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  *
 31  
  */
 32  0
 public class RoleLookupableImpl extends KualiLookupableImpl {
 33  
 
 34  
     private static final long serialVersionUID = -543816772634893348L;
 35  
 
 36  
     @Override
 37  
     public String getCreateNewUrl() {
 38  0
         String url = "";
 39  0
         if((getLookupableHelperService()).allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_TYPE_NAME)){
 40  0
             Properties parameters = new Properties();
 41  0
             parameters.put(KNSConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, KimTypeImpl.class.getName());
 42  0
             parameters.put(KNSConstants.RETURN_LOCATION_PARAMETER, KNSConstants.PORTAL_ACTION);
 43  0
             parameters.put(KNSConstants.DOC_FORM_KEY, KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_SHORT_KEY);
 44  0
             url = getCreateNewUrl(UrlFactory.parameterizeUrl(KNSConstants.LOOKUP_ACTION, parameters));
 45  
             //String url = "lookup.do?businessObjectClassName=org.kuali.rice.kim.bo.types.impl.KimTypeImpl&returnLocation=portal.do&docFormKey="+KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_SHORT_KEY;
 46  
         }
 47  0
         return url;
 48  
     }
 49  
 
 50  
 }