Ejemplo n.º 1
0
  // FIXME: This API should be changed to return a List.
  @SuppressWarnings("unchecked")
  public Collection listAttachments(WikiPage wikipage) throws ProviderException {
    if (m_provider == null) {
      return new ArrayList();
    }

    Collection atts = m_provider.listAttachments(wikipage);

    //
    //  This is just a sanity check; all of our providers return a Collection.
    //
    if (atts instanceof List) {
      m_engine.getPageSorter().sortPages((List) atts);
    }

    return atts;
  }