|  1 |     | 
     | 
  |  2 |     | 
     | 
  |  3 |     | 
     | 
  |  4 |     | 
     | 
  |  5 |     | 
     | 
  |  6 |     | 
     | 
  |  7 |     | 
     | 
  |  8 |     | 
     | 
  |  9 |     | 
     | 
  |  10 |     | 
     | 
  |  11 |     | 
     | 
  |  12 |     | 
     | 
  |  13 |     | 
     | 
  |  14 |     | 
     | 
  |  15 |     | 
     | 
  |  16 |     | 
   package org.kuali.rice.kew.api.action;  | 
  |  17 |     | 
     | 
  |  18 |     | 
   import javax.xml.bind.annotation.XmlAccessType;  | 
  |  19 |     | 
   import javax.xml.bind.annotation.XmlAccessorType;  | 
  |  20 |     | 
   import javax.xml.bind.annotation.XmlElement;  | 
  |  21 |     | 
   import javax.xml.bind.annotation.XmlRootElement;  | 
  |  22 |     | 
   import javax.xml.bind.annotation.XmlType;  | 
  |  23 |     | 
     | 
  |  24 |     | 
   import org.apache.commons.lang.StringUtils;  | 
  |  25 |     | 
     | 
  |  26 |    0 |    @XmlRootElement(name = AdHocToGroup.Constants.ROOT_ELEMENT_NAME)  | 
  |  27 |     | 
   @XmlAccessorType(XmlAccessType.NONE)  | 
  |  28 |     | 
   @XmlType(name = AdHocToGroup.Constants.TYPE_NAME, propOrder = { | 
  |  29 |     | 
                   AdHocToGroup.Elements.TARGET_GROUP_ID  | 
  |  30 |     | 
   })  | 
  |  31 |    0 |    public final class AdHocToGroup extends AdHocCommand { | 
  |  32 |     | 
     | 
  |  33 |     | 
           private static final long serialVersionUID = 1543126020560887187L;  | 
  |  34 |     | 
     | 
  |  35 |     | 
           @XmlElement(name = Elements.TARGET_GROUP_ID, required = true)  | 
  |  36 |     | 
           private final String targetGroupId;  | 
  |  37 |     | 
     | 
  |  38 |    0 |            private AdHocToGroup() { | 
  |  39 |    0 |                    this.targetGroupId = null;  | 
  |  40 |    0 |            }  | 
  |  41 |     | 
             | 
  |  42 |     | 
           private AdHocToGroup(Builder builder) { | 
  |  43 |    0 |                    super(builder);  | 
  |  44 |    0 |                    this.targetGroupId = builder.getTargetGroupId();  | 
  |  45 |    0 |            }  | 
  |  46 |     | 
     | 
  |  47 |     | 
           public String getTargetGroupId() { | 
  |  48 |    0 |                    return targetGroupId;  | 
  |  49 |     | 
           }  | 
  |  50 |     | 
             | 
  |  51 |    0 |            public static final class Builder extends AdHocCommand.Builder<AdHocToGroup> { | 
  |  52 |     | 
                     | 
  |  53 |     | 
                   private static final long serialVersionUID = 3062630774766721773L;  | 
  |  54 |     | 
     | 
  |  55 |     | 
                   private String targetGroupId;  | 
  |  56 |     | 
                     | 
  |  57 |     | 
                   private Builder(ActionRequestType actionRequested, String nodeName, String targetGroupId) { | 
  |  58 |    0 |                            super(actionRequested, nodeName);  | 
  |  59 |    0 |                            setTargetGroupId(targetGroupId);  | 
  |  60 |    0 |                    }  | 
  |  61 |     | 
                     | 
  |  62 |     | 
                   public static Builder create(ActionRequestType actionRequested, String nodeName, String targetGroupId) { | 
  |  63 |    0 |                            return new Builder(actionRequested, nodeName, targetGroupId);  | 
  |  64 |     | 
                   }  | 
  |  65 |     | 
                     | 
  |  66 |     | 
                   public String getTargetGroupId() { | 
  |  67 |    0 |                            return targetGroupId;  | 
  |  68 |     | 
                   }  | 
  |  69 |     | 
                     | 
  |  70 |     | 
                   public void setTargetGroupId(String targetGroupId) { | 
  |  71 |    0 |                            if (StringUtils.isBlank(targetGroupId)) { | 
  |  72 |    0 |                                    throw new IllegalArgumentException("targetGroupId was null or blank"); | 
  |  73 |     | 
                           }  | 
  |  74 |    0 |                            this.targetGroupId = targetGroupId;  | 
  |  75 |    0 |                    }  | 
  |  76 |     | 
                     | 
  |  77 |     | 
                   @Override  | 
  |  78 |     | 
                   public AdHocToGroup build() { | 
  |  79 |    0 |                            return new AdHocToGroup(this);  | 
  |  80 |     | 
                   }  | 
  |  81 |     | 
     | 
  |  82 |     | 
           }  | 
  |  83 |     | 
             | 
  |  84 |     | 
             | 
  |  85 |     | 
     | 
  |  86 |     | 
     | 
  |  87 |    0 |        static class Constants { | 
  |  88 |     | 
           final static String ROOT_ELEMENT_NAME = "adHocToGroup";  | 
  |  89 |     | 
           final static String TYPE_NAME = "AdHocToGroupType";  | 
  |  90 |     | 
       }  | 
  |  91 |     | 
         | 
  |  92 |     | 
         | 
  |  93 |     | 
     | 
  |  94 |     | 
     | 
  |  95 |    0 |        static class Elements { | 
  |  96 |     | 
           final static String TARGET_GROUP_ID = "targetGroupId";  | 
  |  97 |     | 
       }  | 
  |  98 |     | 
     | 
  |  99 |     | 
             | 
  |  100 |     | 
   }  |