james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject cvs commit: jakarta-james/src/java/org/apache/mailet MailetContext.java
Date Mon, 06 Jan 2003 15:54:14 GMT
danny       2003/01/06 07:54:14

  Modified:    src/java/org/apache/james James.java
               src/java/org/apache/mailet MailetContext.java
  Log:
  removing avalon dependance in mailets.
  Step five introduce MailetContext().getUserRepository(String name)
  
  Revision  Changes    Path
  1.37      +10 -5     jakarta-james/src/java/org/apache/james/James.java
  
  Index: James.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/James.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- James.java	6 Jan 2003 12:39:31 -0000	1.36
  +++ James.java	6 Jan 2003 15:54:14 -0000	1.37
  @@ -324,7 +324,7 @@
               throw e;
           }
           //}
  -        compMgr.put( UsersRepository.ROLE, (Component)localusers);
  +        compMgr.put( "org.apache.mailet.UsersRepository", (Component)localusers);
           getLogger().info("Local users repository opened");
   
           Configuration inboxConf = conf.getChild("inboxRepository");
  @@ -850,9 +850,7 @@
           }
   
           try {
  -            // Instantiate the a MailRepository for outgoing mails
  -            MailStore mailstore = (MailStore) compMgr.lookup("org.apache.james.services.MailStore");
  -
  +            
               DefaultConfiguration spoolConf
                   = new DefaultConfiguration("repository", "generated by Context");
               spoolConf.setAttribute("destinationURL", specificationURL);
  @@ -873,6 +871,13 @@
        */
       public MailRepository getMailRepository(String specificationURL) throws MessagingException
{
           return getRepository(specificationURL,MailRepository.MAIL);
  +    }
  +
  +    /**
  +     * @see org.apache.mailet.MailetContext#getUserRepository(String)
  +     */
  +    public UsersRepository getUserRepository(String respositoryName) throws MessagingException
{
  +        return usersStore.getRepository(respositoryName);
       }
   
   }
  
  
  
  1.7       +1 -1      jakarta-james/src/java/org/apache/mailet/MailetContext.java
  
  Index: MailetContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/mailet/MailetContext.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MailetContext.java	6 Jan 2003 12:39:31 -0000	1.6
  +++ MailetContext.java	6 Jan 2003 15:54:14 -0000	1.7
  @@ -232,5 +232,5 @@
   
       MailRepository getMailRepository(String specificationURL) throws MessagingException;
       SpoolRepository getMailSpool(String specificationURL) throws MessagingException;
  -//void getUserRepository() throws MessagingException;
  +    UsersRepository getUserRepository(String repositoryName) throws MessagingException;
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message