Package org.dspace.app.rest.utils
Class RestRepositoryUtils
- java.lang.Object
-
- org.dspace.app.rest.utils.RestRepositoryUtils
-
@Component public class RestRepositoryUtils extends Object
Collection of utility methods to work with the Rest Repositories- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
-
Constructor Summary
Constructors Constructor Description RestRepositoryUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectexecuteQueryMethod(DSpaceRestRepository repository, org.springframework.util.MultiValueMap<String,Object> parameters, Method method, org.springframework.data.domain.Pageable pageable, org.springframework.data.domain.Sort sort, org.springframework.data.web.PagedResourcesAssembler assembler)MethodgetLinkMethod(String methodName, LinkRestRepository linkRepository)MethodgetSearchMethod(String searchMethodName, DSpaceRestRepository repository)booleanhaveSearchMethods(DSpaceRestRepository repository)ObjectinvokeQueryMethod(DSpaceRestRepository repository, Method method, org.springframework.util.MultiValueMap<String,? extends Object> parameters, org.springframework.data.domain.Pageable pageable, org.springframework.data.domain.Sort sort)List<String>listSearchMethods(DSpaceRestRepository repository)
-
-
-
Method Detail
-
haveSearchMethods
public boolean haveSearchMethods(DSpaceRestRepository repository)
- Parameters:
repository-- Returns:
- if the repository have at least one search method
-
listSearchMethods
public List<String> listSearchMethods(DSpaceRestRepository repository)
- Parameters:
repository-- Returns:
- the names of the search methods if any. Otherwise an empty list
-
getSearchMethod
public Method getSearchMethod(String searchMethodName, DSpaceRestRepository repository)
- Parameters:
searchMethodName-repository-- Returns:
- the search method in the repository with the specified name or null if it is not found
-
executeQueryMethod
public Object executeQueryMethod(DSpaceRestRepository repository, org.springframework.util.MultiValueMap<String,Object> parameters, Method method, org.springframework.data.domain.Pageable pageable, org.springframework.data.domain.Sort sort, org.springframework.data.web.PagedResourcesAssembler assembler)
-
invokeQueryMethod
public Object invokeQueryMethod(DSpaceRestRepository repository, Method method, org.springframework.util.MultiValueMap<String,? extends Object> parameters, org.springframework.data.domain.Pageable pageable, org.springframework.data.domain.Sort sort)
-
getLinkMethod
public Method getLinkMethod(String methodName, LinkRestRepository linkRepository)
-
-