Coverage Report - org.kuali.rice.kim.web.struts.action.IdentityManagementGroupInquiry
 
Classes in this File Line Coverage Branch Coverage Complexity
IdentityManagementGroupInquiry
0%
0/12
0%
0/6
4
 
 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.web.struts.action;
 17  
 
 18  
 import javax.servlet.http.HttpServletRequest;
 19  
 
 20  
 import org.apache.commons.lang.StringUtils;
 21  
 import org.kuali.rice.kim.bo.group.dto.GroupInfo;
 22  
 import org.kuali.rice.kim.service.KIMServiceLocator;
 23  
 import org.kuali.rice.kim.util.KimConstants;
 24  
 import org.kuali.rice.kim.web.struts.form.IdentityManagementDocumentFormBase;
 25  
 import org.kuali.rice.kim.web.struts.form.IdentityManagementGroupDocumentForm;
 26  
 
 27  
 /**
 28  
  * This is a description of what this class does - jonathan don't forget to fill this in. 
 29  
  * 
 30  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 31  
  *
 32  
  */
 33  0
 public class IdentityManagementGroupInquiry extends IdentityManagementBaseInquiryAction {
 34  
 
 35  
         /**
 36  
          * This overridden method ...
 37  
          * 
 38  
          * @see org.kuali.rice.kim.web.struts.action.IdentityManagementBaseInquiryAction#loadKimObject(javax.servlet.http.HttpServletRequest, org.kuali.rice.kim.web.struts.form.IdentityManagementDocumentFormBase)
 39  
          */
 40  
         @Override
 41  
         protected void loadKimObject(HttpServletRequest request, IdentityManagementDocumentFormBase form) {
 42  0
         IdentityManagementGroupDocumentForm groupDocumentForm = (IdentityManagementGroupDocumentForm) form;
 43  0
         String groupId = request.getParameter(KimConstants.PrimaryKeyConstants.GROUP_ID);
 44  
         
 45  0
         GroupInfo group = null;
 46  0
         if (StringUtils.isNotEmpty(groupId)) {
 47  0
                 group = KIMServiceLocator.getGroupService().getGroupInfo(groupId);
 48  
         } else {
 49  0
                 String namespaceCode = request.getParameter(KimConstants.UniqueKeyConstants.NAMESPACE_CODE);
 50  0
                 String groupName = request.getParameter(KimConstants.UniqueKeyConstants.GROUP_NAME);
 51  
                 
 52  0
                 if (!StringUtils.isBlank(namespaceCode) && !StringUtils.isBlank(groupName)) {
 53  0
                         group = KIMServiceLocator.getGroupService().getGroupInfoByName(namespaceCode, groupName);
 54  
             }
 55  
         }
 56  0
         getUiDocumentService().loadGroupDoc(groupDocumentForm.getGroupDocument(), group);
 57  
 //            groupDocumentForm.setGroupId(groupId);
 58  
         
 59  0
         }
 60  
         
 61  
 }