Coverage Report - org.kuali.rice.kew.api.action.AdHocRevokeFromGroup
 
Classes in this File Line Coverage Branch Coverage Complexity
AdHocRevokeFromGroup
0%
0/9
0%
0/2
1.5
AdHocRevokeFromGroup$Constants
0%
0/1
N/A
1.5
AdHocRevokeFromGroup$Elements
0%
0/1
N/A
1.5
 
 1  
 package org.kuali.rice.kew.api.action;
 2  
 
 3  
 import javax.xml.bind.annotation.XmlAccessType;
 4  
 import javax.xml.bind.annotation.XmlAccessorType;
 5  
 import javax.xml.bind.annotation.XmlElement;
 6  
 import javax.xml.bind.annotation.XmlRootElement;
 7  
 import javax.xml.bind.annotation.XmlType;
 8  
 
 9  
 import org.apache.commons.lang.StringUtils;
 10  
 
 11  0
 @XmlRootElement(name = AdHocRevokeFromGroup.Constants.ROOT_ELEMENT_NAME)
 12  
 @XmlAccessorType(XmlAccessType.NONE)
 13  
 @XmlType(name = AdHocRevokeFromGroup.Constants.TYPE_NAME, propOrder = {
 14  
                 AdHocRevokeFromGroup.Elements.GROUP_ID
 15  
 })
 16  
 public final class AdHocRevokeFromGroup extends AdHocRevokeCommand {
 17  
 
 18  
         private static final long serialVersionUID = 1084623378944347299L;
 19  
 
 20  
         @XmlElement(name = Elements.GROUP_ID, required = true)
 21  
         private final String groupId;
 22  
         
 23  
         private AdHocRevokeFromGroup(String actionRequestId, String nodeName, String groupId) {
 24  0
                 super(actionRequestId, nodeName);
 25  0
                 if (StringUtils.isBlank(groupId)) {
 26  0
                         throw new IllegalArgumentException("groupId was null or blank");
 27  
                 }
 28  0
                 this.groupId = groupId;
 29  0
         }
 30  
         
 31  
         public static AdHocRevokeFromGroup createRevokeByActionRequest(String actionRequestId, String groupId) {
 32  0
                 return new AdHocRevokeFromGroup(actionRequestId, null, groupId);
 33  
         }
 34  
         
 35  
         public static AdHocRevokeFromGroup createRevokeByNodeName(String nodeName, String groupId) {
 36  0
                 return new AdHocRevokeFromGroup(null, nodeName, groupId);
 37  
         }
 38  
                 
 39  
         public String getGroupId() {
 40  0
                 return groupId;
 41  
         }
 42  
         
 43  
         /**
 44  
      * Defines some internal constants used on this class.
 45  
      */
 46  0
     static class Constants {
 47  
         final static String ROOT_ELEMENT_NAME = "adHocRevokeFromGroup";
 48  
         final static String TYPE_NAME = "AdHocRevokeFromGroupType";
 49  
     }
 50  
     
 51  
     /**
 52  
      * A private class which exposes constants which define the XML element names to use when this object is marshalled to XML.
 53  
      */
 54  0
     static class Elements {
 55  
         final static String GROUP_ID = "groupId";
 56  
     }
 57  
         
 58  
 }