Coverage Report - org.kuali.rice.core.impl.jaxb.DataXmlDTO
 
Classes in this File Line Coverage Branch Coverage Complexity
DataXmlDTO
0%
0/22
N/A
1
 
 1  
 /*
 2  
  * Copyright 2011 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/ecl1.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.core.impl.jaxb;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.List;
 20  
 
 21  
 import javax.xml.bind.Unmarshaller;
 22  
 import javax.xml.bind.annotation.XmlAccessType;
 23  
 import javax.xml.bind.annotation.XmlAccessorType;
 24  
 import javax.xml.bind.annotation.XmlAnyElement;
 25  
 import javax.xml.bind.annotation.XmlElement;
 26  
 import javax.xml.bind.annotation.XmlRootElement;
 27  
 import javax.xml.bind.annotation.XmlType;
 28  
 
 29  
 import org.kuali.rice.core.api.CoreConstants;
 30  
 import org.kuali.rice.core.util.jaxb.RiceXmlImportList;
 31  
 import org.kuali.rice.core.util.jaxb.RiceXmlListAdditionListener;
 32  
 import org.kuali.rice.kim.impl.jaxb.PermissionDataXmlDTO;
 33  
 import org.kuali.rice.kim.impl.jaxb.RoleDataXmlDTO;
 34  
 import org.w3c.dom.Element;
 35  
 
 36  
 /**
 37  
  * This class represents the root <data> XML element.
 38  
  * 
 39  
  * <p>Please see the Javadocs for PermissionDataXmlDTO and RoleDataXmlDTO for more information
 40  
  * on their expected structure.
 41  
  * 
 42  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 43  
  */
 44  0
 @XmlRootElement(name="data")
 45  
 @XmlAccessorType(XmlAccessType.FIELD)
 46  
 @XmlType(name="DataType", propOrder={"permissionData", "roleData", CoreConstants.CommonElements.FUTURE_ELEMENTS})
 47  
 public class DataXmlDTO implements RiceXmlListAdditionListener<Element>, Serializable {
 48  
 
 49  
     private static final long serialVersionUID = 1L;
 50  
     
 51  
     @XmlElement(name="permissionData")
 52  
     private PermissionDataXmlDTO permissionData;
 53  
     
 54  
     @XmlElement(name="roleData")
 55  
     private RoleDataXmlDTO roleData;
 56  
     
 57  0
     @XmlAnyElement
 58  
     private List<Element> _futureElements = null;
 59  
     
 60  0
     public DataXmlDTO() {}
 61  
     
 62  0
     public DataXmlDTO(PermissionDataXmlDTO permissionData, RoleDataXmlDTO roleData, List<Element> _futureElements) {
 63  0
         this.permissionData = permissionData;
 64  0
         this.roleData = roleData;
 65  0
         this._futureElements = _futureElements;
 66  0
     }
 67  
 
 68  
     /**
 69  
      * @return the permissionData
 70  
      */
 71  
     public PermissionDataXmlDTO getPermissionData() {
 72  0
         return this.permissionData;
 73  
     }
 74  
 
 75  
     /**
 76  
      * @param permissionData the permissionData to set
 77  
      */
 78  
     public void setPermissionData(PermissionDataXmlDTO permissionData) {
 79  0
         this.permissionData = permissionData;
 80  0
     }
 81  
 
 82  
     /**
 83  
      * @return the roleData
 84  
      */
 85  
     public RoleDataXmlDTO getRoleData() {
 86  0
         return this.roleData;
 87  
     }
 88  
 
 89  
     /**
 90  
      * @param roleData the roleData to set
 91  
      */
 92  
     public void setRoleData(RoleDataXmlDTO roleData) {
 93  0
         this.roleData = roleData;
 94  0
     }
 95  
 
 96  
     /**
 97  
      * @return the _futureElements
 98  
      */
 99  
     public List<Element> get_futureElements() {
 100  0
         return this._futureElements;
 101  
     }
 102  
 
 103  
     /**
 104  
      * @param _futureElements the _futureElements to set
 105  
      */
 106  
     public void set_futureElements(List<Element> _futureElements) {
 107  0
         this._futureElements = _futureElements;
 108  0
     }
 109  
 
 110  
     void beforeUnmarshal(Unmarshaller unmarshaller, Object parent) {
 111  0
         this._futureElements = new RiceXmlImportList<Element>(this);
 112  0
     }
 113  
     
 114  
     void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
 115  0
         this._futureElements = null;
 116  0
     }
 117  
 
 118  
     /**
 119  
      * @see org.kuali.rice.core.util.jaxb.RiceXmlListAdditionListener#newItemAdded(java.lang.Object)
 120  
      */
 121  
     @Override
 122  
     public void newItemAdded(Element item) {
 123  
         // Do nothing; this class just implements the streaming unmarshalling listener so that it doesn't hold onto all the DOM elements.
 124  0
     }
 125  
 }