001
014
015 package com.liferay.portal.sharepoint.dws;
016
017 import com.liferay.portal.kernel.xml.Element;
018 import com.liferay.portal.model.Role;
019
020
023 public class RoleResponseElement implements ResponseElement {
024
025 public RoleResponseElement(Role role) {
026 _name = role.getName();
027 _description = role.getDescription();
028 _type = role.getTypeLabel();
029 }
030
031 @Override
032 public void addElement(Element rootEl) {
033 Element el = rootEl.addElement("Role");
034
035 el.addAttribute("Name", _name);
036 el.addAttribute("Description", _description);
037 el.addAttribute("Type", _type);
038 }
039
040 private String _description;
041 private String _name;
042 private String _type;
043
044 }