/**
  * Return the titles in the set.
  *
  * @return a collection of TitleConfig
  */
 public Collection<TitleConfig> getTitles() {
   Collection aus = daemon.getRemoteApi().getInactiveAus();
   ArrayList<TitleConfig> res = new ArrayList<TitleConfig>(aus.size());
   for (Iterator iter = aus.iterator(); iter.hasNext(); ) {
     InactiveAuProxy aup = (InactiveAuProxy) iter.next();
     res.add(titleConfigFromAu(aup));
   }
   res.trimToSize();
   return res;
 }
Example #2
0
  private V3LcapMessage makeTestVoteMessage(Collection voteBlocks) throws IOException {
    mPollMgr.setStateDir("key", tempDir);
    V3LcapMessage msg =
        new V3LcapMessage(
            "ArchivalID_2",
            "key",
            "Plug42",
            m_testBytes,
            m_testBytes,
            V3LcapMessage.MSG_VOTE,
            987654321,
            m_testID,
            tempDir,
            theDaemon);

    // Set msg vote blocks.
    for (Iterator ix = voteBlocks.iterator(); ix.hasNext(); ) {
      msg.addVoteBlock((VoteBlock) ix.next());
    }

    msg.setHashAlgorithm(LcapMessage.getDefaultHashAlgorithm());
    msg.setArchivalId(m_archivalID);
    msg.setPluginVersion("PlugVer42");
    return msg;
  }