artifactory-client-java icon indicating copy to clipboard operation
artifactory-client-java copied to clipboard

listRemoteFolderItems can be accessed in multiple ways

Open dodie opened this issue 4 years ago • 0 comments

In the Java API there are two ways to get or set a remote repository's listRemoteFolderItems property, one via the RemoteRepository class, and one via the RepositorySettings class. E.g.:

RemoteRepository repo = /* ... a generic remote repository ...*/;

repo.isListRemoteFolderItems(); // 1
((GenericRepositorySettings)repo.getRepositorySettings()).getListRemoteFolderItems(); // 2

When I check the REST API of Artifactory, there's only a single related property, so it's a bit confusing to have two ways of accessing it.

More importantly, it seems that the two properties work a differently:

  • When I read a remote repository from Artifactory, both properties are set according to the value on the server.
  • When I write the repository, it ignores the property on the RemoteRepository object and uses the value defined for the RepositorySettings object.

Which of these properties should be used? Is it ok in all cases to just use the property in the RepositorySettings object and simply ignore the property on the RemoteRepository?

If so, would it be possible to change artifactory-client-java and remove the unnecessary one?

dodie avatar Jan 06 '22 17:01 dodie