public class ApiController extends AbstractApiController
RequestMapping with ':.+' (see
http://stackoverflow.com
/questions/3526523/spring-mvc-pathvariable-getting-truncated)| Modifier and Type | Field and Description |
|---|---|
protected EngineBlock |
engineBlock |
static String |
GROUP_ID_SELF |
protected GroupProviderConfiguration |
groupProviderConfiguration |
protected GroupService |
groupService |
static String |
PERSON_ID_SELF |
protected PersonService |
personService |
protected TeamExternalGroupDao |
teamExternalGroupDao |
| Constructor and Description |
|---|
ApiController() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addApiCallLogInfo(nl.surfnet.coin.shared.log.ApiCallLog log)
Hook for subclasses to change the log record
|
protected List<GroupProvider> |
getAllAllowedGroupProviders(GroupProviderConfiguration.Service service) |
Group20Entry |
getGroup(String userId,
String groupId) |
Object |
getGroupMembers(String userId,
String groupId,
Integer count,
Integer startIndex,
String sortBy) |
Group20Entry |
getGroups(String userId,
Integer count,
Integer startIndex,
String sortBy) |
GroupEntry |
getOsGroups(String userId,
Integer count,
Integer startIndex,
String sortBy) |
PersonEntry |
getPerson(String userId) |
Object |
handleException(RuntimeException e)
Handler for RuntimeExceptions.
|
protected void |
invariant() |
protected void |
logApiCall(String onBehalfOf) |
protected void |
sendAclMissingMail(GroupProvider groupProvider,
String spEntityId,
String identifier,
GroupProviderConfiguration.Service service) |
protected void |
setResultOptions(AbstractEntry entry,
Integer count,
Integer startIndex,
String sortBy) |
getClientMetaData, getOnBehalfOf, preflightCORSpublic static final String GROUP_ID_SELF
public static final String PERSON_ID_SELF
protected PersonService personService
protected GroupService groupService
protected EngineBlock engineBlock
protected GroupProviderConfiguration groupProviderConfiguration
@Autowired protected TeamExternalGroupDao teamExternalGroupDao
@RequestMapping(method=GET,
value="/people/{userId:.+}")
@ResponseBody
public PersonEntry getPerson(@PathVariable(value="userId")
String userId)
@RequestMapping(method=GET,
value="/people/{userId:.+}/{groupId:.+}")
@ResponseBody
public Object getGroupMembers(@PathVariable(value="userId")
String userId,
@PathVariable(value="groupId")
String groupId,
@RequestParam(value="count",required=false)
Integer count,
@RequestParam(value="startIndex",required=false)
Integer startIndex,
@RequestParam(value="sortBy",required=false)
String sortBy)
@RequestMapping(method=GET,
value="/groups/{userId:.+}")
@ResponseBody
public Group20Entry getGroups(@PathVariable(value="userId")
String userId,
@RequestParam(value="count",required=false)
Integer count,
@RequestParam(value="startIndex",required=false)
Integer startIndex,
@RequestParam(value="sortBy",required=false)
String sortBy)
@RequestMapping(method=GET,
value="/osgroups/{userId:.+}")
@ResponseBody
public GroupEntry getOsGroups(@PathVariable(value="userId")
String userId,
@RequestParam(value="count",required=false)
Integer count,
@RequestParam(value="startIndex",required=false)
Integer startIndex,
@RequestParam(value="sortBy",required=false)
String sortBy)
@RequestMapping(method=GET,
value="/groups/{userId:.+}/{groupId}")
@ResponseBody
public Group20Entry getGroup(@PathVariable(value="userId")
String userId,
@PathVariable(value="groupId")
String groupId)
@ResponseStatus(value=NOT_FOUND) @ResponseBody @ExceptionHandler(value=java.lang.RuntimeException.class) public Object handleException(RuntimeException e)
e - the exceptionprotected void setResultOptions(AbstractEntry entry, Integer count, Integer startIndex, String sortBy)
protected void invariant()
protected void sendAclMissingMail(GroupProvider groupProvider, String spEntityId, String identifier, GroupProviderConfiguration.Service service)
protected List<GroupProvider> getAllAllowedGroupProviders(GroupProviderConfiguration.Service service)
protected void logApiCall(String onBehalfOf)
protected void addApiCallLogInfo(nl.surfnet.coin.shared.log.ApiCallLog log)
log - the log recordCopyright © 2009-2013 SURFnet bv, The Netherlands. All Rights Reserved.