|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.surfnet.coin.api.service.MockServiceImpl
@Component(value="mockService") public class MockServiceImpl
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface nl.surfnet.coin.api.GroupProviderConfiguration |
|---|
GroupProviderConfiguration.Service |
| Field Summary |
|---|
| Fields inherited from interface nl.surfnet.coin.api.GroupProviderConfiguration |
|---|
INTERNAL_GROUP_PATTERN |
| Constructor Summary | |
|---|---|
MockServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
addGroup(Group20 group)
|
void |
addPerson(Person person)
|
void |
addPersonToGroup(String personId,
String groupId)
|
Group20Entry |
addUrnPartForGrouper(List<GroupProvider> groupProviders,
Group20Entry group20Entry)
Add to all the groups the conext urn part for grouper |
String |
cutOffUrnPartForGrouper(List<GroupProvider> groupProviders,
String groupId)
Strip the urn part off the groupId |
List<GroupProvider> |
getAllGroupProviders()
Get all group providers |
List<GroupProvider> |
getAllowedGroupProviders(GroupProviderConfiguration.Service service,
String spEntityId,
List<GroupProvider> allGroupProviders)
Get all GroupProviders that have the correct ACL configured based on the Service. |
GroupEntry |
getGroup(String userId,
String groupId,
String onBehalfOf)
Get specific Group |
Group20 |
getGroup20(GroupProvider groupProvider,
String userId,
String groupId)
Get a single group |
Group20Entry |
getGroup20(String userId,
String groupId,
String onBehalfOf)
Get specific Group |
Group20Entry |
getGroup20Entry(GroupProvider groupProvider,
String userId,
int limit,
int offset)
|
GroupMembersEntry |
getGroupMembers(String groupId,
String onBehalfOf,
String spEntityId,
Integer count,
Integer startIndex,
String sortBy)
Get the group members of the given group. |
GroupMembersEntry |
getGroupMembersEntry(GroupProvider groupProvider,
String onBehalfOf,
String groupId,
int limit,
int offset)
Gets group members with paginating information for the user's oauth configuration |
GroupEntry |
getGroups(String userId,
String onBehalfOf,
Integer count,
Integer startIndex,
String sortBy)
Get Persons' Groups |
Group20Entry |
getGroups20(String userId,
String onBehalfOf,
Integer count,
Integer startIndex,
String sortBy)
Get Persons' Groups |
Group20Entry |
getGroups20ByIds(String personId,
String[] ids,
Integer count,
Integer startIndex)
Get a list of Group20's by the given list of group ids |
PersonEntry |
getPerson(String userId,
String loggedInUser,
String spEntityId)
Get the OpenSocial Person. |
boolean |
isActive()
|
boolean |
isCallAllowed(GroupProviderConfiguration.Service service,
String spEntityId,
GroupProvider groupProvider)
Is the call allowed? e.g. |
boolean |
isInternalGroup(String groupId)
Verify if the given groupId is from an internal e.g. |
protected List<? extends Object> |
processQueryOptions(AbstractEntry parent,
Integer count,
Integer startIndex,
String sortBy,
List<? extends Object> entry)
Filter/mangle a result set based on query parameters |
void |
reset()
|
void |
setActive(boolean isActive)
|
void |
sleep(long millSeconds)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockServiceImpl()
| Method Detail |
|---|
public PersonEntry getPerson(String userId,
String loggedInUser,
String spEntityId)
PersonService
getPerson in interface PersonServiceuserId - the unique identifierloggedInUser - the unique identifier of the user on behalf of whom the request is made.spEntityId - the entity that performs the request
PersonEntry
public GroupMembersEntry getGroupMembers(String groupId,
String onBehalfOf,
String spEntityId,
Integer count,
Integer startIndex,
String sortBy)
PersonService
getGroupMembers in interface PersonServicegroupId - String the unique identifier for the grouponBehalfOf - the unique identifier of the user on behalf of whom the request is made.spEntityId - the entity that performs the requestcount - nr of records to fetchstartIndex - first record nr.sortBy - field to sort by.
ArrayList containing Person's
public GroupEntry getGroups(String userId,
String onBehalfOf,
Integer count,
Integer startIndex,
String sortBy)
GroupService
getGroups in interface GroupServiceuserId - the unique identifieronBehalfOf - the unique identifier of the user that is going to make the
requestcount - nr of records to returnstartIndex - first record of result setsortBy - field to sort by
List containing the Groups
public Group20Entry getGroups20(String userId,
String onBehalfOf,
Integer count,
Integer startIndex,
String sortBy)
GroupService
getGroups20 in interface GroupServiceuserId - the unique identifieronBehalfOf - the unique identifier of the user that is going to make the
requestcount - nr of records to returnstartIndex - first record of result setsortBy - field to sort by
List containing the Groups
public GroupEntry getGroup(String userId,
String groupId,
String onBehalfOf)
GroupService
getGroup in interface GroupServiceuserId - the unique identifiergroupId - the unique identifieronBehalfOf - the unique identifier of the user that is going to make the
request
public Group20Entry getGroup20(String userId,
String groupId,
String onBehalfOf)
GroupService
getGroup20 in interface GroupServiceuserId - the unique identifiergroupId - the unique identifieronBehalfOf - the unique identifier of the user that is going to make the
request
public Group20Entry getGroups20ByIds(String personId,
String[] ids,
Integer count,
Integer startIndex)
GroupService
getGroups20ByIds in interface GroupServicepersonId - the personIdids - the array of idscount - nr of records to returnstartIndex - first record of result set
public boolean isActive()
public void setActive(boolean isActive)
public void reset()
reset in interface ConfigurableGroupProviderpublic void addPerson(Person person)
addPerson in interface ConfigurableGroupProviderpublic void addGroup(Group20 group)
addGroup in interface ConfigurableGroupProvider
public void addPersonToGroup(String personId,
String groupId)
addPersonToGroup in interface ConfigurableGroupProvider
protected List<? extends Object> processQueryOptions(AbstractEntry parent,
Integer count,
Integer startIndex,
String sortBy,
List<? extends Object> entry)
parent - the root object; effectively this parameter is altered by setting
the totalResults propertycount - nr of records to fetchstartIndex - the start indexsortBy - field to sort byentry - the result list of entries
public void sleep(long millSeconds)
sleep in interface ConfigurableGroupProviderpublic boolean isInternalGroup(String groupId)
GroupProviderConfiguration
isInternalGroup in interface GroupProviderConfigurationgroupId - the group identifier
public List<GroupProvider> getAllowedGroupProviders(GroupProviderConfiguration.Service service,
String spEntityId,
List<GroupProvider> allGroupProviders)
GroupProviderConfigurationSecurityContextHolder.getContext().getAuthentication().getPrincipal()
context
getAllowedGroupProviders in interface GroupProviderConfigurationservice - the ACL to check forspEntityId - the entity of the Service providerallGroupProviders - all of the Group Providers
public List<GroupProvider> getAllGroupProviders()
GroupProviderConfiguration
getAllGroupProviders in interface GroupProviderConfiguration
public boolean isCallAllowed(GroupProviderConfiguration.Service service,
String spEntityId,
GroupProvider groupProvider)
GroupProviderConfigurationServiceProviderGroupAcl for
the given GroupProviderConfiguration.Service and GroupProvider
isCallAllowed in interface GroupProviderConfigurationservice - the ACL to check forspEntityId - the entity of the Service provider
public GroupMembersEntry getGroupMembersEntry(GroupProvider groupProvider,
String onBehalfOf,
String groupId,
int limit,
int offset)
GroupProviderConfiguration
getGroupMembersEntry in interface GroupProviderConfigurationgroupProvider - GroupProvider for the settingsgroupId - the groupId as we know it in SURFconext context (e.g.
urn:collab:group:myuniversity.nl:testgroup)limit - maximum number of itemsoffset - starting point for paging
GroupMembersEntry, can be null
public Group20Entry getGroup20Entry(GroupProvider groupProvider,
String userId,
int limit,
int offset)
getGroup20Entry in interface GroupProviderConfigurationgroupProvider - GroupProvider for the settingsuserId - the userId as we know it in SURFconext context (e.g.
urn:collab:person:myuniversity.nl:testuser)limit - maximum number of itemsoffset - starting point for paging
Group20Entry, can be null
public String cutOffUrnPartForGrouper(List<GroupProvider> groupProviders,
String groupId)
GroupProviderConfiguration
cutOffUrnPartForGrouper in interface GroupProviderConfigurationgroupProviders - all groupPrvidersgroupId - the long version with the urn part of the Group
public Group20 getGroup20(GroupProvider groupProvider,
String userId,
String groupId)
GroupProviderConfiguration
getGroup20 in interface GroupProviderConfigurationgroupProvider - the GroupProvideruserId - the userIdgroupId - the groupId
public Group20Entry addUrnPartForGrouper(List<GroupProvider> groupProviders,
Group20Entry group20Entry)
GroupProviderConfiguration
addUrnPartForGrouper in interface GroupProviderConfigurationgroupProviders - all groupProvidergroup20Entry - the group20Entry with Grouper id's
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||