You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by rd...@apache.org on 2009/05/15 15:53:16 UTC

svn commit: r775135 [2/2] - in /james/imap/trunk: api/src/main/java/org/apache/james/imap/api/ api/src/main/java/org/apache/james/imap/api/display/ api/src/main/java/org/apache/james/imap/api/message/response/ api/src/test/java/org/apache/james/imap/ap...

Modified: james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/user/JPASubscriptionMapper.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/user/JPASubscriptionMapper.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/user/JPASubscriptionMapper.java (original)
+++ james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/user/JPASubscriptionMapper.java Fri May 15 13:53:14 2009
@@ -24,7 +24,7 @@
 import javax.persistence.NoResultException;
 import javax.persistence.PersistenceException;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.mailbox.SubscriptionException;
 import org.apache.james.imap.store.user.SubscriptionMapper;
 import org.apache.james.imap.store.user.model.Subscription;
@@ -48,7 +48,7 @@
         try {
             entityManager.getTransaction().begin();
         } catch (PersistenceException e) {
-            throw new SubscriptionException(HumanReadableTextKey.START_TRANSACTION_FAILED, e);
+            throw new SubscriptionException(HumanReadableText.START_TRANSACTION_FAILED, e);
         }
     }
 
@@ -59,7 +59,7 @@
         try {
             entityManager.getTransaction().commit();
         } catch (PersistenceException e) {
-            throw new SubscriptionException(HumanReadableTextKey.COMMIT_TRANSACTION_FAILED, e);
+            throw new SubscriptionException(HumanReadableText.COMMIT_TRANSACTION_FAILED, e);
         }
     }
 
@@ -74,7 +74,7 @@
         } catch (NoResultException e) {
             return null;
         } catch (PersistenceException e) {
-            throw new SubscriptionException(HumanReadableTextKey.SEARCH_FAILED, e);
+            throw new SubscriptionException(HumanReadableText.SEARCH_FAILED, e);
         }
     }
 
@@ -86,7 +86,7 @@
         try {
             entityManager.persist(subscription);
         } catch (PersistenceException e) {
-            throw new SubscriptionException(HumanReadableTextKey.SAVE_FAILED, e);
+            throw new SubscriptionException(HumanReadableText.SAVE_FAILED, e);
         }
     }
 
@@ -99,7 +99,7 @@
         try {
             return (List<Subscription>) entityManager.createNamedQuery("findSubscriptionsForUser").setParameter("userParam", user).getResultList();
         } catch (PersistenceException e) {
-            throw new SubscriptionException(HumanReadableTextKey.SEARCH_FAILED, e);
+            throw new SubscriptionException(HumanReadableText.SEARCH_FAILED, e);
         }
     }
 
@@ -111,7 +111,7 @@
         try {
             entityManager.remove(subscription);
         } catch (PersistenceException e) {
-            throw new SubscriptionException(HumanReadableTextKey.DELETED_FAILED, e);
+            throw new SubscriptionException(HumanReadableText.DELETED_FAILED, e);
         }
     }
 }

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/BadCredentialsException.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/BadCredentialsException.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/BadCredentialsException.java (original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/BadCredentialsException.java Fri May 15 13:53:14 2009
@@ -19,7 +19,7 @@
 
 package org.apache.james.imap.mailbox;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 
 /**
  * Indicates that the credentials for this operation were not acceptable.
@@ -29,10 +29,10 @@
     private static final long serialVersionUID = -8055692887730696513L;
 
     public BadCredentialsException() {
-        super(HumanReadableTextKey.INVALID_LOGIN);
+        super(HumanReadableText.INVALID_LOGIN);
     }
     
-    public BadCredentialsException(HumanReadableTextKey key) {
+    public BadCredentialsException(HumanReadableText key) {
         super(key);
     }
 

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxException.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxException.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxException.java (original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxException.java Fri May 15 13:53:14 2009
@@ -21,26 +21,26 @@
 
 import javax.mail.MessagingException;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 
 public class MailboxException extends MessagingException {
 
     private static final long serialVersionUID = 4612761817238115904L;
 
-    private final HumanReadableTextKey key;
+    private final HumanReadableText key;
     
-    public MailboxException(final HumanReadableTextKey key, final String message) {
+    public MailboxException(final HumanReadableText key, final String message) {
         super(message);
         this.key = key;
     }
 
     
-    public MailboxException(final HumanReadableTextKey key) {
+    public MailboxException(final HumanReadableText key) {
         super(key.toString());
         this.key = key;
     }
 
-    public MailboxException(final HumanReadableTextKey key, Throwable cause) {
+    public MailboxException(final HumanReadableText key, Throwable cause) {
         super(key.getDefaultValue());
         initCause(cause);
         this.key = key;
@@ -51,11 +51,11 @@
      * 
      * @return the key, possibly null
      */
-    public final HumanReadableTextKey getKey() {
-        final HumanReadableTextKey key;
+    public final HumanReadableText getKey() {
+        final HumanReadableText key;
         if (this.key == null) {
             // API specifies not null but best to default to generic message 
-            key = HumanReadableTextKey.GENERIC_FAILURE_DURING_PROCESSING;
+            key = HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING;
         } else {
             key = this.key;
         }

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxExistsException.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxExistsException.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxExistsException.java (original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxExistsException.java Fri May 15 13:53:14 2009
@@ -19,7 +19,7 @@
 
 package org.apache.james.imap.mailbox;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 
 /**
  * Indicates that the operation failed since the mailbox already exists.
@@ -31,7 +31,7 @@
     private final String mailboxName;
 
     public MailboxExistsException(String mailboxName) {
-        super(HumanReadableTextKey.MAILBOX_EXISTS);
+        super(HumanReadableText.MAILBOX_EXISTS);
         this.mailboxName = mailboxName;
     }
 

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxNotFoundException.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxNotFoundException.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxNotFoundException.java (original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/MailboxNotFoundException.java Fri May 15 13:53:14 2009
@@ -19,7 +19,7 @@
 
 package org.apache.james.imap.mailbox;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 
 /**
  * Indicates that the failure is caused by a reference to a mailbox which does
@@ -44,7 +44,7 @@
     private final long id;
     
     public MailboxNotFoundException(long id) {
-        super(HumanReadableTextKey.MAILBOX_NOT_FOUND, message(Long.toString(id)));
+        super(HumanReadableText.MAILBOX_NOT_FOUND, message(Long.toString(id)));
         this.id = id;
         mailboxName = null;
     }
@@ -55,7 +55,7 @@
      *            name of the mailbox, not null
      */
     public MailboxNotFoundException(String mailboxName) {
-        super(HumanReadableTextKey.MAILBOX_NOT_FOUND, message(mailboxName));
+        super(HumanReadableText.MAILBOX_NOT_FOUND, message(mailboxName));
         this.mailboxName = mailboxName;
         this.id = 0;
     }

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/StorageException.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/StorageException.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/StorageException.java (original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/StorageException.java Fri May 15 13:53:14 2009
@@ -18,7 +18,7 @@
  ****************************************************************/
 package org.apache.james.imap.mailbox;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 
 /**
  * Indicates a general problem in the underlying storage layer.
@@ -28,7 +28,7 @@
 
     private static final long serialVersionUID = 2708951014093934093L;
 
-    public StorageException(HumanReadableTextKey key, Throwable cause) {
+    public StorageException(HumanReadableText key, Throwable cause) {
         super(key, cause);
     }
 }

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/SubscriptionException.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/SubscriptionException.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/SubscriptionException.java (original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/SubscriptionException.java Fri May 15 13:53:14 2009
@@ -19,7 +19,7 @@
 
 package org.apache.james.imap.mailbox;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 
 /**
  * Indicates exception during subscription processing.
@@ -28,11 +28,11 @@
 
     private static final long serialVersionUID = -4512372322774311468L;
 
-    public SubscriptionException(final HumanReadableTextKey key) {
+    public SubscriptionException(final HumanReadableText key) {
         super(key);
     }
 
-    public SubscriptionException(final HumanReadableTextKey key, Throwable cause) {
+    public SubscriptionException(final HumanReadableText key, Throwable cause) {
         super(key, cause);
     }
 }

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedCriteriaException.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedCriteriaException.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedCriteriaException.java (original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedCriteriaException.java Fri May 15 13:53:14 2009
@@ -19,7 +19,7 @@
 
 package org.apache.james.imap.mailbox;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 
 /**
  * Indicates that a search criteria is not supported.
@@ -28,7 +28,7 @@
 
     private static final long serialVersionUID = 3791907285083231285L;
 
-    public UnsupportedCriteriaException(final HumanReadableTextKey key) {
+    public UnsupportedCriteriaException(final HumanReadableText key) {
         super(key);
     }
 

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedOperationException.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedOperationException.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedOperationException.java (original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedOperationException.java Fri May 15 13:53:14 2009
@@ -19,7 +19,7 @@
 
 package org.apache.james.imap.mailbox;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 
 /**
  * Indicates that an operation required is not supported
@@ -30,7 +30,7 @@
     private static final long serialVersionUID = 1943118588115772317L;
 
     public UnsupportedOperationException(String message) {
-        super(HumanReadableTextKey.UNSUPPORTED, message);
+        super(HumanReadableText.UNSUPPORTED, message);
     }
 
 }

Modified: james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedSearchException.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedSearchException.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedSearchException.java (original)
+++ james/imap/trunk/mailbox/src/main/java/org/apache/james/imap/mailbox/UnsupportedSearchException.java Fri May 15 13:53:14 2009
@@ -19,7 +19,7 @@
 
 package org.apache.james.imap.mailbox;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 
 
 /**
@@ -30,6 +30,6 @@
     private static final long serialVersionUID = -7442949630563672557L;
 
     public UnsupportedSearchException() {
-        super(HumanReadableTextKey.UNSUPPORTED_SEARCH);
+        super(HumanReadableText.UNSUPPORTED_SEARCH);
     }
 }

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/StatusResponseEncoder.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/StatusResponseEncoder.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/StatusResponseEncoder.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/StatusResponseEncoder.java Fri May 15 13:53:14 2009
@@ -24,7 +24,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.response.StatusResponse;
 import org.apache.james.imap.api.message.response.StatusResponse.ResponseCode;
 import org.apache.james.imap.api.message.response.StatusResponse.Type;
@@ -46,7 +46,7 @@
         final String code = asString(responseCode);
         final String tag = response.getTag();
         final ImapCommand command = response.getCommand();
-        final HumanReadableTextKey textKey = response.getTextKey();
+        final HumanReadableText textKey = response.getTextKey();
         final String text = asString(textKey);
         final Collection parameters;
         final long number;
@@ -61,7 +61,7 @@
                 text);
     }
 
-    private String asString(HumanReadableTextKey text) {
+    private String asString(HumanReadableText text) {
         final String result;
         if (text == null) {
             result = null;

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/message/request/BaseImap4Rev1MessageFactory.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/message/request/BaseImap4Rev1MessageFactory.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/message/request/BaseImap4Rev1MessageFactory.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/message/request/BaseImap4Rev1MessageFactory.java Fri May 15 13:53:14 2009
@@ -25,7 +25,7 @@
 import org.apache.james.imap.api.ImapMessageFactory;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.FetchData;
 import org.apache.james.imap.api.message.IdRange;
 import org.apache.james.imap.api.message.StatusDataItems;
@@ -160,11 +160,11 @@
     }
 
     public StatusResponse taggedBad(String tag, ImapCommand command,
-            HumanReadableTextKey displayTextKey) {
+            HumanReadableText displayTextKey) {
         return statusResponseFactory.taggedBad(tag, command, displayTextKey);
     }
 
-    public StatusResponse bye(HumanReadableTextKey displayTextKey) {
+    public StatusResponse bye(HumanReadableText displayTextKey) {
         return statusResponseFactory.bye(displayTextKey);
     }
 

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/AbstactStatusResponseFactory.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/AbstactStatusResponseFactory.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/AbstactStatusResponseFactory.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/AbstactStatusResponseFactory.java Fri May 15 13:53:14 2009
@@ -20,7 +20,7 @@
 package org.apache.james.imap.message.response;
 
 import org.apache.james.imap.api.ImapCommand;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.response.StatusResponse;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.message.response.StatusResponse.ResponseCode;
@@ -34,85 +34,85 @@
 
     protected abstract StatusResponse createResponse(StatusResponse.Type type,
             String tag, ImapCommand command,
-            HumanReadableTextKey displayTextKey, ResponseCode code);
+            HumanReadableText displayTextKey, ResponseCode code);
 
-    public StatusResponse bye(HumanReadableTextKey displayTextKey,
+    public StatusResponse bye(HumanReadableText displayTextKey,
             ResponseCode code) {
         return createResponse(StatusResponse.Type.BYE, null, null,
                 displayTextKey, code);
     }
 
-    public StatusResponse bye(HumanReadableTextKey displayTextKey) {
+    public StatusResponse bye(HumanReadableText displayTextKey) {
         return bye(displayTextKey, null);
     }
 
-    public StatusResponse preauth(HumanReadableTextKey displayTextKey,
+    public StatusResponse preauth(HumanReadableText displayTextKey,
             ResponseCode code) {
         return createResponse(StatusResponse.Type.PREAUTH, null, null,
                 displayTextKey, code);
     }
 
-    public StatusResponse preauth(HumanReadableTextKey displayTextKey) {
+    public StatusResponse preauth(HumanReadableText displayTextKey) {
         return preauth(displayTextKey, null);
     }
 
     public StatusResponse taggedBad(String tag, ImapCommand command,
-            HumanReadableTextKey displayTextKey, ResponseCode code) {
+            HumanReadableText displayTextKey, ResponseCode code) {
         return createResponse(StatusResponse.Type.BAD, tag, command,
                 displayTextKey, code);
     }
 
     public StatusResponse taggedBad(String tag, ImapCommand command,
-            HumanReadableTextKey displayTextKey) {
+            HumanReadableText displayTextKey) {
         return taggedBad(tag, command, displayTextKey, null);
     }
 
     public StatusResponse taggedNo(String tag, ImapCommand command,
-            HumanReadableTextKey displayTextKey, ResponseCode code) {
+            HumanReadableText displayTextKey, ResponseCode code) {
         return createResponse(StatusResponse.Type.NO, tag, command,
                 displayTextKey, code);
     }
 
     public StatusResponse taggedNo(String tag, ImapCommand command,
-            HumanReadableTextKey displayTextKey) {
+            HumanReadableText displayTextKey) {
         return taggedNo(tag, command, displayTextKey, null);
     }
 
     public StatusResponse taggedOk(String tag, ImapCommand command,
-            HumanReadableTextKey displayTextKey, ResponseCode code) {
+            HumanReadableText displayTextKey, ResponseCode code) {
         return createResponse(StatusResponse.Type.OK, tag, command,
                 displayTextKey, code);
     }
 
     public StatusResponse taggedOk(String tag, ImapCommand command,
-            HumanReadableTextKey displayTextKey) {
+            HumanReadableText displayTextKey) {
         return taggedOk(tag, command, displayTextKey, null);
     }
 
-    public StatusResponse untaggedBad(HumanReadableTextKey displayTextKey,
+    public StatusResponse untaggedBad(HumanReadableText displayTextKey,
             ResponseCode code) {
         return taggedBad(null, null, displayTextKey, code);
     }
 
-    public StatusResponse untaggedBad(HumanReadableTextKey displayTextKey) {
+    public StatusResponse untaggedBad(HumanReadableText displayTextKey) {
         return untaggedBad(displayTextKey, null);
     }
 
-    public StatusResponse untaggedNo(HumanReadableTextKey displayTextKey,
+    public StatusResponse untaggedNo(HumanReadableText displayTextKey,
             ResponseCode code) {
         return taggedNo(null, null, displayTextKey, code);
     }
 
-    public StatusResponse untaggedNo(HumanReadableTextKey displayTextKey) {
+    public StatusResponse untaggedNo(HumanReadableText displayTextKey) {
         return untaggedNo(displayTextKey, null);
     }
 
-    public StatusResponse untaggedOk(HumanReadableTextKey displayTextKey,
+    public StatusResponse untaggedOk(HumanReadableText displayTextKey,
             ResponseCode code) {
         return taggedOk(null, null, displayTextKey, code);
     }
 
-    public StatusResponse untaggedOk(HumanReadableTextKey displayTextKey) {
+    public StatusResponse untaggedOk(HumanReadableText displayTextKey) {
         return untaggedOk(displayTextKey, null);
     }
 }
\ No newline at end of file

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/ImmutableStatusResponse.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/ImmutableStatusResponse.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/ImmutableStatusResponse.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/ImmutableStatusResponse.java Fri May 15 13:53:14 2009
@@ -20,7 +20,7 @@
 package org.apache.james.imap.message.response;
 
 import org.apache.james.imap.api.ImapCommand;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.response.StatusResponse;
 
 /**
@@ -36,13 +36,13 @@
 
     private final String tag;
 
-    private final HumanReadableTextKey textKey;
+    private final HumanReadableText textKey;
 
     private final ImapCommand command;
 
     public ImmutableStatusResponse(final Type serverResponseType,
             final String tag, final ImapCommand command,
-            final HumanReadableTextKey textKey, final ResponseCode responseCode) {
+            final HumanReadableText textKey, final ResponseCode responseCode) {
         super();
         this.responseCode = responseCode;
         this.serverResponseType = serverResponseType;
@@ -75,7 +75,7 @@
     /**
      * @see {@link StatusResponse#getTextKey()}
      */
-    public HumanReadableTextKey getTextKey() {
+    public HumanReadableText getTextKey() {
         return textKey;
     }
 

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/UnpooledStatusResponseFactory.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/UnpooledStatusResponseFactory.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/UnpooledStatusResponseFactory.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/message/response/UnpooledStatusResponseFactory.java Fri May 15 13:53:14 2009
@@ -20,7 +20,7 @@
 package org.apache.james.imap.message.response;
 
 import org.apache.james.imap.api.ImapCommand;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.response.StatusResponse;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.message.response.StatusResponse.ResponseCode;
@@ -30,7 +30,7 @@
         implements StatusResponseFactory {
 
     protected StatusResponse createResponse(Type type, String tag,
-            ImapCommand command, HumanReadableTextKey displayTextKey,
+            ImapCommand command, HumanReadableText displayTextKey,
             ResponseCode code) {
         return new ImmutableStatusResponse(type, tag, command, displayTextKey,
                 code);

Modified: james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/StatusResponseEncoderTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/StatusResponseEncoderTest.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/StatusResponseEncoderTest.java (original)
+++ james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/StatusResponseEncoderTest.java Fri May 15 13:53:14 2009
@@ -21,7 +21,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapConstants;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.response.StatusResponse;
 import org.apache.james.imap.encode.ImapEncoder;
 import org.apache.james.imap.encode.ImapResponseComposer;
@@ -36,7 +36,7 @@
 
     private static final String TAG = "TAG";
 
-    private static final HumanReadableTextKey KEY = new HumanReadableTextKey(
+    private static final HumanReadableText KEY = new HumanReadableText(
             "KEY", "TEXT");
 
     MockImapResponseWriter writer;
@@ -282,7 +282,7 @@
     }
 
     private void execute(StatusResponse.Type type,
-            StatusResponse.ResponseCode code, HumanReadableTextKey key,
+            StatusResponse.ResponseCode code, HumanReadableText key,
             String tag) throws Exception {
         configure(type, code, key, tag);
         compose();
@@ -293,7 +293,7 @@
     }
 
     private void configure(final StatusResponse.Type type,
-            final StatusResponse.ResponseCode code, final HumanReadableTextKey key,
+            final StatusResponse.ResponseCode code, final HumanReadableText key,
             final String tag) {
         checking(new Expectations() {{
             oneOf(mockStatusResponse).getServerResponseType();will(returnValue(type));

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java Fri May 15 13:53:14 2009
@@ -29,7 +29,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.ImapResponseMessage;
 import org.apache.james.imap.api.message.response.StatusResponse;
@@ -88,26 +88,26 @@
         final ImapResponseMessage response;
         if (e instanceof MailboxExistsException) {
             response = factory.taggedNo(tag, command,
-                    HumanReadableTextKey.FAILURE_MAILBOX_EXISTS);
+                    HumanReadableText.FAILURE_MAILBOX_EXISTS);
         } else if (e instanceof MailboxNotFoundException) {
             response = factory.taggedNo(tag, command,
-                    HumanReadableTextKey.FAILURE_NO_SUCH_MAILBOX);
+                    HumanReadableText.FAILURE_NO_SUCH_MAILBOX);
         } else {
             if (logger != null) {
                 logger.info(e.getMessage());
                 logger.debug("Processing failed:", e);
             }
-            final HumanReadableTextKey key;
+            final HumanReadableText key;
             if (e instanceof MailboxException) {
                 final MailboxException mailboxException = (MailboxException) e;
-                final HumanReadableTextKey exceptionKey = mailboxException.getKey();
+                final HumanReadableText exceptionKey = mailboxException.getKey();
                 if (exceptionKey == null) {
-                    key = HumanReadableTextKey.GENERIC_FAILURE_DURING_PROCESSING;
+                    key = HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING;
                 } else {
                     key = exceptionKey;
                 }
             } else {
-                key = HumanReadableTextKey.GENERIC_FAILURE_DURING_PROCESSING;
+                key = HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING;
             }
             response = factory.taggedNo(tag, command, key);
         }
@@ -118,7 +118,7 @@
             final String tag, Responder responder, ImapSession session) {
         if (!command.validForState(session.getState())) {
             ImapResponseMessage response = factory.taggedNo(tag, command,
-                    HumanReadableTextKey.INVALID_COMMAND);
+                    HumanReadableText.INVALID_COMMAND);
             responder.respond(response);
 
         } else {
@@ -195,7 +195,7 @@
                 }
             }
         } catch (MessagingException e) {
-            handleResponseException(responder, e, HumanReadableTextKey.FAILURE_TO_LOAD_FLAGS, session);
+            handleResponseException(responder, e, HumanReadableText.FAILURE_TO_LOAD_FLAGS, session);
         }
     }
 
@@ -249,12 +249,12 @@
             final ExistsResponse response = new ExistsResponse(messageCount);
             responder.respond(response);
         } catch (MailboxException e) {
-            handleResponseException(responder, e, HumanReadableTextKey.FAILURE_EXISTS_COUNT, session);
+            handleResponseException(responder, e, HumanReadableText.FAILURE_EXISTS_COUNT, session);
         }
     }
 
     private void handleResponseException(final ImapProcessor.Responder responder,
-            MessagingException e, final HumanReadableTextKey message, ImapSession session) {
+            MessagingException e, final HumanReadableText message, ImapSession session) {
         session.getLog().info(message);
         session.getLog().debug(message, e);
         // TODO: consider whether error message should be passed to the user
@@ -265,13 +265,13 @@
     protected void okComplete(final ImapCommand command, final String tag,
             final ImapProcessor.Responder responder) {
         final StatusResponse response = factory.taggedOk(tag, command,
-                HumanReadableTextKey.COMPLETED);
+                HumanReadableText.COMPLETED);
         responder.respond(response);
     }
 
     protected void no(final ImapCommand command, final String tag,
             final ImapProcessor.Responder responder,
-            final HumanReadableTextKey displayTextKey) {
+            final HumanReadableText displayTextKey) {
         final StatusResponse response = factory.taggedNo(tag, command,
                 displayTextKey);
         responder.respond(response);
@@ -279,7 +279,7 @@
 
     protected void no(final ImapCommand command, final String tag,
             final ImapProcessor.Responder responder,
-            final HumanReadableTextKey displayTextKey,
+            final HumanReadableText displayTextKey,
             final StatusResponse.ResponseCode responseCode) {
         final StatusResponse response = factory.taggedNo(tag, command,
                 displayTextKey, responseCode);
@@ -287,12 +287,12 @@
     }
 
     protected void bye(final ImapProcessor.Responder responder) {
-        final StatusResponse response = factory.bye(HumanReadableTextKey.BYE);
+        final StatusResponse response = factory.bye(HumanReadableText.BYE);
         responder.respond(response);
     }
 
     protected void bye(final ImapProcessor.Responder responder,
-            final HumanReadableTextKey key) {
+            final HumanReadableText key) {
         final StatusResponse response = factory.bye(key);
         responder.respond(response);
     }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java Fri May 15 13:53:14 2009
@@ -26,7 +26,7 @@
 import javax.mail.Flags;
 
 import org.apache.james.imap.api.ImapCommand;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.StatusResponse;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
@@ -85,7 +85,7 @@
             respond(tag, command, session, metaData, responder);
         } catch (MailboxNotFoundException e) {
             responder.respond(statusResponseFactory.taggedNo(tag, command,
-                    HumanReadableTextKey.FAILURE_NO_SUCH_MAILBOX));
+                    HumanReadableText.FAILURE_NO_SUCH_MAILBOX));
         } catch (MailboxException e) {
             no(command, tag, responder, e, session);
         }
@@ -110,7 +110,7 @@
     throws MailboxException {
         final long uid = metaData.getUidNext();
         final StatusResponse untaggedOk = statusResponseFactory.untaggedOk(
-                HumanReadableTextKey.UNSEEN, ResponseCode.uidNext(uid));
+                HumanReadableText.UNSEEN, ResponseCode.uidNext(uid));
         responder.respond(untaggedOk);
     }
     
@@ -124,7 +124,7 @@
             code = ResponseCode.readOnly();
         }
         final StatusResponse taggedOk = statusResponseFactory.taggedOk(tag,
-                command, HumanReadableTextKey.SELECT, code);
+                command, HumanReadableText.SELECT, code);
         responder.respond(taggedOk);
     }
 
@@ -135,7 +135,7 @@
     private void permanentFlags(Responder responder, Mailbox.MetaData metaData) {
         final Flags permanentFlags = metaData.getPermanentFlags();
         final StatusResponse untaggedOk = statusResponseFactory.untaggedOk(
-                HumanReadableTextKey.PERMANENT_FLAGS, ResponseCode
+                HumanReadableText.PERMANENT_FLAGS, ResponseCode
                         .permanentFlags(permanentFlags));
         responder.respond(untaggedOk);
     }
@@ -147,7 +147,7 @@
             final long unseenUid = firstUnseen;
             int msn = selected.msn(unseenUid);
             final StatusResponse untaggedOk = statusResponseFactory.untaggedOk(
-                    HumanReadableTextKey.UNSEEN, ResponseCode.unseen(msn));
+                    HumanReadableText.UNSEEN, ResponseCode.unseen(msn));
             responder.respond(untaggedOk);
         }
 
@@ -156,7 +156,7 @@
     private void uidValidity(Responder responder, Mailbox.MetaData metaData) throws MailboxException {
         final long uidValidity = metaData.getUidValidity();
         final StatusResponse untaggedOk = statusResponseFactory.untaggedOk(
-                HumanReadableTextKey.UID_VALIDITY, ResponseCode
+                HumanReadableText.UID_VALIDITY, ResponseCode
                         .uidValidity(uidValidity));
         responder.respond(untaggedOk);
     }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java Fri May 15 13:53:14 2009
@@ -26,7 +26,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.StatusResponse;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
@@ -101,7 +101,7 @@
             logger.debug("Cannot open mailbox: ", e);
         }
         no(command, tag, responder,
-                HumanReadableTextKey.FAILURE_NO_SUCH_MAILBOX,
+                HumanReadableText.FAILURE_NO_SUCH_MAILBOX,
                 StatusResponse.ResponseCode.tryCreate());
     }
 

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java Fri May 15 13:53:14 2009
@@ -21,7 +21,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.process.ImapProcessor;
@@ -47,7 +47,7 @@
         session.getLog()
                 .info("Unsupported authentication mechanism '" + authType + "'");
         no(command, tag, responder,
-                HumanReadableTextKey.UNSUPPORTED_AUTHENTICATION_MECHANISM);
+                HumanReadableText.UNSUPPORTED_AUTHENTICATION_MECHANISM);
     }
 
 }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CopyProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CopyProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CopyProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CopyProcessor.java Fri May 15 13:53:14 2009
@@ -21,7 +21,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.IdRange;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
@@ -65,7 +65,7 @@
                     .mailboxExists(fullMailboxName, mailboxSession);
             if (!mailboxExists) {
                 no(command, tag, responder,
-                        HumanReadableTextKey.FAILURE_NO_SUCH_MAILBOX,
+                        HumanReadableText.FAILURE_NO_SUCH_MAILBOX,
                         ResponseCode.tryCreate());
             } else {
                 for (int i = 0; i < idSet.length; i++) {

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java Fri May 15 13:53:14 2009
@@ -23,7 +23,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.process.ImapProcessor;
@@ -54,7 +54,7 @@
             final Mailbox mailbox = getSelectedMailbox(session);
             if (!mailbox.isWriteable()) {
                 no(command, tag, responder,
-                        HumanReadableTextKey.MAILBOX_IS_READ_ONLY);
+                        HumanReadableText.MAILBOX_IS_READ_ONLY);
             } else {
                 final Iterator<Long> it = mailbox.expunge(MessageRangeImpl.all(),
                         ImapSessionUtils

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LSubProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LSubProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LSubProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LSubProcessor.java Fri May 15 13:53:14 2009
@@ -25,7 +25,7 @@
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapConstants;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.process.ImapProcessor;
@@ -71,17 +71,17 @@
 
         } catch (SubscriptionException e) {
             session.getLog().debug("Subscription failed", e);
-            final HumanReadableTextKey exceptionKey = e.getKey();
-            final HumanReadableTextKey displayTextKey;
+            final HumanReadableText exceptionKey = e.getKey();
+            final HumanReadableText displayTextKey;
             if (exceptionKey == null) {
-                displayTextKey = HumanReadableTextKey.GENERIC_LSUB_FAILURE;
+                displayTextKey = HumanReadableText.GENERIC_LSUB_FAILURE;
             } else {
                 displayTextKey = exceptionKey;
             }
             no(command, tag, responder, displayTextKey);
         } catch (MailboxException e) {
             session.getLog().debug("Subscription failed", e);
-            final HumanReadableTextKey displayTextKey = HumanReadableTextKey.GENERIC_LSUB_FAILURE;
+            final HumanReadableText displayTextKey = HumanReadableText.GENERIC_LSUB_FAILURE;
             no(command, tag, responder, displayTextKey);
         }
     }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LoginProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LoginProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LoginProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LoginProcessor.java Fri May 15 13:53:14 2009
@@ -21,7 +21,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.process.ImapProcessor;
@@ -95,10 +95,10 @@
                     session.setAttribute(ATTRIBUTE_NUMBER_OF_FAILURES,
                             new Integer(failures));
                     no(command, tag, responder,
-                            HumanReadableTextKey.INVALID_LOGIN);
+                            HumanReadableText.INVALID_LOGIN);
                 } else {
                     session.getLog().info("Too many authentication failures. Closing connection.");
-                    bye(responder, HumanReadableTextKey.TOO_MANY_FAILURES);
+                    bye(responder, HumanReadableText.TOO_MANY_FAILURES);
                     session.logout();
                 }
             }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/RenameProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/RenameProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/RenameProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/RenameProcessor.java Fri May 15 13:53:14 2009
@@ -21,7 +21,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.process.ImapProcessor;
@@ -62,10 +62,10 @@
 
         } catch (MailboxExistsException e) {
             no(command, tag, responder,
-                    HumanReadableTextKey.FAILURE_MAILBOX_EXISTS);
+                    HumanReadableText.FAILURE_MAILBOX_EXISTS);
         } catch (MailboxNotFoundException e) {
             no(command, tag, responder,
-                    HumanReadableTextKey.FAILURE_NO_SUCH_MAILBOX);
+                    HumanReadableText.FAILURE_NO_SUCH_MAILBOX);
         } catch (MailboxException e) {
             no(command, tag, responder, e, session);
         }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SubscribeProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SubscribeProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SubscribeProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SubscribeProcessor.java Fri May 15 13:53:14 2009
@@ -21,7 +21,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.process.ImapProcessor;
@@ -62,10 +62,10 @@
             session.getLog().debug("Subscription failed", e);
             unsolicitedResponses(session, responder, false);
 
-            final HumanReadableTextKey exceptionKey = e.getKey();
-            final HumanReadableTextKey displayTextKey;
+            final HumanReadableText exceptionKey = e.getKey();
+            final HumanReadableText displayTextKey;
             if (exceptionKey == null) {
-                displayTextKey = HumanReadableTextKey.GENERIC_SUBSCRIPTION_FAILURE;
+                displayTextKey = HumanReadableText.GENERIC_SUBSCRIPTION_FAILURE;
             } else {
                 displayTextKey = exceptionKey;
             }
@@ -74,7 +74,7 @@
             session.getLog().debug("Subscription failed", e);
             unsolicitedResponses(session, responder, false);
 
-            final HumanReadableTextKey displayTextKey = HumanReadableTextKey.GENERIC_SUBSCRIPTION_FAILURE;
+            final HumanReadableText displayTextKey = HumanReadableText.GENERIC_SUBSCRIPTION_FAILURE;
             no(command, tag, responder, displayTextKey);
         }
     }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/UnsubscribeProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/UnsubscribeProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/UnsubscribeProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/UnsubscribeProcessor.java Fri May 15 13:53:14 2009
@@ -21,7 +21,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.process.ImapProcessor;
@@ -62,10 +62,10 @@
             session.getLog().debug("Subscription failed", e);
             unsolicitedResponses(session, responder, false);
 
-            final HumanReadableTextKey exceptionKey = e.getKey();
-            final HumanReadableTextKey displayTextKey;
+            final HumanReadableText exceptionKey = e.getKey();
+            final HumanReadableText displayTextKey;
             if (exceptionKey == null) {
-                displayTextKey = HumanReadableTextKey.GENERIC_UNSUBSCRIPTION_FAILURE;
+                displayTextKey = HumanReadableText.GENERIC_UNSUBSCRIPTION_FAILURE;
             } else {
                 displayTextKey = exceptionKey;
             }
@@ -74,7 +74,7 @@
             session.getLog().debug("Subscription failed", e);
             unsolicitedResponses(session, responder, false);
 
-            final HumanReadableTextKey displayTextKey = HumanReadableTextKey.GENERIC_SUBSCRIPTION_FAILURE;
+            final HumanReadableText displayTextKey = HumanReadableText.GENERIC_SUBSCRIPTION_FAILURE;
             no(command, tag, responder, displayTextKey);
         }
     }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java Fri May 15 13:53:14 2009
@@ -22,7 +22,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.request.ImapRequest;
 import org.apache.james.imap.api.message.response.ImapResponseMessage;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
@@ -49,9 +49,9 @@
             final String tag = request.getTag();
             final ImapCommand command = request.getCommand();
             result = factory.taggedBad(tag, command,
-                    HumanReadableTextKey.UNKNOWN_COMMAND);
+                    HumanReadableText.UNKNOWN_COMMAND);
         } else {
-            result = factory.untaggedBad(HumanReadableTextKey.UNKNOWN_COMMAND);
+            result = factory.untaggedBad(HumanReadableText.UNKNOWN_COMMAND);
         }
         return result;
     }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java Fri May 15 13:53:14 2009
@@ -26,7 +26,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.BodyFetchElement;
 import org.apache.james.imap.api.message.FetchData;
 import org.apache.james.imap.api.message.IdRange;
@@ -100,11 +100,11 @@
             okComplete(command, tag, responder);
         } catch (UnsupportedCriteriaException e) {
             no(command, tag, responder,
-                    HumanReadableTextKey.UNSUPPORTED_SEARCH_CRITERIA);
+                    HumanReadableText.UNSUPPORTED_SEARCH_CRITERIA);
         } catch (MessagingException e) {
             no(command, tag, responder, e, session);
         } catch (ParseException e) {
-            no(command, tag, responder, HumanReadableTextKey.FAILURE_MAIL_PARSE);
+            no(command, tag, responder, HumanReadableText.FAILURE_MAIL_PARSE);
         }
     }
 

Modified: james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/LSubProcessorTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/LSubProcessorTest.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/LSubProcessorTest.java (original)
+++ james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/LSubProcessorTest.java Fri May 15 13:53:14 2009
@@ -24,7 +24,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapConstants;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.response.StatusResponse;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.process.ImapProcessor;
@@ -229,7 +229,7 @@
             oneOf(serverResponseFactory).taggedOk(
                     with(equal(TAG)),
                     with(same(command)),
-                    with(equal(HumanReadableTextKey.COMPLETED)));will(returnValue(statusResponse));
+                    with(equal(HumanReadableText.COMPLETED)));will(returnValue(statusResponse));
             oneOf(responder).respond(with(same(statusResponse)));          
         }});
     }

Modified: james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java (original)
+++ james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java Fri May 15 13:53:14 2009
@@ -25,7 +25,7 @@
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.ImapSessionState;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.response.StatusResponse;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.message.response.StatusResponse.ResponseCode;
@@ -88,7 +88,7 @@
             allowing(imapSessionStub).getState();will(returnValue(ImapSessionState.AUTHENTICATED));
             allowing(statusResponseStub).taggedOk(
                     with(any(String.class)), with(any(ImapCommand.class)), 
-                    with(any(HumanReadableTextKey.class)), with(any(ResponseCode.class))); will(returnValue(mock(StatusResponse.class)));
+                    with(any(HumanReadableText.class)), with(any(ResponseCode.class))); will(returnValue(mock(StatusResponse.class)));
             ignoring(imapSessionStub);
             ignoring(mailboxSessionStub);
             ignoring(mailboxManagerStub);

Modified: james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/SearchProcessorTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/SearchProcessorTest.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/SearchProcessorTest.java (original)
+++ james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/SearchProcessorTest.java Fri May 15 13:53:14 2009
@@ -27,7 +27,7 @@
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapConstants;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.IdRange;
 import org.apache.james.imap.api.message.request.DayMonthYear;
 import org.apache.james.imap.api.message.request.SearchKey;
@@ -433,7 +433,7 @@
             oneOf(serverResponseFactory).taggedOk(
                     with(equal(TAG)),
                     with(same(command)), 
-                    with(equal(HumanReadableTextKey.COMPLETED)));will(returnValue(statusResponse));    
+                    with(equal(HumanReadableText.COMPLETED)));will(returnValue(statusResponse));    
             oneOf(responder).respond(with(same(statusResponse)));
         }});
     }

Modified: james/imap/trunk/store/src/main/java/org/apache/james/imap/store/MessageSearches.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/store/src/main/java/org/apache/james/imap/store/MessageSearches.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/store/src/main/java/org/apache/james/imap/store/MessageSearches.java (original)
+++ james/imap/trunk/store/src/main/java/org/apache/james/imap/store/MessageSearches.java Fri May 15 13:53:14 2009
@@ -34,7 +34,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.mailbox.MailboxException;
 import org.apache.james.imap.mailbox.SearchQuery;
 import org.apache.james.imap.mailbox.UnsupportedSearchException;
@@ -146,9 +146,9 @@
                     throw new UnsupportedSearchException();
             }
         } catch (IOException e) {
-            throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+            throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
         } catch (MimeException e) {
-            throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+            throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
         }
     }
 

Modified: james/imap/trunk/store/src/main/java/org/apache/james/imap/store/ResultUtils.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/store/src/main/java/org/apache/james/imap/store/ResultUtils.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/store/src/main/java/org/apache/james/imap/store/ResultUtils.java (original)
+++ james/imap/trunk/store/src/main/java/org/apache/james/imap/store/ResultUtils.java Fri May 15 13:53:14 2009
@@ -31,7 +31,7 @@
 
 import javax.swing.text.Document;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.mailbox.Content;
 import org.apache.james.imap.mailbox.MailboxException;
 import org.apache.james.imap.mailbox.MessageResult;
@@ -119,9 +119,9 @@
             
                 addPartContent(fetchGroup, message, messageResult);
             } catch (IOException e) {
-                throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
             } catch (MimeException e) {
-                throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
             }
         }
         return messageResult;

Modified: james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailbox.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailbox.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailbox.java (original)
+++ james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailbox.java Fri May 15 13:53:14 2009
@@ -37,7 +37,7 @@
 import javax.mail.Flags;
 import javax.mail.MessagingException;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.mailbox.MailboxException;
 import org.apache.james.imap.mailbox.MailboxListener;
 import org.apache.james.imap.mailbox.MailboxNotFoundException;
@@ -208,11 +208,11 @@
                 tracker.found(uid, message.createFlags());
                 return uid;
             } catch (IOException e) {
-                throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
             } catch (MessagingException e) {
-                throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
             } catch (MimeException e) {
-                throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
             }
         }
     }
@@ -328,7 +328,7 @@
             }
             return result;
         } catch (MessagingException e) {
-            throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+            throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
         }
     }
 
@@ -463,7 +463,7 @@
             }
 
         } catch (MessagingException e) {
-            throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+            throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
         }
     }
     

Modified: james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailboxManager.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailboxManager.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailboxManager.java (original)
+++ james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailboxManager.java Fri May 15 13:53:14 2009
@@ -29,7 +29,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.AbstractLogEnabled;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.mailbox.BadCredentialsException;
 import org.apache.james.imap.mailbox.MailboxException;
 import org.apache.james.imap.mailbox.MailboxExistsException;
@@ -285,7 +285,7 @@
                 if (count == 1) {
                     return true;
                 } else {
-                    throw new MailboxException(HumanReadableTextKey.DUPLICATE_MAILBOXES, 
+                    throw new MailboxException(HumanReadableText.DUPLICATE_MAILBOXES, 
                             "Expected one mailbox but found " + count + " mailboxes");
                 }
             }

Modified: james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailbox.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailbox.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailbox.java (original)
+++ james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailbox.java Fri May 15 13:53:14 2009
@@ -41,7 +41,7 @@
 import javax.mail.MessagingException;
 import javax.mail.internet.MimeMessage;
 
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.mailbox.Mailbox;
 import org.apache.james.imap.mailbox.MailboxException;
 import org.apache.james.imap.mailbox.MailboxListener;
@@ -107,13 +107,13 @@
                 try {
                     return getMailboxRow().countMessages();
                 } catch (Exception e) {
-                    throw new MailboxException(HumanReadableTextKey.COUNT_FAILED, e);
+                    throw new MailboxException(HumanReadableText.COUNT_FAILED, e);
                 }
             } finally {
                 lock.readLock().release();
             }
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
     }
 
@@ -167,14 +167,14 @@
                     getUidChangeTracker().found(messageResult.getUid(), messageResult.getFlags());
                     return messageResult.getUid();
                 } catch (Exception e) {
-                    throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                    throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
                 }
             } else {
                 // mailboxRow==null
-                throw new MailboxException(HumanReadableTextKey.MAILBOX_DELETED);
+                throw new MailboxException(HumanReadableText.MAILBOX_DELETED);
             }
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
     }
 
@@ -248,9 +248,9 @@
             lock.writeLock().acquire();
             myMailboxRow = getMailboxRow().consumeNextUid();
         } catch (TorqueException e) {
-            throw new MailboxException(HumanReadableTextKey.COMSUME_UID_FAILED, e);
+            throw new MailboxException(HumanReadableText.COMSUME_UID_FAILED, e);
         } catch (SQLException e) {
-            throw new MailboxException(HumanReadableTextKey.COMSUME_UID_FAILED, e);
+            throw new MailboxException(HumanReadableText.COMSUME_UID_FAILED, e);
         } finally {
             lock.writeLock().release();
         }
@@ -298,15 +298,15 @@
                             .getMailboxId());
                     return getMessages(fetchGroup, range, c);
                 } catch (TorqueException e) {
-                    throw new MailboxException(HumanReadableTextKey.SEARCH_FAILED, e);
+                    throw new MailboxException(HumanReadableText.SEARCH_FAILED, e);
                 } catch (MessagingException e) {
-                    throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                    throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
                 }
             } finally {
                 lock.readLock().release();
             }
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
     }
 
@@ -380,12 +380,12 @@
                 }
                 return results;
             } catch (TorqueException e) {
-                throw new MailboxException(HumanReadableTextKey.SEARCH_FAILED, e);
+                throw new MailboxException(HumanReadableText.SEARCH_FAILED, e);
             } finally {
                 lock.readLock().release();
             }
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
 
     }
@@ -432,17 +432,17 @@
                         return null;
                     }
                 } catch (TorqueException e) {
-                    throw new MailboxException(HumanReadableTextKey.SEARCH_FAILED, e);
+                    throw new MailboxException(HumanReadableText.SEARCH_FAILED, e);
                 } catch (MessagingException e) {
-                    throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                    throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
                 } catch (MimeException e) {
-                    throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                    throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
                 }
             } finally {
                 lock.readLock().release();
             }
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
     }
 
@@ -457,15 +457,15 @@
                             new Flags(Flags.Flag.SEEN), false);
                     return count;
                 } catch (TorqueException e) {
-                    throw new MailboxException(HumanReadableTextKey.COUNT_FAILED, e);
+                    throw new MailboxException(HumanReadableText.COUNT_FAILED, e);
                 } catch (DataSetException e) {
-                    throw new MailboxException(HumanReadableTextKey.COUNT_FAILED, e);
+                    throw new MailboxException(HumanReadableText.COUNT_FAILED, e);
                 }
             } finally {
                 lock.readLock().release();
             }
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
     }
 
@@ -479,7 +479,7 @@
             }
 
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
     }
 
@@ -510,7 +510,7 @@
             getUidChangeTracker().expunged(uids);
             return uids.iterator();
         } catch (TorqueException e) {
-            throw new MailboxException(HumanReadableTextKey.DELETED_FAILED, e);
+            throw new MailboxException(HumanReadableText.DELETED_FAILED, e);
         }
     }
 
@@ -525,7 +525,7 @@
             }
 
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
     }
 
@@ -560,7 +560,7 @@
             tracker.flagsUpdated(newFlagsByUid, originalFlagsByUid, mailboxSession.getSessionId());
             return newFlagsByUid;
         } catch (TorqueException e) {
-            throw new MailboxException(HumanReadableTextKey.SAVE_FAILED, e);
+            throw new MailboxException(HumanReadableText.SAVE_FAILED, e);
         }
     }
 
@@ -583,7 +583,7 @@
             }
 
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
 
     }
@@ -602,21 +602,21 @@
                         final long lastUid = mailboxRow.getLastUid();
                         return lastUid + 1;
                     } else {
-                        throw new MailboxException(HumanReadableTextKey.MAILBOX_DELETED);
+                        throw new MailboxException(HumanReadableText.MAILBOX_DELETED);
                     }
                 } catch (NoRowsException e) {
-                    throw new MailboxException(HumanReadableTextKey.COMSUME_UID_FAILED, e);
+                    throw new MailboxException(HumanReadableText.COMSUME_UID_FAILED, e);
                 } catch (TooManyRowsException e) {
-                    throw new MailboxException(HumanReadableTextKey.COMSUME_UID_FAILED, e);
+                    throw new MailboxException(HumanReadableText.COMSUME_UID_FAILED, e);
                 } catch (TorqueException e) {
-                    throw new MailboxException(HumanReadableTextKey.COMSUME_UID_FAILED, e);
+                    throw new MailboxException(HumanReadableText.COMSUME_UID_FAILED, e);
                 }
             } finally {
                 lock.readLock().release();
             }
 
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
     }
 
@@ -666,14 +666,14 @@
 
                 return uids.iterator();
             } catch (TorqueException e) {
-                throw new MailboxException(HumanReadableTextKey.SEARCH_FAILED, e);
+                throw new MailboxException(HumanReadableText.SEARCH_FAILED, e);
             } catch (MimeException e) {
-                throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
             } finally {
                 lock.readLock().release();
             }
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
     }
 
@@ -733,15 +733,15 @@
                     List rows = MessageRowPeer.doSelectJoinMessageFlags(c);
                     toMailbox.copy(rows, session);
                 } catch (TorqueException e) {
-                    throw new MailboxException(HumanReadableTextKey.SAVE_FAILED, e);
+                    throw new MailboxException(HumanReadableText.SAVE_FAILED, e);
                 } catch (MessagingException e) {
-                    throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+                    throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
                 }
             } finally {
                 lock.readLock().release();
             }
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         }
     }
 
@@ -793,13 +793,13 @@
                 }
             }
         } catch (TorqueException e) {
-            throw new MailboxException(HumanReadableTextKey.SAVE_FAILED, e);
+            throw new MailboxException(HumanReadableText.SAVE_FAILED, e);
         } catch (InterruptedException e) {
-            throw new MailboxException(HumanReadableTextKey.LOCK_FAILED, e);
+            throw new MailboxException(HumanReadableText.LOCK_FAILED, e);
         } catch (MessagingException e) {
-            throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+            throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
         } catch (MimeException e) {
-            throw new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e);
+            throw new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e);
         }
     }
 

Modified: james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailboxManager.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailboxManager.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailboxManager.java (original)
+++ james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueMailboxManager.java Fri May 15 13:53:14 2009
@@ -31,7 +31,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.logging.impl.SimpleLog;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.mailbox.BadCredentialsException;
 import org.apache.james.imap.mailbox.Mailbox;
 import org.apache.james.imap.mailbox.MailboxException;
@@ -114,7 +114,7 @@
                 }
             }
         } catch (TorqueException e) {
-            throw new MailboxException(HumanReadableTextKey.SEARCH_FAILED, e);
+            throw new MailboxException(HumanReadableText.SEARCH_FAILED, e);
         }
     }
 
@@ -164,7 +164,7 @@
         try {
             mr.save();
         } catch (TorqueException e) {
-            throw new MailboxException(HumanReadableTextKey.SAVE_FAILED, e);
+            throw new MailboxException(HumanReadableText.SAVE_FAILED, e);
         }
     }
 
@@ -185,7 +185,7 @@
                     mailbox.deleted(session);
                 }
             } catch (TorqueException e) {
-                throw new MailboxException(HumanReadableTextKey.DELETED_FAILED, e);
+                throw new MailboxException(HumanReadableText.DELETED_FAILED, e);
             }
         }
     }
@@ -230,7 +230,7 @@
                 }
             }
         } catch (TorqueException e) {
-            throw new MailboxException(HumanReadableTextKey.SAVE_FAILED, e);
+            throw new MailboxException(HumanReadableText.SAVE_FAILED, e);
         }
     }
 
@@ -289,7 +289,7 @@
             Collections.sort(results, new StandardMailboxMetaDataComparator());
             return results;
         } catch (TorqueException e) {
-            throw new MailboxException(HumanReadableTextKey.SEARCH_FAILED, e);
+            throw new MailboxException(HumanReadableText.SEARCH_FAILED, e);
         }
 
     }
@@ -323,13 +323,13 @@
                     if (count == 1) {
                         return true;
                     } else {
-                        throw new MailboxException(HumanReadableTextKey.DUPLICATE_MAILBOXES, 
+                        throw new MailboxException(HumanReadableText.DUPLICATE_MAILBOXES, 
                                 "found " + count + " mailboxes");
                     }
                 }
             }
         } catch (TorqueException e) {
-            throw new MailboxException(HumanReadableTextKey.SEARCH_FAILED, e);
+            throw new MailboxException(HumanReadableText.SEARCH_FAILED, e);
         }
     }
 
@@ -340,7 +340,7 @@
                     Criteria.GREATER_THAN));
             mailboxes.clear();
         } catch (TorqueException e) {
-            throw new MailboxException(HumanReadableTextKey.DELETED_FAILED, e);
+            throw new MailboxException(HumanReadableText.DELETED_FAILED, e);
         }
     }
 

Modified: james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueResultIterator.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueResultIterator.java?rev=775135&r1=775134&r2=775135&view=diff
==============================================================================
--- james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueResultIterator.java (original)
+++ james/imap/trunk/torque/src/main/java/org/apache/james/mailboxmanager/torque/TorqueResultIterator.java Fri May 15 13:53:14 2009
@@ -30,7 +30,7 @@
 import org.apache.commons.collections.Buffer;
 import org.apache.commons.collections.BufferUtils;
 import org.apache.commons.collections.buffer.BoundedFifoBuffer;
-import org.apache.james.imap.api.display.HumanReadableTextKey;
+import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.mailbox.Content;
 import org.apache.james.imap.mailbox.MailboxException;
 import org.apache.james.imap.mailbox.MessageResult;
@@ -89,11 +89,11 @@
                     this.fetchGroup);
         } catch (TorqueException e) {
             result = new UnloadedMessageResult(messageRow,
-                    new MailboxException(HumanReadableTextKey.SEARCH_FAILED, e));
+                    new MailboxException(HumanReadableText.SEARCH_FAILED, e));
         } catch (MailboxException e) {
             result = new UnloadedMessageResult(messageRow, e);
         } catch (MimeException e) {
-            result = new UnloadedMessageResult(messageRow, new MailboxException(HumanReadableTextKey.FAILURE_MAIL_PARSE, e));
+            result = new UnloadedMessageResult(messageRow, new MailboxException(HumanReadableText.FAILURE_MAIL_PARSE, e));
         }
         return result;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org