Skip to content

Commit

Permalink
Add eperson search methods
Browse files Browse the repository at this point in the history
  • Loading branch information
abollini committed Jun 1, 2018
1 parent 3e7ab87 commit 84ce250
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import java.util.List;
import java.util.UUID;

import org.dspace.app.rest.Parameter;
import org.dspace.app.rest.SearchRestMethod;
import org.dspace.app.rest.converter.EPersonConverter;
import org.dspace.app.rest.exception.RESTAuthorizationException;
import org.dspace.app.rest.model.EPersonRest;
Expand All @@ -35,7 +37,7 @@
@Component(EPersonRest.CATEGORY + "." + EPersonRest.NAME)
public class EPersonRestRepository extends DSpaceRestRepository<EPersonRest, UUID> {
EPersonService es = EPersonServiceFactory.getInstance().getEPersonService();

@Autowired
AuthorizeService authorizeService;

Expand Down Expand Up @@ -74,6 +76,17 @@ public Page<EPersonRest> findAll(Context context, Pageable pageable) {
return page;
}

@SearchRestMethod(name = "byName")
public Page<EPersonRest> findByName(@Parameter(value = "q") String q,
Pageable pageable) {
return null;
}

@SearchRestMethod(name = "byEmail")
public EPersonRest findByEmail(@Parameter(value = "email") String email) {
return null;
}

@Override
public Class<EPersonRest> getDomainClass() {
return EPersonRest.class;
Expand Down

0 comments on commit 84ce250

Please sign in to comment.