james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-james/src/org/apache/james/imapserver RecordRepository.java MessageAttributes.java MailboxEventSource.java MailboxEventListener.java FolderRecord.java ACLMailbox.java ACL.java
Date Mon, 05 Mar 2001 15:04:50 GMT
donaldp     01/03/05 07:04:48

  Modified:    src/org/apache/james/imapserver RecordRepository.java
                        MessageAttributes.java MailboxEventSource.java
                        MailboxEventListener.java FolderRecord.java
                        ACLMailbox.java ACL.java
  Log:
  Made James conform to the JLS spec closer.
  
  Did this by removing any structures that are "strongly discouraged".
  
  Revision  Changes    Path
  1.2       +6 -9      jakarta-james/src/org/apache/james/imapserver/RecordRepository.java
  
  Index: RecordRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/imapserver/RecordRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RecordRepository.java	2001/01/09 12:53:07	1.1
  +++ RecordRepository.java	2001/03/05 15:04:23	1.2
  @@ -22,23 +22,21 @@
    */
   public interface RecordRepository {
   
  -  
  -    public static final String RECORD = "RECORD";
  +    String RECORD = "RECORD";
   
       /**
        * Sets the location of this repository.
        *
        * @param rootPath String location of this repository
        */
  -    public void setPath(String rootPath);
  +    void setPath( String rootPath );
   
  -
       /**
        * Stores a folder record in this repository.
        *
        * @param fr FolderRecord to be stored
        */
  -    public void store(FolderRecord fr) ;
  +    void store( FolderRecord fr );
         
       /**
        * Returns Iterator over names of folders in repository
  @@ -46,7 +44,7 @@
        * @returns Iterator over Strings of AbsoluteNames of Folders. Calling
        * objects cannot change contents of Iterator.
        */
  -    public Iterator getAbsoluteNames();
  +    Iterator getAbsoluteNames();
   
       /**
        * Retrieves a folder record given the folder's full name. 
  @@ -54,7 +52,7 @@
        * @param folderAbsoluteName String name of a folder
        * @returns FolderRecord for specified folder, null if no such FolderRecord
        */
  -    public FolderRecord retrieve(String folderAbsoluteName);
  +    FolderRecord retrieve( String folderAbsoluteName );
       
       /**
        * Tests if there is a folder record for the given folder name.
  @@ -62,8 +60,7 @@
        * @param folderAbsoluteName String name of a folder
        * @returns boolean True if there is a record for the specified folder.
        */
  -    public boolean containsRecord(String folderAbsoluteName);
  -
  +    boolean containsRecord( String folderAbsoluteName );
   }
   
       
  
  
  
  1.3       +7 -13     jakarta-james/src/org/apache/james/imapserver/MessageAttributes.java
  
  Index: MessageAttributes.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/imapserver/MessageAttributes.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessageAttributes.java	2001/01/15 12:55:29	1.2
  +++ MessageAttributes.java	2001/03/05 15:04:26	1.3
  @@ -23,7 +23,6 @@
    * @author <a href="mailto:charles@benett1.demon.co.uk">Charles Benett</a>
    * @version 0.1 on 14 Dec 2000
    */
  -
   public interface MessageAttributes  {
   
       /**
  @@ -32,7 +31,7 @@
        *
        * @returns int a positive non-zero integer
        */
  -    public int getMessageSequenceNumber();
  +    int getMessageSequenceNumber();
   
       /**
        * Provides the unique identity value for this message. UIDs combined with
  @@ -43,8 +42,7 @@
        *
        * @returns int a 32-bit value
        */
  -    public int getUID();
  -
  +    int getUID();
   
       /**
        * Provides the date and time at which the message was received. In the
  @@ -57,37 +55,33 @@
        *
        * @returns Date imap internal date
        */
  -    public Date getInternalDate();
  +    Date getInternalDate();
   
       /**
        * Returns IMAP formatted String representation of Date
        */
  -    public String getInternalDateAsString();
  -
  +    String getInternalDateAsString();
   
       /**
        * Provides the sizeof the message in octets.
        *
        * @returns int number of octets in message.
        */
  -    public int getSize();
  +    int getSize();
   
       /**
        * Provides the Envelope structure information for this message. This is a parsed representation
of the rfc-822 envelope information. This is not to be confused with the SMTP envelope!
        *
        * @returns String satisfying envelope syntax in rfc 2060.
        */
  -    public String getEnvelope();
  +    String getEnvelope();
   
       /**
        * Provides the Body Structure information for this message. This is a parsed representtion
of the MIME structure of the message.
        *
        * @returns String satisfying body syntax in rfc 2060.
        */
  -    public String getBodyStructure();
  -
  -
  -
  +    String getBodyStructure();
   }
   
   
  
  
  
  1.2       +2 -2      jakarta-james/src/org/apache/james/imapserver/MailboxEventSource.java
  
  Index: MailboxEventSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/imapserver/MailboxEventSource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MailboxEventSource.java	2001/01/09 12:53:06	1.1
  +++ MailboxEventSource.java	2001/03/05 15:04:28	1.2
  @@ -29,14 +29,14 @@
        *
        * @param mel MailboxEventListener to be registered with this source.
        */
  -    public void addMailboxEventListener(MailboxEventListener mel) ;
  +    void addMailboxEventListener( MailboxEventListener mel );
   
       /**
        * Deregisters a MailboxEventListener.
        *
        * @param mel MailboxEventListener to be deregistered from this source.
        */
  -    public void removeMailboxEventListener(MailboxEventListener mel);
  +    void removeMailboxEventListener( MailboxEventListener mel );
   }
    
   
  
  
  
  1.2       +1 -2      jakarta-james/src/org/apache/james/imapserver/MailboxEventListener.java
  
  Index: MailboxEventListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/imapserver/MailboxEventListener.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MailboxEventListener.java	2001/01/09 12:53:05	1.1
  +++ MailboxEventListener.java	2001/03/05 15:04:29	1.2
  @@ -21,6 +21,5 @@
    */
   public interface MailboxEventListener extends EventListener, Serializable {
   
  -    public void receiveEvent(MailboxEvent me);
  -
  +    void receiveEvent( MailboxEvent me );
   }
  
  
  
  1.2       +27 -29    jakarta-james/src/org/apache/james/imapserver/FolderRecord.java
  
  Index: FolderRecord.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/imapserver/FolderRecord.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FolderRecord.java	2001/01/09 12:48:59	1.1
  +++ FolderRecord.java	2001/03/05 15:04:31	1.2
  @@ -11,7 +11,6 @@
   import java.util.Set;
   import java.util.Map;
   
  -
   /**
    * Interface for objects representing the record of a folder on an IMAP host.
    * 
  @@ -29,7 +28,7 @@
        *
        * @returns String mailbox hierarchical name including namespace
        */
  -    public String getFullName();
  +    String getFullName();
   
       /**
        * Returns the user in whose namespace the mailbox existed.
  @@ -39,7 +38,7 @@
        * @param user String a user.An empty string indicates that the 
        * mailbox name is absolute.
        */
  -    public String getUser();
  +    String getUser();
   
       /**
        * Returns the absolute name of this mailbox. The absolute name is
  @@ -49,7 +48,7 @@
        *
        * @returns String mailbox absolute name
        */
  -    public String getAbsoluteName();
  +    String getAbsoluteName();
   
       /**
        * Records if this mailbox name is currently in use. The mailbox name is
  @@ -62,7 +61,7 @@
        * @param state boolean true when mailbox created, false when name no
        * longer in use.
        */
  -    public void setNameInUse(boolean state);
  +    void setNameInUse(boolean state);
   
       /**
        * Returns unavailability of name for a new mailbox.
  @@ -70,14 +69,14 @@
        * @returns true if this name is in use. Must return true if isDeleted
        * returns false.
        */
  -    public boolean isNameInUse() ;
  +    boolean isNameInUse();
   
       /**
        *  Records if the corresponding mailbox has been deleted.
        *
        * @param state boolean true when mailbox deleted, false when created
        */
  -    public void setDeleted(boolean state) ;
  +    void setDeleted(boolean state);
   
       /**
        * Returns whether mailbox has been deleted. A deleted mailbox is an
  @@ -85,7 +84,7 @@
        *
        * @returns boolean true if mailbox does not exist
        */
  -    public boolean isDeleted() ;
  +    boolean isDeleted();
   
       /**
        * Records the Unique Identifier Validity Value for this mailbox.
  @@ -94,35 +93,35 @@
        * the current uid values overlap uid values of this or a previous
        * incarnation of the mailbox.
        */
  -    public void setUidValidity(int uidValidity) ;
  +    void setUidValidity(int uidValidity);
   
       /**
        * Returns current uid validity value
        *
        * @returns int uid validity value
        */
  -    public int getUidValidity() ;
  +    int getUidValidity();
   
      /**
        * Records the highest assigned Unique Identifier Value for this mailbox.
        *
        * @param uid int the highest uid assigned to a message in this mailbox.
        */
  -    public void setHighestUid(int uid) ;
  +    void setHighestUid(int uid);
   
       /**
        * Returns current highest assigned uid value
        *
        * @returns int uid  value
        */
  -    public int getHighestUid() ;
  +    int getHighestUid();
   
       /**
        * Record which users have LookupRights.
        *
        * @param users Set of Strings, one per user with Lookup rights
        */
  -    public void setLookupRights(Set users) ;
  +    void setLookupRights(Set users);
   
       /**
        * Indicates if given user has lookup rights for this mailbox.  Need
  @@ -130,14 +129,14 @@
        *
        * @returns boolean true if user has lookup rights
        */
  -    public boolean hasLookupRights(String user) ;
  +    boolean hasLookupRights(String user);
   
       /**
        * Record which users have ReadRights.
        *
        * @param users Set of Strings, one per user with read rights
        */
  -    public void setReadRights(Set users);
  +    void setReadRights(Set users);
   
       /**
        * Indicates if given user has read rights for this mailbox. Need read
  @@ -145,19 +144,19 @@
        *
        * @returns boolean true if user has read rights
        */
  -    public boolean hasReadRights(String user) ;
  +    boolean hasReadRights(String user);
   
      /**
        * Record if mailbox is marked.
        */
  -    public void setMarked(boolean mark);
  +    void setMarked(boolean mark);
   
      /**
        * Indicates if the mailbox is marked. Usually means unseen mail.
        *
        * @returns boolean true if marked
        */
  -    public boolean isMarked() ;
  +    boolean isMarked();
   
       /**
        * Mark this mailbox as not selectable by anyone. 
  @@ -165,9 +164,9 @@
        *
        * @param state true if folder is not selectable by anyone
        */
  -    public void setNotSelectableByAnyone(boolean state);
  +    void setNotSelectableByAnyone(boolean state);
   
  -    public boolean isNotSelectableByAnyone();
  +    boolean isNotSelectableByAnyone();
   
       /**
        * A folder is selectable by a given user if both it is not
  @@ -176,43 +175,42 @@
        * @parm user the user to be tested
        * @returns true if user can SELECT this mailbox.
        */
  -    public boolean isSelectable(String user);
  +    boolean isSelectable(String user);
   
       /**
        * Set number of messages in this folder
        */
  -    public void setExists(int num);
  +    void setExists(int num);
   
       /**
        * Indicates number of messages in folder
        *
        * @returns int number of messages
        */
  -    public int getExists();
  +    int getExists();
   
       /**
        * Set number of messages in this folder with Recent flag set
        */
  -    public void setRecent(int num);
  +    void setRecent(int num);
   
       /**
        * Indicates no of messages with \Recent flag set
        *
        * @returns int no of messages with \Recent flag set
        */
  -    public int getRecent();
  +    int getRecent();
   
       /**
        * Set map of users versus number of messages in this folder without
        * \Seen flag set for them
        */
  -    public void setUnseenbyUser(Map unseen);
  -
  +    void setUnseenbyUser(Map unseen);
   
  -  /** 
  +    /** 
        * Indicates the number of  unseen messages for the specified user. 
        *
        * @returns int number of messages without \Seen flag set for this User.
        */
  -    public int getUnseen(String user);
  +    int getUnseen(String user);
   }
  
  
  
  1.2       +3 -5      jakarta-james/src/org/apache/james/imapserver/ACLMailbox.java
  
  Index: ACLMailbox.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/imapserver/ACLMailbox.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ACLMailbox.java	2001/01/09 12:48:58	1.1
  +++ ACLMailbox.java	2001/03/05 15:04:33	1.2
  @@ -5,7 +5,6 @@
    * version 1.1, a copy of which has been included  with this distribution in *
    * the LICENSE file.                                                         *
    *****************************************************************************/
  -
   package org.apache.james.imapserver;
   
   import org.apache.avalon.*;
  @@ -20,7 +19,6 @@
    * @see Mailbox
    * @see ACL
    */
  -
   public interface ACLMailbox extends ACL, Mailbox, Contextualizable, Initializable, Disposable
{
    
       /**
  @@ -31,15 +29,15 @@
        * @param abName String absolute, ie user-independent, name of mailbox.
        * @param initialAdminUser String email local-part of a user who will be assigned admin
rights on this mailbox
        */
  -    public void prepareMailbox(String user, String absName, String initialAdminUser);
  +    void prepareMailbox( String user, String absName, String initialAdminUser );
   
       /**
        * Re-initialises mailbox when restored from storage. Must be called after
        * setConfiguration, setContext, setComponentManager, if they are called,
        * but before any opertional methods are called.
        */
  -    public void reInit() throws Exception ;
  -
  +    void reInit() 
  +        throws Exception;
   }
    
   
  
  
  
  1.3       +43 -54    jakarta-james/src/org/apache/james/imapserver/ACL.java
  
  Index: ACL.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/imapserver/ACL.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ACL.java	2001/01/15 12:55:27	1.2
  +++ ACL.java	2001/03/05 15:04:34	1.3
  @@ -5,7 +5,6 @@
    * version 1.1, a copy of which has been included  with this distribution in *
    * the LICENSE file.                                                         *
    *****************************************************************************/
  -
   package org.apache.james.imapserver;
   
   import java.io.*;
  @@ -13,7 +12,6 @@
   import java.util.*;
   import javax.mail.*;
   import javax.mail.internet.*;
  -
   import org.apache.james.AccessControlException;
   import org.apache.james.AuthorizationException;
   
  @@ -41,25 +39,25 @@
    * @author <a href="mailto:charles@benett1.demon.co.uk">Charles Benett</a>
    * @version 0.1  on 14 Dec 2000
    */
  -
   public interface ACL extends Serializable {
  -
  -    public static final char LOOKUP_RIGHTS = 'l';
  -    public static final char READ_RIGHTS = 'r';
  -    public static final char KEEP_SEEN_RIGHTS = 's';
  -    public static final char WRITE_RIGHTS = 'w';
  -    public static final char INSERT_RIGHTS = 'i';
  -    public static final char POST_RIGHTS = 'p';
  -    public static final char CREATE_RIGHTS = 'c';
  -    public static final char DELETE_RIGHTS = 'd';
  -    public static final char ADMIN_RIGHTS = 'a';
  -    public static final char ADD_RIGHTS = '+';
  -    public static final char REMOVE_RIGHTS = '-';
  -    public static final char[] RIGHTS
  -	= {LOOKUP_RIGHTS, READ_RIGHTS, KEEP_SEEN_RIGHTS, WRITE_RIGHTS,
  -	   INSERT_RIGHTS, POST_RIGHTS, CREATE_RIGHTS, DELETE_RIGHTS,
  -	   ADMIN_RIGHTS};
   
  +    char LOOKUP_RIGHTS = 'l';
  +    char READ_RIGHTS = 'r';
  +    char KEEP_SEEN_RIGHTS = 's';
  +    char WRITE_RIGHTS = 'w';
  +    char INSERT_RIGHTS = 'i';
  +    char POST_RIGHTS = 'p';
  +    char CREATE_RIGHTS = 'c';
  +    char DELETE_RIGHTS = 'd';
  +    char ADMIN_RIGHTS = 'a';
  +    char ADD_RIGHTS = '+';
  +    char REMOVE_RIGHTS = '-';
  +    char[] RIGHTS = 
  +    {
  +        LOOKUP_RIGHTS, READ_RIGHTS, KEEP_SEEN_RIGHTS, WRITE_RIGHTS,
  +        INSERT_RIGHTS, POST_RIGHTS, CREATE_RIGHTS, DELETE_RIGHTS,
  +        ADMIN_RIGHTS
  +    };
   
       /**
        * Store access rights for a given identity.
  @@ -86,12 +84,11 @@
        * administer right (ie the right to write ACL rights), or if the result
        * of this method would leave no identities with admin rights.
        */
  -    public boolean setRights(String setter, String identifier,
  -			  String modification)
  -	throws AccessControlException, AuthorizationException;
  +    boolean setRights( String setter, 
  +                       String identifier,
  +                       String modification)
  +        throws AccessControlException, AuthorizationException;
   
  -
  -
       /**
        * Retrieve access rights for a specific identity.
        *
  @@ -106,9 +103,8 @@
        * @throws AuthorizationException if implementation does not wish to expose
        * ACL for this identity to this getter.
        */
  -    public String getRights(String getter, String identity)
  -	throws AccessControlException, AuthorizationException ;
  -
  +    String getRights( String getter, String identity )
  +        throws AccessControlException, AuthorizationException;
   
       /**
        * Retrieves a String of one or more <identity space rights> who have
  @@ -122,10 +118,9 @@
        * @throws AuthorizationException if implementation does not wish to expose
        * ACL to this getter.
        */
  -    public String getAllRights(String getter)
  -	throws AccessControlException, AuthorizationException;
  +    String getAllRights( String getter )
  +        throws AccessControlException, AuthorizationException;
   
  -
       /**
        * Retrieve rights which will always be granted to the specified identity.
        *
  @@ -140,9 +135,8 @@
        * @throws AuthorizationException if implementation does not wish to expose
        * ACL for this identity to this getter.
        */
  -    public String getRequiredRights(String getter, String identity)
  -	throws AccessControlException, AuthorizationException ;
  -
  +    String getRequiredRights( String getter, String identity )
  +        throws AccessControlException, AuthorizationException;
   
       /**
        * Retrieve rights which may be granted to the specified identity.
  @@ -157,10 +151,9 @@
        * @throws AuthorizationException if implementation does not wish to expose
        * ACL for this identity to this getter.
        */
  -    public String getOptionalRights(String getter, String identity)
  -	throws AccessControlException, AuthorizationException ;
  +    String getOptionalRights( String getter, String identity )
  +        throws AccessControlException, AuthorizationException;
   
  -
       /**
        * Helper boolean methods.
        * Provided for cases where you need to check the ACL before selecting the
  @@ -171,25 +164,21 @@
        * &throws AccessControlException if username does not have lookup rights.
        * (Except for hasLookupRights which just returns false.
        */
  -
  -
  -    public boolean hasReadRights(String username)
  -	throws AccessControlException;
  -    public boolean hasKeepSeenRights(String username)
  -	throws AccessControlException;
  -    public boolean hasWriteRights(String username)
  -	throws AccessControlException;
  -    public boolean hasInsertRights(String username)
  -	throws AccessControlException;
  -    public boolean hasDeleteRights(String username)
  -	throws AccessControlException ;
  -    public boolean hasAdminRights(String username)
  -	throws AccessControlException;
  -
  -
  -    public Set getUsersWithLookupRights();
  +    boolean hasReadRights( String username )
  +        throws AccessControlException;
  +    boolean hasKeepSeenRights( String username )
  +        throws AccessControlException;
  +    boolean hasWriteRights( String username )
  +        throws AccessControlException;
  +    boolean hasInsertRights( String username )
  +        throws AccessControlException;
  +    boolean hasDeleteRights( String username )
  +        throws AccessControlException;
  +    boolean hasAdminRights( String username )
  +        throws AccessControlException;
   
  -    public Set getUsersWithReadRights();
  +    Set getUsersWithLookupRights();
   
  +    Set getUsersWithReadRights();
   }
   
  
  
  

Mime
View raw message