use of org.alfresco.repo.tenant.Network in project alfresco-remote-api by Alfresco.
the class PublicApiAlfrescoCmisService method getRepositoryInfos.
@Override
public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
// for currently authenticated user
PagingResults<Network> networks = networksService.getNetworks(new PagingRequest(0, Integer.MAX_VALUE));
List<Network> page = networks.getPage();
final List<RepositoryInfo> repoInfos = new ArrayList<RepositoryInfo>(page.size() + 1);
for (Network network : page) {
repoInfos.add(getRepositoryInfo(network));
}
return repoInfos;
}
use of org.alfresco.repo.tenant.Network in project alfresco-remote-api by Alfresco.
the class PublicApiAlfrescoCmisService method getRepositoryInfo.
@Override
public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
Network network = null;
try {
checkRepositoryId(repositoryId);
network = networksService.getNetwork(repositoryId);
} catch (Exception e) {
// ACE-2540: Avoid information leak. Same response if repository does not exist or if user is not a member
throw new CmisObjectNotFoundException("Unknown repository '" + repositoryId + "'!");
}
return getRepositoryInfo(network);
}
Aggregations