PagingResults.getPage
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.alfresco.query.PagingResults.getPage(Showing top 15 results out of 315)

origin: Alfresco/community-edition-old

@Override
public List<PostInfo> getPage()
{
  List<PostInfo> posts = new ArrayList<PostInfo>();
  for (NodeBackedEntity node : results.getPage())
  {
    NodeRef nodeRef = node.getNodeRef();
    String name = node.getName();
    posts.add(buildPost(nodeRef, topic, name, null));
  }
  return posts;
}
 
origin: Alfresco/community-edition-old

public CollectionWithPagingInfo<Tag> getTags(StoreRef storeRef, Paging paging)
{
  PagingResults<Pair<NodeRef, String>> results = taggingService.getTags(storeRef, Util.getPagingRequest(paging));
  Integer totalItems = results.getTotalResultCount().getFirst();
  List<Pair<NodeRef, String>> page = results.getPage();
  List<Tag> tags = new ArrayList<Tag>(page.size());
  for(Pair<NodeRef, String> pair : page)
  {
    tags.add(new Tag(pair.getFirst(), pair.getSecond()));
  }
  return CollectionWithPagingInfo.asPaged(paging, tags, results.hasMoreItems(), (totalItems == null ? null : totalItems.intValue()));
}
 
origin: Alfresco/community-edition-old

/**
 * {@inheritDoc}
 */
// see getAuthorities (paged)
public Set<String> getAllAuthorities(AuthorityType type)
{
  List<String> auths = getAuthorities(type, null, null, false, false, new PagingRequest(0, Integer.MAX_VALUE, null)).getPage();
  Set<String> authorities = new HashSet<String>(auths.size());
  authorities.addAll(auths);
  return authorities;
}
 
origin: Alfresco/community-edition-old

private List<NodeRef> filterByAssocTypeAndCheck(NodeRef parentNodeRef, Set<QName> assocTypeQNames, Set<QName> childTypeQNames)
{
  PagingResults<NodeRef> results = list(parentNodeRef, -1, -1, 0, assocTypeQNames, childTypeQNames, null, null, null, null);
  assertTrue(results.getPage().size() > 0);
  
  List<NodeRef> childNodeRefs = results.getPage();
  return childNodeRefs;
}
 
origin: Alfresco/community-edition-old

  /**
   * Returns information regarding the top level containers for site 'siteId'.
   * 
   */
  @Override
  @WebApiDescription(title = "A paged list of site containers.")
  public CollectionWithPagingInfo<SiteContainer> readAll(String siteId, Parameters parameters) 
  {
    PagingResults<SiteContainer> siteContainers = sites.getSiteContainers(siteId, parameters.getPaging());
    return CollectionWithPagingInfo.asPaged(parameters.getPaging(), siteContainers.getPage(), siteContainers.hasMoreItems(), siteContainers.getTotalResultCount().getFirst());
  }
}
origin: Alfresco/community-edition-old

public void testALF12758()
{
  // test that the FileFolderService returns only cm:contains children
  PagingRequest pagingRequest = new PagingRequest(0, Integer.MAX_VALUE);
  PagingResults<FileInfo> pagingResults = fileFolderService.list(workingRootNodeRef1, true, true, null, null, null, pagingRequest);
  assertNotNull(pagingResults);
  assertNotNull(pagingResults.getPage());
  assertEquals(1, pagingResults.getPage().size());
}
 
origin: Alfresco/community-edition-old

  @Override
  public List<SiteContainer> doWork() throws Exception
  {
    PagingResults<FileInfo> results = siteService.listContainers(siteId, new PagingRequest(0, Integer.MAX_VALUE));
    List<SiteContainer> ret = new ArrayList<SiteContainer>(results.getPage().size());
    for(FileInfo fileInfo : results.getPage())
    {
      SiteContainer siteContainer = new SiteContainer(siteId, fileInfo.getName(), fileInfo.getNodeRef().getId());
      ret.add(siteContainer);
    }
    return ret;
  }
}, runAs.getId(), getId());
origin: Alfresco/community-edition-old

public Set<String> getAllAuthoritiesInZone(String zoneName, AuthorityType type)
{
  NodeRef zoneRef = getZone(zoneName);
  if (zoneRef == null)
  {
    return Collections.emptySet();
  }
  return new HashSet<String>(getAuthoritiesImpl(type, zoneRef, null, null, false,
      new PagingRequest(0, Integer.MAX_VALUE, null), new PagingResultsString()).getPage());
}
 
origin: Alfresco/community-edition-old

protected List<FileInfo> getFolders(NodeRef parent, String pattern)
{
  PagingResults<FileInfo> page = fileFolderService.list(parent, false, true, pattern, null, null, new PagingRequest(CannedQueryPageDetails.DEFAULT_PAGE_SIZE));
  List<FileInfo> folders = page.getPage();
  return folders;
}
origin: Alfresco/community-edition-old

public void testSetup() throws Exception
{
  NodeRef parentNodeRef = getOrCreateParentTestFolder("GetChildrenCannedQueryTest-"+TEST_RUN_ID);
  
  PagingResults<NodeRef> results = list(parentNodeRef, -1, -1, 0);
  assertTrue(results.getPage().size() > 3);
}
origin: Alfresco/community-edition-old

protected Map<String, Object> renderTopics(PagingResults<TopicInfo> topics,
   PagingRequest paging, SiteInfo site)
{
  return renderTopics(topics.getPage(), topics.getTotalResultCount(), paging, site);
}
/*
origin: Alfresco/community-edition-old

/**
 * Returns the list of authorities according the authority type and authority short name
 * @param type authority type
 * @param shortName authority short name
 * @return List of String authorities
 */
private List<String> getAuthorityByTypeAndShortName(AuthorityType type, String shortName)
{
  return  pubAuthorityService.getAuthorities(type, null, shortName, false, true, new PagingRequest(0, Integer.MAX_VALUE, null)).getPage();
}
origin: Alfresco/community-edition-old

protected List<FileInfo> getFiles(NodeRef parent, String pattern)
{
  PagingResults<FileInfo> page = fileFolderService.list(parent, true, false, pattern, null, null, new PagingRequest(CannedQueryPageDetails.DEFAULT_PAGE_SIZE));
  List<FileInfo> files = page.getPage();
  return files;
}
origin: Alfresco/community-edition-old

@Override
public List<LinkInfo> getPage()
{
  List<LinkInfo> links = new ArrayList<LinkInfo>();
  for (NodeBackedEntity node : results.getPage())
  {
   NodeRef nodeRef = node.getNodeRef();
   String name = node.getName();
   links.add(buildLink(nodeRef, container, name));
  }
  return links;
}

origin: Alfresco/community-edition-old

  private List<String> getAllAuthorities(AuthorityType type)
  {
    return pubAuthorityService.getAuthorities(type, null, null, false, true, new PagingRequest(0, Integer.MAX_VALUE, null)).getPage();
  }
}
org.alfresco.queryPagingResultsgetPage

Javadoc

Get the page of results.

Popular methods of PagingResults

  • getTotalResultCount
    Get the total result count assuming no paging applied. This value will only be available if the quer
  • hasMoreItems
    True if more items on next page. Note: could also return true if page was cutoff/trimmed for some re
  • getQueryExecutionId
    Get a unique ID associated with these query results. This must be available before and after executi

Popular classes and methods

  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • BorderLayout (java.awt)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Proxy (java.net)
    This class represents a proxy setting, typically a type (http, socks) and a socket address. A Proxy
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)