Code example for StringWriter

Methods: toString, write

0
    public void setCandidateUsers(String candidateUsers) {
        this.candidateUsers = candidateUsers;
    } 
     
    public String toJpdl() throws InvalidModelException {
        StringWriter jpdl = new StringWriter();
        jpdl.write("<swimlane");
         
        jpdl.write(JsonToJpdl.transformAttribute("name", name));
        jpdl.write(JsonToJpdl.transformAttribute("assignee", assignee));
        jpdl.write(JsonToJpdl.transformAttribute("candidate-groups", candidateGroups));
        jpdl.write(JsonToJpdl.transformAttribute("candidate-users", candidateUsers));
 
        jpdl.write(" />\n");
        return jpdl.toString();
    } 
     
}