/** * {@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; }
@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; }
/** * {@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; }
@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; }
@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; }
@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; }
@Override public List<Pair<TopicInfo,Integer>> getPage() { List<Pair<TopicInfo,Integer>> topics = new ArrayList<Pair<TopicInfo,Integer>>(); for (NodeWithChildrenEntity node : results.getPage()) { NodeRef nodeRef = node.getNodeRef(); String name = node.getName(); int count = node.getChildren().size(); TopicInfo topic = buildTopic(nodeRef, container, name); topics.add(new Pair<TopicInfo,Integer>(topic, count)); } return topics; }
/** * @param remoteSystemId String */ @Override public List<OAuth1CredentialsInfo> listSharedOAuth1Credentials(String remoteSystemId) throws NoSuchSystemException { PagingRequest paging = new PagingRequest(CannedQueryPageDetails.DEFAULT_PAGE_SIZE); @SuppressWarnings("unchecked") PagingResults<OAuth1CredentialsInfo> pagingResults = (PagingResults<OAuth1CredentialsInfo>) remoteCredentialsService .listSharedCredentials(remoteSystemId, RemoteCredentialsModel.TYPE_OAUTH1_CREDENTIALS, paging); return pagingResults.getPage(); }
/** * @param remoteSystemId String */ @Override public List<OAuth2CredentialsInfo> listSharedOAuth2Credentials(String remoteSystemId) throws NoSuchSystemException { PagingRequest paging = new PagingRequest(CannedQueryPageDetails.DEFAULT_PAGE_SIZE); @SuppressWarnings("unchecked") PagingResults<OAuth2CredentialsInfo> pagingResults = (PagingResults<OAuth2CredentialsInfo>) remoteCredentialsService .listSharedCredentials(remoteSystemId, RemoteCredentialsModel.TYPE_OAUTH2_CREDENTIALS, paging); return pagingResults.getPage(); }
/** * @param remoteSystemId String */ @Override public List<OAuth2CredentialsInfo> listSharedOAuth2Credentials(String remoteSystemId) throws NoSuchSystemException { PagingRequest paging = new PagingRequest(CannedQueryPageDetails.DEFAULT_PAGE_SIZE); @SuppressWarnings("unchecked") PagingResults<OAuth2CredentialsInfo> pagingResults = (PagingResults<OAuth2CredentialsInfo>) remoteCredentialsService .listSharedCredentials(remoteSystemId, RemoteCredentialsModel.TYPE_OAUTH2_CREDENTIALS, paging); return pagingResults.getPage(); }
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; }
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()); }
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()); }
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; }
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; }
/** * 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(); }
private List<String> getAllAuthorities(AuthorityType type) { return pubAuthorityService.getAuthorities(type, null, null, false, true, new PagingRequest(0, Integer.MAX_VALUE, null)).getPage(); } }
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()); }
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); }
public Void execute() throws Throwable { PagingResults<SiteInfo> sites = SITE_SERVICE.listSites(null, null, new PagingRequest(0, 1024)); Map<String, SiteInfo> sitesByName = new HashMap<String, SiteInfo>(); for (SiteInfo site : sites.getPage()) { sitesByName.put(site.getShortName(), site); } assertNotNull("st:site missing.", sitesByName.get(TEST_SITE_NAME)); assertNotNull("subtype of st:site missing.", sitesByName.get(TEST_SUB_SITE_NAME)); return null; } });