Examples of Folder


Examples of frost.messaging.frost.boards.Folder

        public void actionPerformed(final ActionEvent e) {
            if (e.getSource() == saveBoardsItem) {
                downloadBoards(null);
            } else if (e.getSource() == saveBoardsToFolderItem) {
                final TargetFolderChooser tfc = new TargetFolderChooser(mainFrame.getFrostMessageTab().getTofTreeModel());
                final Folder targetFolder = tfc.startDialog();
                if( targetFolder != null ) {
                    downloadBoards(targetFolder);
                }
            } else if( e.getSource() == addBoardsToKnownBoards ) {
                addBoardsToKnownBoards();
View Full Code Here

Examples of hidb2.kern.Folder

                  if (fd != null) // Ignore ListDescription
                    {
                    _cubicView.addFolderDescription(fd);
                    for (int id : fsr.getKeys())
                      {
                      Folder f = isCard ? das.find(cd, id) : das.find(fd, id);

                      _cubicView.addFolder(f);
                      }
                    }
                  }
View Full Code Here

Examples of javax.mail.Folder

    }

    HeadersHelper oHlpr = new HeadersHelper();
    String [] aMsgsXml = null;

    Folder oFldr = getFolder(sFolderName);

  oFldr.open (Folder.READ_ONLY);

  int iDeleted = 0;
  int iTotalCount = oFldr.getMessageCount();

  if (iTotalCount>0) {

      if (DebugFile.trace) DebugFile.writeln("Folder.getMessages("+String.valueOf(iTotalCount)+")");

      Message[] aMsgsObj = oFldr.getMessages();

      FetchProfile oFtchPrfl = new FetchProfile();
      oFtchPrfl.add(FetchProfile.Item.ENVELOPE);
      oFtchPrfl.add(FetchProfile.Item.CONTENT_INFO);
      oFtchPrfl.add(FetchProfile.Item.FLAGS);
      oFtchPrfl.add("X-Priority");
      oFtchPrfl.add("X-Spam-Flag");

      if (DebugFile.trace) {
        DebugFile.writeln("Folder.fetch(Message[], ENVELOPE & CONTENT_INFO & FLAGS)");
        oChMeter.start();
      }

      oFldr.fetch(aMsgsObj, oFtchPrfl);
     
      if (DebugFile.trace) {
        DebugFile.writeln(String.valueOf(iTotalCount)+" headers fetched in "+String.valueOf(oChMeter.stop()/1000l)+" seconds");
        oChMeter.start();
      }
       
      aMsgsXml = new String[iTotalCount];
      for (int m=0; m<iTotalCount; m++) {
        if (aMsgsObj[m].isSet(Flags.Flag.DELETED)) {
          iDeleted++;
        } else {
          oHlpr.setMessage((MimeMessage) aMsgsObj[m]);
          aMsgsXml[m-iDeleted] = oHlpr.toXML();
        } // fi
      } // next (m)
     
      aMsgsObj = null;

    if (iDeleted>0) aMsgsXml = Arrays.copyOfRange(aMsgsXml, 0, iTotalCount-iDeleted);

      if (DebugFile.trace) {
        DebugFile.writeln(String.valueOf(iTotalCount-iDeleted)+" messages to XML in "+String.valueOf(oChMeter.stop())+" ms");
      }

  } // fi (iTotalCount>0)
  oFldr.close(false);

    if (DebugFile.trace) {
      DebugFile.decIdent();
      if (null==aMsgsXml)
        DebugFile.writeln("End SessionHandler.listFolderMessages() : 0");
View Full Code Here

Examples of javax.mail.Folder

    }

    HeadersHelper oHlpr = new HeadersHelper();
    String [] aMsgsXml = null;

    Folder oFldr = getFolder(sFolderName);

  oFldr.open (Folder.READ_ONLY);

  int iTotalCount = oFldr.getMessageCount();

    if (DebugFile.trace) DebugFile.writeln(String.valueOf(iTotalCount)+" messages found at "+sFolderName);

  if (iTotalCount>0) {
    LinkedList<String> oList = new LinkedList<String>();
    int iLowerBound = iTotalCount-iMaxMsgs;
    if (iLowerBound<0) iLowerBound = 0;
    for (int m=iTotalCount-1; m>=iLowerBound && oList.size()<iMaxMsgs; m--) {
      if (DebugFile.trace) DebugFile.writeln("getting message "+String.valueOf(m));
      try {
        Message oMsgObj = oFldr.getMessage(m);

          if (!oMsgObj.isSet(Flags.Flag.DELETED) && !oMsgObj.isSet(Flags.Flag.ANSWERED)) {
            String sSpamFlag = ((MimeMessage) oMsgObj).getHeader("X-Spam-Flag","");
            if (sSpamFlag==null) sSpamFlag = "";
            if (!sSpamFlag.equalsIgnoreCase("YES")) {
              oHlpr.setMessage((MimeMessage) oMsgObj);
              String sMsgXML = oHlpr.toXML();
          oList.add(sMsgXML);
            }
          } // fi
      } catch (ArrayIndexOutOfBoundsException aiob) {
      if (DebugFile.trace) DebugFile.writeln("Folder.getMessage("+String.valueOf(m)+") ArrayIndexOutOfBoundsException");
      }
    } // next (m)
    if (oList.size()>0) {
      aMsgsXml = new String [oList.size()];
      aMsgsXml = oList.toArray(aMsgsXml);
    }
  } // fi (iTotalCount>0)
    oFldr.close(false);

    if (DebugFile.trace) {
      DebugFile.decIdent();
      if (null==aMsgsXml)
        DebugFile.writeln("End SessionHandler.listFolderMessages() : 0");
View Full Code Here

Examples of javax.mail.Folder

   public EmailData[] readInbox(boolean clear) throws XmlBlasterException {
      // if (isShutdown()) Does it recover automatically after a shutdown?
      // throw new XmlBlasterException(glob, ErrorCode.INTERNAL_ILLEGALSTATE,
      // Pop3Driver.class.getName(), "The plugin is shutdown");
      Store store = null;
      Folder inbox = null;
      try {
         store = getStore();
         Folder root = store.getDefaultFolder();
         inbox = root.getFolder(POP3_FOLDER);
         inbox.open(Folder.READ_WRITE);
         Message[] msgs = inbox.getMessages();
         if (msgs == null)
            msgs = new Message[0];
View Full Code Here

Examples of javax.mail.Folder

               });
            }
            store.connect();
         }

         Folder folder = store.getDefaultFolder();
         if (folder == null) {
            System.out.println("No default folder");
            System.exit(1);
         }

         folder = folder.getFolder(mbox);
         if (folder == null) {
            System.out.println("Invalid folder");
            System.exit(1);
         }

         // try to open read/write and if that fails try read-only
         try {
            folder.open(Folder.READ_WRITE);
         } catch (MessagingException ex) {
            folder.open(Folder.READ_ONLY);
         }
         int totalMessages = folder.getMessageCount();

         if (totalMessages == 0) {
            System.out.println("Empty folder");
            folder.close(false);
            store.close();
            System.exit(1);
         }

         if (verbose) {
            int newMessages = folder.getNewMessageCount();
            System.out.println("Total messages = " + totalMessages);
            System.out.println("New messages = " + newMessages);
            System.out.println("===============================");
         }

         // Attributes & Flags for all messages ..
         Message[] msgs = folder.getMessages();

         // Use a suitable FetchProfile
         FetchProfile fp = new FetchProfile();
         fp.add(FetchProfile.Item.ENVELOPE);
         fp.add(FetchProfile.Item.FLAGS);
         fp.add("X-Mailer");
         folder.fetch(msgs, fp);

         for (int i = 0; i < msgs.length; i++) {
            int level = 0;
            System.out.println("\n=========MESSAGE #" + (i + 1) + ":=================");
            dumpEnvelope(msgs[i], level);
            level = dumpPart(msgs[i], level);
         }

         folder.close(false);
         store.close();
      } catch (Exception ex) {
         System.out.println("Oops, got exception! " + ex.getMessage());
         ex.printStackTrace();
         System.exit(1);
View Full Code Here

Examples of jease.cms.domain.Folder

      int lastSlash = path.lastIndexOf("/");
      if (lastSlash != -1) {
        String parentPath = path.substring(0, lastSlash);
        String filename = path.substring(lastSlash + 1, path.length());
        makeFolders(relativeRoot, parentPath, editor);
        Folder newFolder = newFolder(filename);
        newFolder.setEditor(editor);
        if (editor.getRole().containsType(newFolder.getClass())) {
          Nodes.append(
              relativeRoot.getChild(Filenames.asId(parentPath)),
              newFolder);
        } else {
          throw new NodeException.IllegalNesting();
        }
      } else {
        Folder newFolder = newFolder(path);
        newFolder.setEditor(editor);
        if (editor.getRole().containsType(newFolder.getClass())) {
          Nodes.append(relativeRoot, newFolder);
        } else {
          throw new NodeException.IllegalNesting();
        }
      }
View Full Code Here

Examples of net.jcores.utils.Folder

    public CoreObject<T> fold(final F2ReduceObjects<T> f, Option... options) {

        // In case we only have zero or one elements, don't do anything
        if (size() <= 1) return this;

        final Folder folder = new Folder(null, size()) {
            @Override
            public void handle(int i, int j, int destination) {
                // Get our target-array (if it is already there)
                T[] a = (T[]) this.array.get();

                // Get the in-value from the source-array
                final T ii = a[i];
                final T jj = a[j];

                if (ii == null && jj == null) return;
                if (ii == null && jj != null) {
                    a[destination] = jj;
                    return;
                }

                if (ii != null && jj == null) {
                    a[destination] = ii;
                    return;
                }

                a[destination] = f.f(ii, jj);
            }
        };

        // Update the target array and fold ...
        folder.updateArray(Arrays.copyOf(this.t, size()));

        // Now do fold ...
        fold(folder, options);

        // ... and return result.
        return new CoreObject<T>(this.commonCore, Arrays.copyOf((T[]) folder.getTargetArray(), 1));
    }
View Full Code Here

Examples of net.rim.blackberry.api.mail.Folder

        //add the file to the multipart
        mp.addBodyPart(tbp);
        mp.addBodyPart(sap);

        //create a message in the sent items folder
        Folder folders[] = Session.getDefaultInstance().getStore().list(Folder.SENT);

        Message message = new Message(folders[0]);
        Address toAdd = new Address(email,"my email");
        Address toAdds[] = new Address[1];
        toAdds[0] = toAdd;
View Full Code Here

Examples of net.sf.archimede.model.folder.Folder

           
            Collection groupCollection = getGroupInRepository();
            if (groupCollection != null) {
                Collection seriesCollection = getSeriesInRepository(groupCollection);
                if (seriesCollection != null) {
                    Folder folder = getFolderInRepository(seriesCollection);
                    this.exists = Boolean.valueOf(folder != null);
                }
            }           
        }
        return this.exists.booleanValue();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.