Coverage Report - org.kuali.rice.kim.xml.GroupXmlDto
 
Classes in this File Line Coverage Branch Coverage Complexity
GroupXmlDto
0%
0/35
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2008 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.xml;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.ArrayList;
 20  
 import java.util.List;
 21  
 
 22  
 import javax.xml.bind.annotation.XmlAccessType;
 23  
 import javax.xml.bind.annotation.XmlAccessorType;
 24  
 import javax.xml.bind.annotation.XmlElement;
 25  
 import javax.xml.bind.annotation.XmlElementWrapper;
 26  
 import javax.xml.bind.annotation.XmlRootElement;
 27  
 import javax.xml.bind.annotation.XmlType;
 28  
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 29  
 
 30  
 import org.kuali.rice.core.jaxb.AdapterAttributeSetToHashMap;
 31  
 import org.kuali.rice.kim.bo.types.dto.AttributeSet;
 32  
 
 33  
 
 34  
 
 35  
 /**
 36  
  * This is a description of what this class does - sgibson don't forget to fill this in. 
 37  
  * 
 38  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 39  
  *
 40  
  */
 41  
 
 42  
 @XmlRootElement(name = "group", namespace = "http://rice.kuali.org/xsd/kim/group")
 43  
 @XmlAccessorType(XmlAccessType.FIELD)
 44  
 @XmlType(name = "Group", namespace = "http://rice.kuali.org/xsd/kim/group", propOrder = {
 45  
     "groupId", "groupName", "groupDescription", "active", "kimTypeId", "namespaceCode",
 46  
     "attributes","members"
 47  
 })
 48  
 public class GroupXmlDto implements Serializable {
 49  
         
 50  
         public GroupXmlDto(String groupName, String groupDescription, boolean active) {
 51  0
                 super();
 52  0
                 this.groupName = groupName;
 53  0
                 this.groupDescription = groupDescription;
 54  0
                 this.active = active;
 55  0
         }
 56  
         public GroupXmlDto() {
 57  0
                 super();
 58  0
                 this.active = true;
 59  0
         }
 60  
 
 61  
         private static final long serialVersionUID = 1L;
 62  
 
 63  
         @XmlElement(name = "groupId", namespace = "http://rice.kuali.org/xsd/kim/group")        
 64  
         protected String groupId;
 65  
 
 66  
         @XmlElement(name = "groupName", namespace = "http://rice.kuali.org/xsd/kim/group")        
 67  
         protected String groupName;
 68  
 
 69  
         @XmlElement(name = "groupDescription", namespace = "http://rice.kuali.org/xsd/kim/group")        
 70  
         protected String groupDescription;
 71  
 
 72  
         @XmlElement(name = "active", namespace = "http://rice.kuali.org/xsd/kim/group")        
 73  
         protected boolean active;
 74  
 
 75  
         @XmlElement(name = "kimTypeId", namespace = "http://rice.kuali.org/xsd/kim/group")        
 76  
         protected String kimTypeId;
 77  
 
 78  
         @XmlElement(name = "namespaceCode", namespace = "http://rice.kuali.org/xsd/kim/group")        
 79  
         protected String namespaceCode;
 80  
 
 81  
         //@XmlElement(name = "attributes", namespace = "http://rice.kuali.org/xsd/kim/group")        
 82  
         //@XmlJavaTypeAdapter(value = AttributeSetAdapter.class)
 83  
 //    @XmlJavaTypeAdapter(AdapterAttributeSetToHashMap.class)
 84  
         
 85  
         @XmlElement(name = "attributes", namespace = "http://rice.kuali.org/xsd/kim/group")
 86  
         @XmlJavaTypeAdapter(AdapterAttributeSetToHashMap.class)
 87  
         protected AttributeSet attributes;
 88  
 
 89  
         
 90  
         
 91  0
         @XmlElementWrapper(name = "members", namespace = "http://rice.kuali.org/xsd/kim/group")
 92  
         @XmlElement(name = "member", namespace = "http://rice.kuali.org/xsd/kim/group")        
 93  
         protected List<GroupMembershipXmlDto> members = new ArrayList<GroupMembershipXmlDto>();
 94  
                 
 95  
         public String getGroupDescription() {
 96  0
                 return this.groupDescription;
 97  
         }
 98  
 
 99  
         public String getGroupId() {
 100  0
                 return this.groupId;
 101  
         }
 102  
 
 103  
         public String getGroupName() {
 104  0
                 return this.groupName;
 105  
         }
 106  
 
 107  
         public String getKimTypeId() {
 108  0
                 return this.kimTypeId;
 109  
         }
 110  
 
 111  
         public String getNamespaceCode() {
 112  0
                 return this.namespaceCode;
 113  
         }
 114  
 /*
 115  
         public AttributeSet getAttributes() {
 116  
                 return this.attributes;
 117  
         }
 118  
         */
 119  
 //        public HashMap getAttributes() {
 120  
 //                return this.attributes;
 121  
 //        }
 122  
         
 123  
         public List<GroupMembershipXmlDto> getMembers() {
 124  0
                 return this.members;
 125  
         }
 126  
         
 127  
         public void setGroupDescription(String groupDescription) {
 128  0
                 this.groupDescription = groupDescription;
 129  0
         }
 130  
 
 131  
         public void setGroupId(String groupId) {
 132  0
                 this.groupId = groupId;
 133  0
         }
 134  
 
 135  
         public void setGroupName(String groupName) {
 136  0
                 this.groupName = groupName;
 137  0
         }
 138  
 
 139  
         public void setKimTypeId(String kimTypeId) {
 140  0
                 this.kimTypeId = kimTypeId;
 141  0
         }
 142  
 
 143  
         public void setNamespaceCode(String namespaceCode) {
 144  0
                 this.namespaceCode = namespaceCode;
 145  0
         }
 146  
 /*
 147  
         public void setAttributes(AttributeSet attributes) {
 148  
                 this.attributes = attributes;
 149  
         }
 150  
         */
 151  
 //        public void setAttributes(HashMap attributes) {
 152  
 //                this.attributes = attributes;
 153  
 //        }
 154  
         
 155  
         public void setMembers(List<GroupMembershipXmlDto> members) {
 156  0
                 this.members = members;
 157  0
         }
 158  
 
 159  
         public boolean isActive() {
 160  0
                 return this.active;
 161  
         }
 162  
 
 163  
         public void setActive(boolean active) {
 164  0
                 this.active = active;
 165  0
         }
 166  
 
 167  
     public void refresh(){
 168  
             
 169  0
     }
 170  
     
 171  
     public void prepareForWorkflow(){
 172  
             
 173  0
     }
 174  
         public AttributeSet getAttributes() {
 175  0
                 return this.attributes;
 176  
         }
 177  
         public void setAttributes(AttributeSet attributes) {
 178  0
                 this.attributes = attributes;
 179  0
         }
 180  
 
 181  
 }