package net.sourceforge.fenixedu.webServices.macaddress; import net.sourceforge.fenixedu.domain.MacAddress; import pt.iscte.ci.metadata.ISCTE; @ISCTE(author = "Paulo Zenida") public class MacAddressBean { private String username; private String address; public MacAddressBean() { } public MacAddressBean(final MacAddress macAddress) { setUsername(macAddress.getPerson().getIstUsername()); setAddress(macAddress.getAddress()); } /** * @return the username */ public String getUsername() { return username; } /** * @param username * the username to set */ public void setUsername(String username) { this.username = (username != null && username.endsWith("@iscte.pt")) ? username.substring(0, username .indexOf("@iscte.pt")) : username; } /** * @return the address */ public String getAddress() { return address; } /** * @param address * the address to set */ public void setAddress(String address) { this.address = address; } }