stefano 2003/03/10 08:35:46
Modified: src/blocks/mail/mocks/javax/mail/internet
AddressException.java MimeMessage.java
InternetAddress.java
src/blocks/mail/mocks/javax/mail Part.java
MessagingException.java Session.java Address.java
Message.java Transport.java
Added: src/blocks/mail/mocks/javax/mail/search OrTerm.java
FromStringTerm.java SubjectTerm.java
SearchTerm.java
src/blocks/mail/mocks/javax/mail/internet MimePart.java
ParseException.java ParameterList.java
ContentType.java MimeMultipart.java
src/blocks/mail/mocks/javax/mail UIDFolder.java
BodyPart.java URLName.java Header.java
Provider.java FetchProfile.java Flags.java
Authenticator.java Multipart.java Folder.java
Store.java
Log:
Updated mock classes for the mail block
Note: I removed our license from the mock classes because
I think they should reside in the public domain to lower
potential legal problems.
Revision Changes Path
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/search/OrTerm.java
Index: OrTerm.java
===================================================================
package javax.mail.search;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class OrTerm extends SearchTerm {
public OrTerm(SearchTerm a, SearchTerm b) {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1
cocoon-2.1/src/blocks/mail/mocks/javax/mail/search/FromStringTerm.java
Index: FromStringTerm.java
===================================================================
package javax.mail.search;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class FromStringTerm extends SearchTerm {
public FromStringTerm(String term) {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1
cocoon-2.1/src/blocks/mail/mocks/javax/mail/search/SubjectTerm.java
Index: SubjectTerm.java
===================================================================
package javax.mail.search;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class SubjectTerm extends SearchTerm {
public SubjectTerm(String term) {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1
cocoon-2.1/src/blocks/mail/mocks/javax/mail/search/SearchTerm.java
Index: SearchTerm.java
===================================================================
package javax.mail.search;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class SearchTerm {
}
1.2 +1 -50
cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/AddressException.java
Index: AddressException.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/AddressException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AddressException.java 9 Mar 2003 00:04:38 -0000 1.1
+++ AddressException.java 10 Mar 2003 16:35:44 -0000 1.2
@@ -1,52 +1,3 @@
-/*
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
package javax.mail.internet;
import javax.mail.MessagingException;
1.2 +39 -51
cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/MimeMessage.java
Index: MimeMessage.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/MimeMessage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MimeMessage.java 9 Mar 2003 00:04:38 -0000 1.1
+++ MimeMessage.java 10 Mar 2003 16:35:44 -0000 1.2
@@ -1,56 +1,8 @@
-/*
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
package javax.mail.internet;
import javax.mail.Message;
import javax.mail.Session;
+import javax.mail.MessagingException;
/**
* Mock class providing the declarations required to compile the Cocoon code when
@@ -58,9 +10,45 @@
*
* @version CVS $Id$
*/
-public class MimeMessage extends Message {
+public class MimeMessage extends Message implements MimePart {
public MimeMessage(Session session) {
throw new NoSuchMethodError("This is a mock object");
}
+
+ public boolean isMimeType(String type) throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public java.util.Enumeration getAllHeaders() throws MessagingException{
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public String getContentType() throws MessagingException{
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public void setText(String s) throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public Object getContent() throws java.io.IOException, MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public String getDescription() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public String getDisposition() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public String getFileName() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public String getMessageID() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
}
1.2 +9 -50
cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/InternetAddress.java
Index: InternetAddress.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/InternetAddress.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InternetAddress.java 9 Mar 2003 00:04:38 -0000 1.1
+++ InternetAddress.java 10 Mar 2003 16:35:44 -0000 1.2
@@ -1,52 +1,3 @@
-/*
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
package javax.mail.internet;
import javax.mail.Address;
@@ -61,5 +12,13 @@
public InternetAddress(String from) {
throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public String getAddress() {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public String getPersonal() {
+ throw new NoSuchMethodError("This is a mock object");
}
}
1.1
cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/MimePart.java
Index: MimePart.java
===================================================================
package javax.mail.internet;
import javax.mail.Part;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id: MimePart.java,v 1.1 2003/03/10 16:35:44 stefano Exp $
*/
public interface MimePart extends Part {
}
1.1
cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/ParseException.java
Index: ParseException.java
===================================================================
package javax.mail.internet;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class ParseException extends Exception {
}
1.1
cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/ParameterList.java
Index: ParameterList.java
===================================================================
package javax.mail.internet;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class ParameterList {
public java.util.Enumeration getNames() {
throw new NoSuchMethodError("This is a mock object");
}
public String get(String name) {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1
cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/ContentType.java
Index: ContentType.java
===================================================================
package javax.mail.internet;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class ContentType {
public ContentType (String type) throws ParseException {
throw new NoSuchMethodError("This is a mock object");
}
public String getPrimaryType() {
throw new NoSuchMethodError("This is a mock object");
}
public String getSubType() {
throw new NoSuchMethodError("This is a mock object");
}
public String getBaseType() {
throw new NoSuchMethodError("This is a mock object");
}
public ParameterList getParameterList() {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1
cocoon-2.1/src/blocks/mail/mocks/javax/mail/internet/MimeMultipart.java
Index: MimeMultipart.java
===================================================================
package javax.mail.internet;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class MimeMultipart {
public int getCount() {
throw new NoSuchMethodError("This is a mock object");
}
public javax.mail.BodyPart getBodyPart(int index) {
throw new NoSuchMethodError("This is a mock object");
}
}
1.2 +20 -52 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Part.java
Index: Part.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/mail/mocks/javax/mail/Part.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Part.java 9 Mar 2003 00:04:37 -0000 1.1
+++ Part.java 10 Mar 2003 16:35:45 -0000 1.2
@@ -1,52 +1,3 @@
-/*
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
package javax.mail;
/**
@@ -56,6 +7,23 @@
* @version CVS $Id$
*/
public interface Part {
- public abstract void setText(String s)
- throws MessagingException;
+
+ public static final String INLINE = null;
+ public static final String ATTACHMENT = null;
+
+ boolean isMimeType(String type) throws MessagingException;
+
+ String getContentType() throws MessagingException;
+
+ void setText(String s) throws MessagingException;
+
+ Object getContent() throws java.io.IOException, MessagingException;
+
+ java.util.Enumeration getAllHeaders() throws MessagingException;
+
+ String getDescription() throws MessagingException;
+
+ String getDisposition() throws MessagingException;
+
+ String getFileName() throws MessagingException;
}
1.2 +9 -50
cocoon-2.1/src/blocks/mail/mocks/javax/mail/MessagingException.java
Index: MessagingException.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/mail/mocks/javax/mail/MessagingException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MessagingException.java 9 Mar 2003 00:04:37 -0000 1.1
+++ MessagingException.java 10 Mar 2003 16:35:45 -0000 1.2
@@ -1,52 +1,3 @@
-/*
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
package javax.mail;
/**
@@ -56,4 +7,12 @@
* @version CVS $Id$
*/
public class MessagingException extends Exception {
+
+ public MessagingException() {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public MessagingException(String message, java.io.IOException ioe) {
+ throw new NoSuchMethodError("This is a mock object");
+ }
}
1.2 +14 -55 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Session.java
Index: Session.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/mail/mocks/javax/mail/Session.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Session.java 9 Mar 2003 00:04:37 -0000 1.1
+++ Session.java 10 Mar 2003 16:35:45 -0000 1.2
@@ -1,70 +1,29 @@
-/*
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
package javax.mail;
import java.util.Properties;
/**
- * http://java.sun.com/products/javamail/1.3/docs/javadocs/
- * http://java.sun.com/products/javabeans/glasgow/javadocs/
- */
-/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id$
*/
-public abstract class Session {
+
+public class Session {
public static Session getDefaultInstance(Properties props) {
throw new NoSuchMethodError("This is a mock object");
}
+
+ public static Session getDefaultInstance(Properties props, Authenticator auth) {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public Store getStore(URLName name) {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+ public Provider[] getProviders() {
+ throw new NoSuchMethodError("This is a mock object");
+ }
}
1.2 +2 -51 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Address.java
Index: Address.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/mail/mocks/javax/mail/Address.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Address.java 9 Mar 2003 00:04:37 -0000 1.1
+++ Address.java 10 Mar 2003 16:35:45 -0000 1.2
@@ -1,52 +1,3 @@
-/*
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
package javax.mail;
/**
@@ -55,5 +6,5 @@
*
* @version CVS $Id$
*/
-public abstract class Address {
+public class Address {
}
1.2 +41 -50 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Message.java
Index: Message.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/mail/mocks/javax/mail/Message.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Message.java 9 Mar 2003 00:04:37 -0000 1.1
+++ Message.java 10 Mar 2003 16:35:45 -0000 1.2
@@ -1,52 +1,3 @@
-/*
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
package javax.mail;
import java.util.Date;
@@ -85,5 +36,45 @@
public void setSentDate(Date date) throws MessagingException {
throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public Object getContent() throws java.io.IOException, MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public Address[] getFrom() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public Address[] getRecipients(RecipientType type) throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public Address[] getReplyTo() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public String getSubject() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public java.util.Date getSentDate() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public java.util.Date getReceivedDate() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public int getSize() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public int getMessageNumber() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
+ }
+
+ public Flags getFlags() throws MessagingException {
+ throw new NoSuchMethodError("This is a mock object");
}
}
1.2 +1 -50 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Transport.java
Index: Transport.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/mail/mocks/javax/mail/Transport.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Transport.java 9 Mar 2003 00:04:37 -0000 1.1
+++ Transport.java 10 Mar 2003 16:35:45 -0000 1.2
@@ -1,52 +1,3 @@
-/*
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- [EMAIL PROTECTED]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
package javax.mail;
/**
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/UIDFolder.java
Index: UIDFolder.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public interface UIDFolder {
Message getMessageByUID(int uid);
}
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/BodyPart.java
Index: BodyPart.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public interface BodyPart extends Part {
}
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/URLName.java
Index: URLName.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class URLName {
public URLName (String url) {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Header.java
Index: Header.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class Header {
public String getName() {
throw new NoSuchMethodError("This is a mock object");
}
public String getValue() {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Provider.java
Index: Provider.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class Provider {
}
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/FetchProfile.java
Index: FetchProfile.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class FetchProfile {
public static class Item {
public static final Item ENVELOPE = null;
public static final Item FLAGS = null;
}
public void add(Item item) {
throw new NoSuchMethodError("This is a mock object");
}
public void add(String item) {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Flags.java
Index: Flags.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class Flags {
public static final class Flag {
public final static Flag ANSWERED = null;
public final static Flag DELETED = null;
public final static Flag DRAFT = null;
public final static Flag FLAGGED = null;
public final static Flag RECENT = null;
public final static Flag SEEN = null;
}
public Flag[] getSystemFlags() {
throw new NoSuchMethodError("This is a mock object");
}
public String[] getUserFlags() {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Authenticator.java
Index: Authenticator.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class Authenticator {
}
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Multipart.java
Index: Multipart.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class Multipart {
public int getCount() {
throw new NoSuchMethodError("This is a mock object");
}
public Part getBodyPart(int index) {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Folder.java
Index: Folder.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id: Folder.java,v 1.1 2003/03/10 16:35:45 stefano Exp $
*/
public class Folder {
public static final int READ_ONLY = 0;
public static final int HOLDS_FOLDERS = 0;
public static final int HOLDS_MESSAGES = 0;
public void open(int mode) {
throw new NoSuchMethodError("This is a mock object");
}
public boolean isOpen() {
throw new NoSuchMethodError("This is a mock object");
}
public void close(boolean b) {
throw new NoSuchMethodError("This is a mock object");
}
public Message[] getMessages() {
throw new NoSuchMethodError("This is a mock object");
}
public void fetch(Message[] m, FetchProfile profile) {
throw new NoSuchMethodError("This is a mock object");
}
public Folder[] list(String pattern) {
throw new NoSuchMethodError("This is a mock object");
}
public String getFullName() {
throw new NoSuchMethodError("This is a mock object");
}
public Message getMessage(int id) {
throw new NoSuchMethodError("This is a mock object");
}
public Message[] search(javax.mail.search.SearchTerm term) {
throw new NoSuchMethodError("This is a mock object");
}
public String getName() {
throw new NoSuchMethodError("This is a mock object");
}
public String getURLName() {
throw new NoSuchMethodError("This is a mock object");
}
public boolean isSubscribed() {
throw new NoSuchMethodError("This is a mock object");
}
public int getType() {
throw new NoSuchMethodError("This is a mock object");
}
public boolean hasNewMessages() {
throw new NoSuchMethodError("This is a mock object");
}
public int getMessageCount() {
throw new NoSuchMethodError("This is a mock object");
}
public int getNewMessageCount() {
throw new NoSuchMethodError("This is a mock object");
}
public int getDeletedMessageCount() {
throw new NoSuchMethodError("This is a mock object");
}
public int getUnreadMessageCount() {
throw new NoSuchMethodError("This is a mock object");
}
}
1.1 cocoon-2.1/src/blocks/mail/mocks/javax/mail/Store.java
Index: Store.java
===================================================================
package javax.mail;
/**
* Mock class providing the declarations required to compile the Cocoon code when
* the actual library is not present.
*
* @version CVS $Id:
*/
public class Store {
public void connect() throws MessagingException {
throw new NoSuchMethodError("This is a mock object");
}
public boolean isConnected() {
throw new NoSuchMethodError("This is a mock object");
}
public void close() throws MessagingException {
throw new NoSuchMethodError("This is a mock object");
}
public Folder getDefaultFolder() throws MessagingException {
throw new NoSuchMethodError("This is a mock object");
}
public Folder getFolder(String name) throws MessagingException {
throw new NoSuchMethodError("This is a mock object");
}
}