Package com.stimulus.archiva.exception

Examples of com.stimulus.archiva.exception.ArchivaException


      status.finish();
  }

  public static void indexAllVolumes(Principal principal, IndexStatus status) throws ArchivaException {
      if (status == null )
        throw new ArchivaException("assertion failure: null status",logger);
      status.start();
      audit.info("index all volumes {"+principal+"}");
    logger.debug("index all volumes {"+principal+"}");
      List<Volume> volumes = ConfigurationService.getConfig().getVolumes().getVolumes();
      for (Volume v : volumes)
View Full Code Here


 

  public static MessageExtraction extractMessage(Email message, String baseURL, boolean isOriginalMessage) throws ArchivaException {
      if (message == null || baseURL == null )
        throw new ArchivaException("assertion failure: null message or baseURL",logger);
 
      logger.debug("extractMessage() {"+message+"}");
      InputStream is = null;
     
    if (isOriginalMessage) {
View Full Code Here

      store = session.getStore(urln);
      store.connect();
    }
    catch (Exception e)
    {
      throw new ArchivaException("unable to connect to mail server.", e, log);
    }

    try
    {
      // Open the Folder
      inboxFolder = store.getDefaultFolder();

      if (inboxFolder == null) { throw new ArchivaException("there was no default inbox folder found.", log); }

      inboxFolder = inboxFolder.getFolder("INBOX");
      if (inboxFolder == null) { throw new ArchivaException("the inbox folder does not exist.", log); }

      inboxFolder.open(Folder.READ_WRITE);
    }
    catch (Exception e)
    {
      throw new ArchivaException("unable to open folder. ", e, log);
    }
  }
View Full Code Here

    {
      inboxFolder.close(true);
    }
    catch (Exception e)
    {
      throw new ArchivaException("unable to close the mail folder. ", e, log);
    }

    try
    {
      store.close();
    }
    catch (Exception e)
    {
      throw new ArchivaException("unable to disconnect from the mail folder. ", e, log);
    }
  }
View Full Code Here

    {
      url = new URL(mailArchivaServerURL);
    }
    catch (Exception e)
    {
      throw new ArchivaException("mailarchiva server URL malformed", e, log);
    }
    int port = 0;

    if (portSpecified) port = url.getPort();
    else port = 8090;
View Full Code Here

           logger.debug("copyFile {source='"+in.getAbsolutePath()+"',dest='"+out.getAbsolutePath()+"'}");
             inChannel = new FileInputStream(in).getChannel();
             outChannel = new FileOutputStream(out).getChannel();
             inChannel.transferTo(0, inChannel.size(),outChannel);
         } catch (IOException io) {
            throw new ArchivaException("failed to copy file:"+io.getMessage(),io,logger);
        } finally {
            if (inChannel != null) try { inChannel.close(); } catch (Exception e) {}
            if (outChannel != null) try outChannel.close(); } catch (Exception e) {}
        }
    }
View Full Code Here

TOP

Related Classes of com.stimulus.archiva.exception.ArchivaException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.