001package org.kuali.student.lum.common.client.lo; 002 003import org.kuali.student.r1.common.assembly.data.Data; 004import org.kuali.student.r1.common.assembly.helper.PropertyEnum; 005 006public class RichTextHelper { 007 private Data data; 008 009 public enum Properties implements PropertyEnum { 010 PLAIN("plain"), 011 FORMATTED("formatted"); 012 private final String key; 013 014 private Properties(final String key) { 015 this.key = key; 016 } 017 018 @Override 019 public String getKey() { 020 return this.key; 021 } 022 } 023 024 public RichTextHelper() { 025 data = new Data(); 026 } 027 028 public RichTextHelper(Data data) { 029 this.data = data; 030 } 031 032 public Data getData() { 033 return data; 034 } 035 036 public void setData(Data data) { 037 this.data = data; 038 } 039 040 public void setPlain(String plain) { 041 data.set(Properties.PLAIN.getKey(), plain); 042 } 043 044 public String getPlain() { 045 return (String) data.get(Properties.PLAIN.getKey()); 046 } 047 048 public void setFormatted(String formatted) { 049 data.set(Properties.FORMATTED.getKey(), formatted); 050 } 051 052 public String getFormatted() { 053 return (String) data.get(Properties.FORMATTED.getKey()); 054 } 055}