[6785] | 1 | /** |
---|
| 2 | * MailArchiver is an application that provides services for storing and managing e-mail messages through a Web Services SOAP interface. |
---|
| 3 | * Copyright (C) 2012 Marcio Andre Scholl Levien and Fernando Alberto Reuter Wendt and Jose Ronaldo Nogueira Fonseca Junior |
---|
| 4 | * |
---|
| 5 | * This program is free software: you can redistribute it and/or modify |
---|
| 6 | * it under the terms of the GNU Affero General Public License as |
---|
| 7 | * published by the Free Software Foundation, either version 3 of the |
---|
| 8 | * License, or (at your option) any later version. |
---|
| 9 | * |
---|
| 10 | * This program is distributed in the hope that it will be useful, |
---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 13 | * GNU Affero General Public License for more details. |
---|
| 14 | * |
---|
| 15 | * You should have received a copy of the GNU Affero General Public License |
---|
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
| 17 | */ |
---|
| 18 | |
---|
| 19 | /******************************************************************************\ |
---|
| 20 | * |
---|
| 21 | * This product was developed by |
---|
| 22 | * |
---|
| 23 | * SERVIÃO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), |
---|
| 24 | * |
---|
| 25 | * a government company established under Brazilian law (5.615/70), |
---|
| 26 | * at Department of Development of Porto Alegre. |
---|
| 27 | * |
---|
| 28 | \******************************************************************************/ |
---|
| 29 | |
---|
| 30 | package serpro.mailarchiver.domain.metaarchive; |
---|
| 31 | |
---|
| 32 | import javax.jdo.JDOHelper; |
---|
| 33 | import javax.jdo.annotations.NotPersistent; |
---|
| 34 | import javax.jdo.annotations.PersistenceCapable; |
---|
| 35 | |
---|
| 36 | import serpro.mailarchiver.util.Logger; |
---|
| 37 | |
---|
| 38 | @PersistenceCapable |
---|
| 39 | public class AddressListField_Mailbox |
---|
| 40 | extends AddressListField_Address |
---|
| 41 | implements Mailbox |
---|
| 42 | { |
---|
| 43 | @NotPersistent |
---|
| 44 | private static final Logger log = Logger.getLocalLogger(); |
---|
| 45 | |
---|
| 46 | @Override |
---|
| 47 | public final String getLocalPart() { |
---|
| 48 | return localPart; |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | @Override |
---|
| 52 | public final void setLocalPart(String localPart) { |
---|
| 53 | this.localPart = localPart; |
---|
| 54 | } |
---|
| 55 | |
---|
| 56 | @Override |
---|
| 57 | public final String getDomain() { |
---|
| 58 | return domain; |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | @Override |
---|
| 62 | public final void setDomain(String domain) { |
---|
| 63 | this.domain = domain; |
---|
| 64 | } |
---|
| 65 | |
---|
| 66 | @Override |
---|
| 67 | public final String getRoute() { |
---|
| 68 | return route; |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | @Override |
---|
| 72 | public final void setRoute(String route) { |
---|
| 73 | this.route = route; |
---|
| 74 | } |
---|
| 75 | |
---|
| 76 | //---------------------------------------------------------------------- |
---|
| 77 | @Override |
---|
| 78 | final void dumpTree(StringBuilder sb, String pad) { |
---|
| 79 | sb.append(toString(pad + " ")); |
---|
| 80 | } |
---|
| 81 | |
---|
| 82 | @Override |
---|
| 83 | final String toString(String pad) { |
---|
| 84 | String idx = (getField() == null) ? "" : ("[" + String.valueOf(getFieldIdx()) + "]"); |
---|
| 85 | return String.format( |
---|
| 86 | "AddressListField_Mailbox %1$s%n" |
---|
| 87 | + "%2$sjdoState: %3$s%n" |
---|
| 88 | + "%2$soid: %4$s%n" |
---|
| 89 | + "%2$shash: %5$x%n" |
---|
| 90 | + "%2$sname: %6$s%n" |
---|
| 91 | + "%2$slocalPart: %7$s%n" |
---|
| 92 | + "%2$sdomain: %8$s%n" |
---|
| 93 | + "%2$sroute: %9$s" |
---|
| 94 | , idx |
---|
| 95 | , pad |
---|
| 96 | , JDOHelper.getObjectState(this) |
---|
| 97 | , getOid() |
---|
| 98 | , hashCode() |
---|
| 99 | , getName() |
---|
| 100 | , getLocalPart() |
---|
| 101 | , getDomain() |
---|
| 102 | , getRoute()); |
---|
| 103 | } |
---|
| 104 | } |
---|