You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by rm...@apache.org on 2014/08/26 20:17:09 UTC
svn commit: r1620683 [1/17] - in /geronimo/specs/trunk: ./
geronimo-javamail_1.5_spec/ geronimo-javamail_1.5_spec/src/
geronimo-javamail_1.5_spec/src/main/
geronimo-javamail_1.5_spec/src/main/java/
geronimo-javamail_1.5_spec/src/main/java/javax/ geroni...
Author: rmannibucau
Date: Tue Aug 26 18:17:06 2014
New Revision: 1620683
URL: http://svn.apache.org/r1620683
Log:
GERONIMO-6527 geronimo-javamail_1.5_spec from Hendrik Saly + sorting project in parent pom
Added:
geronimo/specs/trunk/geronimo-javamail_1.5_spec/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/LICENSE
geronimo/specs/trunk/geronimo-javamail_1.5_spec/NOTICE
geronimo/specs/trunk/geronimo-javamail_1.5_spec/README.txt
geronimo/specs/trunk/geronimo-javamail_1.5_spec/pom.xml
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Address.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/AuthenticationFailedException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Authenticator.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/BodyPart.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/EncodingAware.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/EventQueue.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/FetchProfile.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Flags.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Folder.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/FolderClosedException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/FolderNotFoundException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Header.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/IllegalWriteException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/MailSessionDefinition.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/MailSessionDefinitions.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Message.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/MessageAware.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/MessageContext.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/MessageRemovedException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/MessagingException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/MethodNotSupportedException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Multipart.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/MultipartDataSource.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/NoSuchProviderException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Part.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/PasswordAuthentication.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Provider.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Quota.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/QuotaAwareStore.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/ReadOnlyFolderException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/SendFailedException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Service.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Session.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Store.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/StoreClosedException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Transport.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/UIDFolder.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/URLName.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/ConnectionAdapter.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/ConnectionEvent.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/ConnectionListener.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/FolderAdapter.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/FolderEvent.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/FolderListener.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/MailEvent.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/MessageChangedEvent.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/MessageChangedListener.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/MessageCountAdapter.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/MessageCountEvent.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/MessageCountListener.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/StoreEvent.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/StoreListener.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/TransportAdapter.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/TransportEvent.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/event/TransportListener.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/AddressException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/AddressParser.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/ContentDisposition.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/ContentType.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/HeaderTokenizer.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/InternetAddress.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/InternetHeaders.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/MailDateFormat.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/MimeBodyPart.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/MimeMessage.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/MimeMultipart.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/MimePart.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/MimePartDataSource.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/MimeUtility.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/NewsAddress.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/ParameterList.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/ParseException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/PreencodedMimeBodyPart.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/SharedInputStream.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/AddressStringTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/AddressTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/AndTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/BodyTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/ComparisonTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/DateTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/FlagTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/FromStringTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/FromTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/HeaderTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/IntegerComparisonTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/MessageIDTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/MessageNumberTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/NotTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/OrTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/ReceivedDateTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/RecipientStringTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/RecipientTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/SearchException.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/SearchTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/SentDateTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/SizeTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/StringTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/search/SubjectTerm.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/util/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/util/ByteArrayDataSource.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/util/SharedByteArrayInputStream.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/util/SharedFileInputStream.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/Activator.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/MailProviderBundleTrackerCustomizer.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/MailProviderRegistry.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/handlers/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/handlers/HtmlHandler.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/handlers/MessageHandler.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/handlers/MultipartHandler.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/handlers/TextHandler.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/handlers/XMLHandler.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/ASCIIUtil.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/Base64.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/Base64DecoderStream.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/Base64Encoder.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/Base64EncoderStream.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/Encoder.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/Hex.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/HexEncoder.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/QuotedPrintable.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/QuotedPrintableDecoderStream.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/QuotedPrintableEncoder.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/QuotedPrintableEncoderStream.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/RFC2231Encoder.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/SessionUtil.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/StringBufferOutputStream.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/UUDecoderStream.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/UUEncode.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/UUEncoder.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/UUEncoderStream.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/XText.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/org/apache/geronimo/mail/util/XTextEncoder.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/META-INF/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/META-INF/default.address.map
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/META-INF/javamail.charset.map
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/META-INF/mailcap
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/OSGI-INF/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/OSGI-INF/providers/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/OSGI-INF/providers/org.apache.mail.handlers.HtmlHandler
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/OSGI-INF/providers/org.apache.mail.handlers.MessageHandler
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/OSGI-INF/providers/org.apache.mail.handlers.MultipartHandler
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/OSGI-INF/providers/org.apache.mail.handlers.TextHandler
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/resources/OSGI-INF/providers/org.apache.mail.handlers.XMLHandler
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/AllTests.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/EventQueueTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/FlagsTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/HeaderTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/MessageContextTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/MessagingExceptionTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/PasswordAuthenticationTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/QuotaTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/SessionTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/SimpleFolder.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/SimpleTextMessage.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/TestData.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/URLNameTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/event/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/event/AllEventTests.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/event/ConnectionEventTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/event/FolderEventTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/event/MessageChangedEventTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/event/MessageCountEventTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/event/StoreEventTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/event/TransportEventTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/AllInternetTests.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/ContentDispositionTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/ContentTypeTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/HeaderTokenizerTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/InternetAddressTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/InternetHeadersTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/MailDateFormatTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/MimeBodyPartTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/MimeMessageTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/MimeMultipartTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/MimeTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/MimeUtilityTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/NewsAddressTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/ParameterListTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/internet/PreencodedMimeBodyPartTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/util/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/util/ByteArrayDataSourceTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/util/SharedByteArrayInputStreamTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/java/javax/mail/util/SharedFileInputStreamTest.java
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/resources/
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/resources/multipart_msg_empty.eml
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/resources/multipart_msg_missing_boundary_param.eml
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/resources/multipart_msg_missing_end_boundary.eml
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/resources/multipart_msg_normal.eml
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/resources/multipart_msg_wrong_boundary_param.eml
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/resources/test.dat
geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/test/resources/wmtom.bin
Modified:
geronimo/specs/trunk/pom.xml
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/LICENSE
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/LICENSE?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/LICENSE (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/LICENSE Tue Aug 26 18:17:06 2014
@@ -0,0 +1,257 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+#########################################################################
+## ADDITIONAL LICENSES ##
+#########################################################################
+
+The XMLSchema.dtd included in this project was developed by the
+W3C Consortium (http://www.w3c.org/).
+Use of the source code, thus licensed, and the resultant binary are
+subject to the terms and conditions of the following license.
+
+W3C¨ SOFTWARE NOTICE AND LICENSE
+Copyright © 1994-2002 World Wide Web Consortium, (Massachusetts Institute of
+Technology, Institut National de Recherche en Informatique et en Automatique,
+Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/
+
+This W3C work (including software, documents, or other related items) is
+being provided by the copyright holders under the following license. By
+obtaining, using and/or copying this work, you (the licensee) agree that you
+have read, understood, and will comply with the following terms and
+conditions:
+
+Permission to use, copy, modify, and distribute this software and its
+documentation, with or without modification, for any purpose and without
+fee or royalty is hereby granted, provided that you include the following on
+ALL copies of the software and documentation or portions thereof, including
+modifications, that you make:
+
+ 1. The full text of this NOTICE in a location viewable to users of the
+ redistributed or derivative work.
+ 2. Any pre-existing intellectual property disclaimers, notices, or terms
+ and conditions. If none exist, a short notice of the following form
+ (hypertext is preferred, text is permitted) should be used within
+ the body of any redistributed or derivative code: "Copyright ©
+ [$date-of-software] World Wide Web Consortium, (Massachusetts Institute
+ of Technology, Institut National de Recherche en Informatique et en
+ Automatique, Keio University). All Rights Reserved.
+ http://www.w3.org/Consortium/Legal/"
+ 3. Notice of any changes or modifications to the W3C files, including the
+ date changes were made. (We recommend you provide URIs to the location
+ from which the code is derived.)
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
+NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
+THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
+COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+The name and trademarks of copyright holders may NOT be used in advertising or
+publicity pertaining to the software without specific, written prior permission.
+Title to copyright in this software and any associated documentation will at all
+times remain with copyright holders.
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/NOTICE
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/NOTICE?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/NOTICE (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/NOTICE Tue Aug 26 18:17:06 2014
@@ -0,0 +1,5 @@
+Apache Geronimo
+Copyright 2003-2014 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/README.txt
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/README.txt?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/README.txt (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/README.txt Tue Aug 26 18:17:06 2014
@@ -0,0 +1,65 @@
+JavaMail Specification 1.5
+==========================
+
+These classes are based on the JavaMailTM API Design Specification Version 1.5 which can be found here:
+o https://javamail.java.net/nonav/docs/JavaMail-1.5.pdf
+o http://download.oracle.com/otn-pub/jcp/java_mail-1_5-mrel2-spec/javamail-1.5.0-javadocs.zip
+
+The classes represent the JavaMail API and contain implementations of the
+classes found in the javax.mail packages. In order to function correctly,
+these classes require:
+
+o The Java Activation Framework (JAF) 1.1 (or newer) in javax.activation unless you are using Java SE 6 or newer
+o J2SE 5.0/JDK 1.5 or newer
+o Implementations of the JavaMail providers to deal with pop/imap/etc.
+ (You may use this with the geronimo-mail implementation or write your own)
+
+This contains no JavaDoc: see
+ https://java.net/projects/javamail/pages/Home
+ http://docs.oracle.com/javaee/7/api/
+
+for more information on how to use JavaMail to send messages.
+
+JAF 1.1.1 is currently the newest version. Note that JAF 1.1
+is included in JDK 1.6 and JAF 1.1.1 is included in JDK 1.6.0_10 and
+later.
+
+Configuration
+-------------
+
+The JavaMail spec defines the following configuration files:
+
+javamail.providers [Defines which classes are used to map to protocols]
+javamail.address.map [Defines which message types (rfc822, news) map to protocols]
+
+They need to be in the CLASSPATH (or in a Jar) in a directory /META-INF/
+e.g. c:\mymail\META-INF\javamail.providers
+
+Providers
+---------
+Provides a protocol, along with its implementation and whether it is a store
+or a transport (subclass of javax.mail.Store or javax.mail.Transport)
+
+protocol=smtp;type=transport;class=org.me.MySMTPTransport;vendor=Me Inc;version=1.0
+protocol=imap;type=store;class=org.me.MyIMAPStore;vendor=Me Inc;version=1.0
+
+Address Map
+-----------
+
+Contains entries in 'name=value' format:
+rfc822=smtp
+news=nntp
+
+Default
+=======
+
+To ensure that other files can be extended at a later stage, the JavaMail
+spec defines three locations for these files:
+
+$JAVA_HOME\lib\javamail.properties
+META-INF\javamail.properties
+META-INF\javamail.default.properties
+
+The files are located in that order and overwrite whatever the previous
+version contained, so if 'smtp' is defined in javamail.properties and
+javamail.default.properties, it will use the one from javamail.default.properties
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/pom.xml?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/pom.xml (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/pom.xml Tue Aug 26 18:17:06 2014
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.geronimo.genesis</groupId>
+ <artifactId>genesis-java5-flava</artifactId>
+ <version>2.1</version>
+ <relativePath />
+ </parent>
+
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-javamail_1.5_spec</artifactId>
+ <packaging>bundle</packaging>
+ <name>Apache Geronimo JavaMail Spec 1.5</name>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <description>Javamail 1.5 API Specification</description>
+
+ <url>http://geronimo.apache.org/maven/${siteId}/${project.version}</url>
+ <distributionManagement>
+ <site>
+ <id>apache-website</id>
+ <url>${site.deploy.url}/maven/${siteId}/${project.version}</url>
+ </site>
+ </distributionManagement>
+
+ <properties>
+ <siteId>specs/${project.artifactId}</siteId>
+ <geronimo.osgi.private.pkg>org.apache.geronimo.mail*</geronimo.osgi.private.pkg>
+ <geronimo.osgi.resources>src/main/resources/,META-INF/LICENSE.txt=LICENSE.txt,META-INF/NOTICE.txt=NOTICE.txt</geronimo.osgi.resources>
+ </properties>
+
+ <scm>
+ <connection>scm:svn:https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-javamail_1.5_spec</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-javamail_1.5_spec</developerConnection>
+ <url>https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-javamail_1.5_spec</url>
+ </scm>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-activation_1.1_spec</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>4.2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <version>4.2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-osgi-locator</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.0.1</version>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${project.groupId}.${project.artifactId};singleton=true</Bundle-SymbolicName>
+ <Specification-Title>JSR-919 Javamail API 1.5</Specification-Title>
+ <Specification-Vendor>Sun Microsystems, Inc.</Specification-Vendor>
+ <Specification-Version>1.5</Specification-Version>
+ <Export-Package>javax.mail*;version=1.5,org.apache.geronimo.mail.util;version=1.5,org.apache.geronimo.mail.handlers;version=1.5</Export-Package>
+ <Import-Package>org.apache.geronimo.osgi.registry.api;resolution:=optional,*</Import-Package>
+ <Private-Package>org.apache.geronimo.osgi.locator,org.apache.geronimo.mail</Private-Package>
+ <Bundle-Activator>org.apache.geronimo.mail.Activator</Bundle-Activator>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>rat</id>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- Override of default rat checks. To use, type "mvn -Prat verify". -->
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.10</version>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <reportFile>${project.build.directory}/${project.build.finalName}.rat</reportFile>
+ <excludeSubProjects>false</excludeSubProjects>
+ <excludes>
+ <exclude>**/target/**/*</exclude>
+ <exclude>**/appended-resources/**/*</exclude>
+ <exclude>**/velocity.log</exclude>
+ <!-- manifest files don't support comments so don't contain the ASL2.0 header -->
+ <exclude>**/*.MF</exclude>
+ <!-- This is a test file that needs to be in exactly the format it is. -->
+ <exclude>**/wmtom.bin</exclude>
+ <!--RAT doesn't seem to recognize MIT style licenses-->
+ <exclude>manual/src/styles/print.css</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Address.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Address.java?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Address.java (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Address.java Tue Aug 26 18:17:06 2014
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.mail;
+
+import java.io.Serializable;
+
+/**
+ * This abstract class models the addresses in a message.
+ * Addresses are Serializable so that they may be serialized along with other search terms.
+ *
+ * @version $Rev$ $Date$
+ */
+public abstract class Address implements Serializable {
+
+ private static final long serialVersionUID = -5822459626751992278L;
+
+ /**
+ * Subclasses must provide a suitable implementation of equals().
+ *
+ * @param object the object to compare t
+ * @return true if the subclass determines the other object is equal to this Address
+ */
+ @Override
+ public abstract boolean equals(Object object);
+
+ /**
+ * Return a String that identifies this address type.
+ * @return the type of this address
+ */
+ public abstract String getType();
+
+ /**
+ * Subclasses must provide a suitable representation of their address.
+ * @return a representation of an Address as a String
+ */
+ @Override
+ public abstract String toString();
+}
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/AuthenticationFailedException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/AuthenticationFailedException.java?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/AuthenticationFailedException.java (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/AuthenticationFailedException.java Tue Aug 26 18:17:06 2014
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.mail;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class AuthenticationFailedException extends MessagingException {
+
+ private static final long serialVersionUID = 492080754054436511L;
+
+
+ public AuthenticationFailedException() {
+ super();
+ }
+
+ public AuthenticationFailedException(final String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs an AuthenticationFailedException with the specified
+ * detail message and embedded exception. The exception is chained
+ * to this exception.
+ *
+ * @param message The detailed error message
+ * @param e The embedded exception
+ * @since JavaMail 1.5
+ */
+ public AuthenticationFailedException(final String message, final Exception e) {
+ super(message, e);
+ }
+}
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Authenticator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Authenticator.java?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Authenticator.java (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Authenticator.java Tue Aug 26 18:17:06 2014
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.mail;
+
+import java.net.InetAddress;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public abstract class Authenticator {
+ private InetAddress host;
+ private int port;
+ private String prompt;
+ private String protocol;
+ private String username;
+
+ synchronized PasswordAuthentication authenticate(final InetAddress host, final int port, final String protocol, final String prompt, final String username) {
+ this.host = host;
+ this.port = port;
+ this.protocol = protocol;
+ this.prompt = prompt;
+ this.username = username;
+ return getPasswordAuthentication();
+ }
+
+ protected final String getDefaultUserName() {
+ return username;
+ }
+
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return null;
+ }
+
+ protected final int getRequestingPort() {
+ return port;
+ }
+
+ protected final String getRequestingPrompt() {
+ return prompt;
+ }
+
+ protected final String getRequestingProtocol() {
+ return protocol;
+ }
+
+ protected final InetAddress getRequestingSite() {
+ return host;
+ }
+}
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/BodyPart.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/BodyPart.java?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/BodyPart.java (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/BodyPart.java Tue Aug 26 18:17:06 2014
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.mail;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public abstract class BodyPart implements Part {
+
+ protected Multipart parent;
+
+ public Multipart getParent() {
+ return parent;
+ }
+
+ // Can't be public. Not strictly required for spec, but mirrors Sun's javamail api impl.
+ void setParent(final Multipart parent)
+ {
+ this.parent = parent;
+ }
+}
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/EncodingAware.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/EncodingAware.java?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/EncodingAware.java (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/EncodingAware.java Tue Aug 26 18:17:06 2014
@@ -0,0 +1,39 @@
+package javax.mail;
+
+/**
+ * A {@link javax.activation.DataSource DataSource} that also implements
+ * EncodingAware may specify the Content-Transfer-Encoding
+ * to use for its data. Valid Content-Transfer-Encoding values specified
+ * by RFC 2045 are "7bit", "8bit", "quoted-printable", "base64", and "binary".
+ *
+ * For example, a {@link javax.activation.FileDataSource FileDataSource}
+ * could be created that forces all files to be base64 encoded:
+ *
+ * public class Base64FileDataSource extends FileDataSource
+ * implements EncodingAware {
+ * public Base64FileDataSource(File file) {
+ * super(file);
+ * }
+ *
+ * // implements EncodingAware.getEncoding()
+ * public String getEncoding() {
+ * return "base64";
+ * }
+ * }
+ *
+
+ *
+ * @since JavaMail 1.5
+ */
+
+public interface EncodingAware {
+
+ /**
+ * Return the MIME Content-Transfer-Encoding to use for this data,
+ * or null to indicate that an appropriate value should be chosen
+ * by the caller.
+ *
+ * @return the Content-Transfer-Encoding value, or null
+ */
+ public String getEncoding();
+}
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/EventQueue.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/EventQueue.java?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/EventQueue.java (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/EventQueue.java Tue Aug 26 18:17:06 2014
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.mail;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.mail.event.MailEvent;
+
+/**
+ * This is an event queue to dispatch javamail events on separate threads
+ * from the main thread. EventQueues are created by javamail Services
+ * (Transport and Store instances), as well as Folders created from Store
+ * instances. Each entity will have its own private EventQueue instance, but
+ * will delay creating it until it has an event to dispatch to a real listener.
+ *
+ * NOTE: It would be nice to use the concurrency support in Java 5 to
+ * manage the queue, but this code needs to run on Java 1.4 still. We also
+ * don't want to have dependencies on other packages with this, so no
+ * outside concurrency packages can be used either.
+ * @version $Rev$ $Date$
+ */
+class EventQueue implements Runnable {
+ /**
+ * The dispatch thread that handles notification events.
+ */
+ protected Thread dispatchThread;
+
+ /**
+ * The dispatching queue for events.
+ */
+ protected List eventQueue = new LinkedList();
+
+ /**
+ * Create a new EventQueue, including starting the new thread.
+ */
+ public EventQueue() {
+ dispatchThread = new Thread(this, "JavaMail-EventQueue");
+ dispatchThread.setDaemon(true); // this is a background server thread.
+ // start the thread up
+ dispatchThread.start();
+ }
+
+ /**
+ * When an object implementing interface <code>Runnable</code> is used
+ * to create a thread, starting the thread causes the object's
+ * <code>run</code> method to be called in that separately executing
+ * thread.
+ * <p>
+ * The general contract of the method <code>run</code> is that it may
+ * take any action whatsoever.
+ *
+ * @see java.lang.Thread#run()
+ */
+ public void run() {
+ try {
+ while (true) {
+ // get the next event
+ final PendingEvent p = dequeueEvent();
+ // an empty event on the queue means time to shut things down.
+ if (p.event == null) {
+ return;
+ }
+
+ // and tap the listeners on the shoulder.
+ dispatchEvent(p.event, p.listeners);
+ }
+ } catch (final InterruptedException e) {
+ // been told to stop, so we stop
+ }
+ }
+
+
+ /**
+ * Stop the EventQueue. This will terminate the dispatcher thread as soon
+ * as it can, so there may be undispatched events in the queue that will
+ * not get dispatched.
+ */
+ public synchronized void stop() {
+ // if the thread has not been stopped yet, interrupt it
+ // and clear the reference.
+ if (dispatchThread != null) {
+ // push a dummy marker on to the event queue
+ // to force the dispatch thread to wake up.
+ queueEvent(null, null);
+ dispatchThread = null;
+ }
+ }
+
+ /**
+ * Add a new event to the queue.
+ *
+ * @param event The event to dispatch.
+ * @param listeners The List of listeners to dispatch this to. This is assumed to be a
+ * static snapshot of the listeners that will not change between the time
+ * the event is queued and the dispatcher thread makes the calls to the
+ * handlers.
+ */
+ public synchronized void queueEvent(final MailEvent event, final List listeners) {
+ // add an element to the list, then notify the processing thread.
+ // Note that we make a copy of the listeners list. This ensures
+ // we're going to dispatch this to the snapshot of the listeners
+ final PendingEvent p = new PendingEvent(event, listeners);
+ eventQueue.add(p);
+ // wake up the dispatch thread
+ notify();
+ }
+
+ /**
+ * Remove the next event from the message queue.
+ *
+ * @return The PendingEvent item from the queue.
+ */
+ protected synchronized PendingEvent dequeueEvent() throws InterruptedException {
+ // a little spin loop to wait for an event
+ while (eventQueue.isEmpty()) {
+ wait();
+ }
+
+ // just remove the first element of this
+ return (PendingEvent)eventQueue.remove(0);
+ }
+
+
+ /**
+ * Dispatch an event to a list of listeners. Any exceptions thrown by
+ * the listeners will be swallowed.
+ *
+ * @param event The event to dispatch.
+ * @param listeners The list of listeners this gets dispatched to.
+ */
+ protected void dispatchEvent(final MailEvent event, final List listeners) {
+ // iterate through the listeners list calling the handlers.
+ for (int i = 0; i < listeners.size(); i++) {
+ try {
+ event.dispatch(listeners.get(i));
+ } catch (final Throwable e) {
+ // just eat these
+ }
+ }
+ }
+
+
+ /**
+ * Small helper class to give a single reference handle for a pending event.
+ */
+ class PendingEvent {
+ // the event we're broadcasting
+ MailEvent event;
+ // the list of listeners we send this to.
+ List listeners;
+
+ PendingEvent(final MailEvent event, final List listeners) {
+ this.event = event;
+ this.listeners = listeners;
+ }
+ }
+}
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/FetchProfile.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/FetchProfile.java?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/FetchProfile.java (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/FetchProfile.java Tue Aug 26 18:17:06 2014
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.mail;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A FetchProfile defines a list of message attributes that a client wishes to prefetch
+ * from the server during a fetch operation.
+ *
+ * Clients can either specify individual headers, or can reference common profiles
+ * as defined by {@link FetchProfile.Item FetchProfile.Item}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class FetchProfile {
+ /**
+ * Inner class that defines sets of headers that are commonly bundled together
+ * in a FetchProfile.
+ */
+ public static class Item {
+ /**
+ * Item for fetching information about the content of the message.
+ *
+ * This includes all the headers about the content including but not limited to:
+ * Content-Type, Content-Disposition, Content-Description, Size and Line-Count
+ */
+ public static final Item CONTENT_INFO = new Item("CONTENT_INFO");
+
+ /**
+ * Item for fetching information about the envelope of the message.
+ *
+ * This includes all the headers comprising the envelope including but not limited to:
+ * From, To, Cc, Bcc, Reply-To, Subject and Date
+ *
+ * For IMAP4, this should also include the ENVELOPE data item.
+ *
+ */
+ public static final Item ENVELOPE = new Item("ENVELOPE");
+
+ /**
+ * Item for fetching information about message flags.
+ * General corresponds to the X-Flags header.
+ */
+ public static final Item FLAGS = new Item("FLAGS");
+
+ /**
+ * SIZE is a fetch profile item that can be included in a
+ * FetchProfile during a fetch request to a Folder.
+ * This item indicates that the sizes of the messages in the specified
+ * range should be prefetched.
+
+ *
+ * @since JavaMail 1.5
+ */
+ public static final Item SIZE = new Item("SIZE");
+
+ protected Item(final String name) {
+ // hmmm, name is passed in but we are not allowed to provide accessors
+ // or to override equals/hashCode so what use is it?
+ }
+ }
+
+ // use Lists as we don't expect contains to be called often and the number of elements should be small
+ private final List items = new ArrayList();
+ private final List headers = new ArrayList();
+
+ /**
+ * Add a predefined profile of headers.
+ *
+ * @param item the profile to add
+ */
+ public void add(final Item item) {
+ items.add(item);
+ }
+
+ /**
+ * Add a specific header.
+ * @param header the header whose value should be prefetched
+ */
+ public void add(final String header) {
+ headers.add(header);
+ }
+
+ /**
+ * Determine if the given profile item is already included.
+ * @param item the profile to check for
+ * @return true if the profile item is already included
+ */
+ public boolean contains(final Item item) {
+ return items.contains(item);
+ }
+
+ /**
+ * Determine if the specified header is already included.
+ * @param header the header to check for
+ * @return true if the header is already included
+ */
+ public boolean contains(final String header) {
+ return headers.contains(header);
+ }
+
+ /**
+ * Get the profile items already included.
+ * @return the items already added to this profile
+ */
+ public Item[] getItems() {
+ return (Item[]) items.toArray(new Item[items.size()]);
+ }
+
+ /** Get the headers that have already been included.
+ * @return the headers already added to this profile
+ */
+ public String[] getHeaderNames() {
+ return (String[]) headers.toArray(new String[headers.size()]);
+ }
+}
Added: geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Flags.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Flags.java?rev=1620683&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Flags.java (added)
+++ geronimo/specs/trunk/geronimo-javamail_1.5_spec/src/main/java/javax/mail/Flags.java Tue Aug 26 18:17:06 2014
@@ -0,0 +1,298 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.mail;
+
+import java.io.Serializable;
+import java.util.Hashtable;
+
+/**
+ * Representation of flags that may be associated with a message.
+ * Flags can either be system flags, defined by the {@link Flags.Flag Flag} inner class,
+ * or user-defined flags defined by a String. The system flags represent those expected
+ * to be provided by most folder systems; user-defined flags allow for additional flags
+ * on a per-provider basis.
+ * <p/>
+ * This class is Serializable but compatibility is not guaranteed across releases.
+ *
+ * @version $Rev$ $Date$
+ */
+public class Flags implements Cloneable, Serializable {
+
+ private static final long serialVersionUID = 6243590407214169028L;
+
+ public static final class Flag {
+ /**
+ * Flag that indicates that the message has been replied to; has a bit value of 1.
+ */
+ public static final Flag ANSWERED = new Flag(1);
+ /**
+ * Flag that indicates that the message has been marked for deletion and
+ * should be removed on a subsequent expunge operation; has a bit value of 2.
+ */
+ public static final Flag DELETED = new Flag(2);
+ /**
+ * Flag that indicates that the message is a draft; has a bit value of 4.
+ */
+ public static final Flag DRAFT = new Flag(4);
+ /**
+ * Flag that indicates that the message has been flagged; has a bit value of 8.
+ */
+ public static final Flag FLAGGED = new Flag(8);
+ /**
+ * Flag that indicates that the message has been delivered since the last time
+ * this folder was opened; has a bit value of 16.
+ */
+ public static final Flag RECENT = new Flag(16);
+ /**
+ * Flag that indicates that the message has been viewed; has a bit value of 32.
+ * This flag is set by the {@link Message#getInputStream()} and {@link Message#getContent()}
+ * methods.
+ */
+ public static final Flag SEEN = new Flag(32);
+ /**
+ * Flags that indicates if this folder supports user-defined flags; has a bit value of 0x80000000.
+ */
+ public static final Flag USER = new Flag(0x80000000);
+
+ private final int mask;
+
+ private Flag(final int mask) {
+ this.mask = mask;
+ }
+ }
+
+ // the Serialized form of this class required the following two fields to be persisted
+ // this leads to a specific type of implementation
+ private int system_flags;
+ private final Hashtable user_flags;
+
+ /**
+ * Construct a Flags instance with no flags set.
+ */
+ public Flags() {
+ user_flags = new Hashtable();
+ }
+
+ /**
+ * Construct a Flags instance with a supplied system flag set.
+ * @param flag the system flag to set
+ */
+ public Flags(final Flag flag) {
+ system_flags = flag.mask;
+ user_flags = new Hashtable();
+ }
+
+ /**
+ * Construct a Flags instance with a same flags set.
+ * @param flags the instance to copy
+ */
+ public Flags(final Flags flags) {
+ system_flags = flags.system_flags;
+ user_flags = new Hashtable(flags.user_flags);
+ }
+
+ /**
+ * Construct a Flags instance with the supplied user flags set.
+ * Question: should this automatically set the USER system flag?
+ * @param name the user flag to set
+ */
+ public Flags(final String name) {
+ user_flags = new Hashtable();
+ user_flags.put(name.toLowerCase(), name);
+ }
+
+ /**
+ * Set a system flag.
+ * @param flag the system flag to set
+ */
+ public void add(final Flag flag) {
+ system_flags |= flag.mask;
+ }
+
+ /**
+ * Set all system and user flags from the supplied Flags.
+ * Question: do we need to check compatibility of USER flags?
+ * @param flags the Flags to add
+ */
+ public void add(final Flags flags) {
+ system_flags |= flags.system_flags;
+ user_flags.putAll(flags.user_flags);
+ }
+
+ /**
+ * Set a user flag.
+ * Question: should this fail if the USER system flag is not set?
+ * @param name the user flag to set
+ */
+ public void add(final String name) {
+ user_flags.put(name.toLowerCase(), name);
+ }
+
+ /**
+ * Return a copy of this instance.
+ * @return a copy of this instance
+ */
+ @Override
+ public Object clone() {
+ return new Flags(this);
+ }
+
+ /**
+ * See if the supplied system flags are set
+ * @param flag the system flags to check for
+ * @return true if the flags are set
+ */
+ public boolean contains(final Flag flag) {
+ return (system_flags & flag.mask) != 0;
+ }
+
+ /**
+ * See if all of the supplied Flags are set
+ * @param flags the flags to check for
+ * @return true if all the supplied system and user flags are set
+ */
+ public boolean contains(final Flags flags) {
+ return ((system_flags & flags.system_flags) == flags.system_flags)
+ && user_flags.keySet().containsAll(flags.user_flags.keySet());
+ }
+
+ /**
+ * See if the supplied user flag is set
+ * @param name the user flag to check for
+ * @return true if the flag is set
+ */
+ public boolean contains(final String name) {
+ return user_flags.containsKey(name.toLowerCase());
+ }
+
+ /**
+ * Equality is defined as true if the other object is a instanceof Flags with the
+ * same system and user flags set (using a case-insensitive name comparison for user flags).
+ * @param other the instance to compare against
+ * @return true if the two instance are the same
+ */
+ @Override
+ public boolean equals(final Object other) {
+ if (other == this) {
+ return true;
+ }
+ if (other instanceof Flags == false) {
+ return false;
+ }
+ final Flags flags = (Flags) other;
+ return system_flags == flags.system_flags && user_flags.keySet().equals(flags.user_flags.keySet());
+ }
+
+ /**
+ * Calculate a hashCode for this instance
+ * @return a hashCode for this instance
+ */
+ @Override
+ public int hashCode() {
+ return system_flags ^ user_flags.keySet().hashCode();
+ }
+
+ /**
+ * Return a list of {@link Flags.Flag Flags} containing the system flags that have been set
+ * @return the system flags that have been set
+ */
+ public Flag[] getSystemFlags() {
+ // assumption: it is quicker to calculate the size than it is to reallocate the array
+ int size = 0;
+ if ((system_flags & Flag.ANSWERED.mask) != 0) {
+ size += 1;
+ }
+ if ((system_flags & Flag.DELETED.mask) != 0) {
+ size += 1;
+ }
+ if ((system_flags & Flag.DRAFT.mask) != 0) {
+ size += 1;
+ }
+ if ((system_flags & Flag.FLAGGED.mask) != 0) {
+ size += 1;
+ }
+ if ((system_flags & Flag.RECENT.mask) != 0) {
+ size += 1;
+ }
+ if ((system_flags & Flag.SEEN.mask) != 0) {
+ size += 1;
+ }
+ if ((system_flags & Flag.USER.mask) != 0) {
+ size += 1;
+ }
+ final Flag[] result = new Flag[size];
+ if ((system_flags & Flag.USER.mask) != 0) {
+ result[--size] = Flag.USER;
+ }
+ if ((system_flags & Flag.SEEN.mask) != 0) {
+ result[--size] = Flag.SEEN;
+ }
+ if ((system_flags & Flag.RECENT.mask) != 0) {
+ result[--size] = Flag.RECENT;
+ }
+ if ((system_flags & Flag.FLAGGED.mask) != 0) {
+ result[--size] = Flag.FLAGGED;
+ }
+ if ((system_flags & Flag.DRAFT.mask) != 0) {
+ result[--size] = Flag.DRAFT;
+ }
+ if ((system_flags & Flag.DELETED.mask) != 0) {
+ result[--size] = Flag.DELETED;
+ }
+ if ((system_flags & Flag.ANSWERED.mask) != 0) {
+ result[--size] = Flag.ANSWERED;
+ }
+ return result;
+ }
+
+ /**
+ * Return a list of user flags that have been set
+ * @return a list of user flags
+ */
+ public String[] getUserFlags() {
+ return (String[]) user_flags.values().toArray(new String[user_flags.values().size()]);
+ }
+
+ /**
+ * Unset the supplied system flag.
+ * Question: what happens if we unset the USER flags and user flags are set?
+ * @param flag the flag to clear
+ */
+ public void remove(final Flag flag) {
+ system_flags &= ~flag.mask;
+ }
+
+ /**
+ * Unset all flags from the supplied instance.
+ * @param flags the flags to clear
+ */
+ public void remove(final Flags flags) {
+ system_flags &= ~flags.system_flags;
+ user_flags.keySet().removeAll(flags.user_flags.keySet());
+ }
+
+ /**
+ * Unset the supplied user flag.
+ * @param name the flag to clear
+ */
+ public void remove(final String name) {
+ user_flags.remove(name.toLowerCase());
+ }
+}