You are viewing limited content. For full access, please sign in.

Question

Question

Get a Repository LIst

SDK
asked on March 17, 2015

Greetings,

This is a question resulting from a bad memory.  Several years ago I created a list that showed the available repositories.  After selecting the repository the user is prompted to login.  Similar to the thick client login. 

I would like to get a listing of the available repositories using RA. 

 

Thanks

Phil

1 0

Replies

replied on March 17, 2015

There's a GetRepositories on the Server object in RepositoryAccess (RA).

// Using the Server object to retrieve list of repositories
Server myServ = new Server("MyServerName");
RepositoryRegistrationCollection repoRegColl = myServ.GetRepositories();

 

1 0
replied on April 8, 2020 Show version history

Hi,

 

Does Server object exist in 10.2? I looked inside RA and can't find it there. I was wondering if anybody could show me its equivalent in 10.2. I would to retrieve the list or repositories in a given server with the use of Java. Anybody can help me? thanks.

0 0
replied on April 8, 2020

Java does not use the .net RA DLL.  Instead, it uses the JRA .jar and not all the .net methods, functions, and properties are available in JRA.  I am not a Java coder and have not tried to duplicate this functionality, but from what I see in the help files, there is no server object and both the RepositoryRegistration and Session objects only return the name of the server and repository that they are connected to.  I do not find any object to return a list of available repositories on a servers, though my guess is that it would be done through a HttpConnection object using the createRequest method, but I find no documentation on the HttpRequest verbs or construction.

 

0 0
replied on March 17, 2015

RA?

replied on March 17, 2015

And if you want to have a server selection prior to the repository selection, you can do something like:

            Dim AllServers As ServerCollection = Server.GetAllServers()
            For Each Svr As Server In AllServers
                Dim sName As String = Nothing
                If Svr.Port = 80 Then
                    sName = Svr.Name
                Else
                    sName = Svr.Name & ":" & Svr.Port.ToString
                End If
                If Not cmbLFServer.Items.Contains(sName) Then
                    ' Add server to combobox drop down list
                    cmbLFServer.Items.Add(sName)
                End If
            Next

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.