public class WWGraphQLEndpoint extends AbstractWWGraphQLEndpoint
Constructor and Description |
---|
WWGraphQLEndpoint(IWWClient client) |
Modifier and Type | Method and Description |
---|---|
ArrayList<String> |
addSpaceMembers(String id,
List<SpaceMembersAddDataSenderBuilder.SpaceMemberObject> members)
Add members to a Space, returning List of members updated
|
Space |
createSpace(String title,
List<String> members)
Create a space with a title and list of members
|
Space |
createSpaceWithMutation(SpaceCreateGraphQLMutation mutationObject)
Create a space with a SpaceCreateGraphQLMutation object
|
boolean |
deleteSpace(String id)
Delete a space for a given ID
|
Conversation |
getConversation(String conversationId)
Get basic data Conversation object for relevant Conversation
|
Conversation |
getConversationWithQuery(ConversationGraphQLQuery query)
Get Conversation object with query
|
ConversationWrapper |
getConversationWrapperWithQuery(ConversationGraphQLQuery query)
Get ConversationWrapper object with query.
|
Person |
getMe()
Simplified access method, to load GraphQL query for getting Me object
|
List<Mentioned> |
getMentioned()
Get Mentioned query with first 10 mentions.
|
List<Mentioned> |
getMentioned(MentionedGraphQLQuery query)
Get Mentioned query with passed query.
|
MentionedContainer |
getMentionedContainerWithQuery(MentionedGraphQLQuery query) |
Message |
getMessageById(String messageId)
Get a Message by using a messageId
|
Message |
getMessageWithQuery(MessageGraphQLQuery query)
Get a Message by using a messageId
|
List<Person> |
getPeople(List<String> ids)
Gets People matching the passed ids
|
List<Person> |
getPeopleByName(String name)
Gets People matching the single word name passed.
|
MembersContainer |
getPeopleContainerWithQuery(PeopleGraphQLQuery query) |
List<Person> |
getPeopleWithQuery(PeopleGraphQLQuery query)
Get People with query.
|
Person |
getPersonByEmail(String personEmail)
Simplified access method, to load GraphQL query for getting Person by email or "me" if personId is blank
|
Person |
getPersonById(String personId)
Simplified access method, to load GraphQL query for getting Person by ID or "me" if personId is blank
|
Person |
getPersonWithQuery(PersonGraphQLQuery query)
Get Person Object with GraphQL Query
|
Space |
getSpaceById(String spaceId)
Get a Space by using a spaceId
|
List<Person> |
getSpaceMembers(String spaceId)
Get basic data for Space Members for relevant Sapce
|
List<Person> |
getSpaceMembersWithQuery(SpaceMembersGraphQLQuery query)
Get Space Members with query
|
List<? extends Space> |
getSpaces()
Simplified access method, to load GraphQL query for getting spaces, execute the request, and parse the results.
|
SpacesContainer |
getSpacesContainerWithQuery(SpacesGraphQLQuery query)
Get the SpacesContainer, including PageInfo object
|
List<? extends Space> |
getSpacesWithQuery(SpacesGraphQLQuery query)
getSpaces by using a SpacesGraphQLQuery.
|
Space |
getSpaceWithQuery(SpaceGraphQLQuery query)
getSpace by using a SpaceGraphQLQuery
|
ArrayList<String> |
removeSpaceMembers(String id,
List<String> members)
Remove members of a Space, returning List of members updated and the
|
ArrayList<String> |
updateSpaceMembers(String id,
List<String> members,
SpaceUpdateGraphQLMutation.UpdateSpaceMemberOperation addOrRemove)
Update the members of a Space, returning List of members updated
|
UpdateSpaceContainer |
updateSpaceMembersAndTitle(String id,
String title,
List<String> members,
SpaceUpdateGraphQLMutation.UpdateSpaceMemberOperation addOrRemove)
Update the members of a Space and its title, returning a UpdateSpaceContainer containing an Array of members
updated and Space object with the new title
|
Space |
updateSpaceTitle(String id,
String newTitle)
Change the title of a Space, returning Space object with updated title
|
UpdateSpaceContainer |
updateSpaceWithMutation(SpaceUpdateGraphQLMutation mutationObject)
Updates a Space with a query, returning a UpdateSpaceContainer containing an Array of members updated and Space
object with the new title
|
executeRequest, getAliasedChildren, getClient, getProfileDump, getRequest, getResultContainer, getResultContent, parseResultContainer, setProfileDump, setRequest, setResultContainer, setResultContent
public WWGraphQLEndpoint(IWWClient client)
client
- WWClient containing authentication details and tokenpublic List<? extends Space> getSpaces() throws WWException
WWException
- containing an error message, if the request was unsuccessfulpublic List<? extends Space> getSpacesWithQuery(SpacesGraphQLQuery query) throws WWException
query
- GraphQLQuery for the callWWException
- containing an error message, if the request was unsuccessfulpublic SpacesContainer getSpacesContainerWithQuery(SpacesGraphQLQuery query) throws WWException
query
- GraphQLQuery for the callWWException
- containing an error message, if the request was unsuccessfulpublic Space createSpace(String title, List<String> members) throws WWException
title
- String title for the Spacemembers
- List of member IDs to be granted access to the SpaceWWException
- containing an error message, if the request was unsuccessfulpublic Space createSpaceWithMutation(SpaceCreateGraphQLMutation mutationObject) throws WWException
mutationObject
- SpaceCreateGraphQLMutation containing the details to createWWException
- containing an error message, if the request was unsuccessfulpublic boolean deleteSpace(String id) throws WWException
id
- String id of the space to deleteWWException
- containing an error message, if the request was unsuccessfulpublic Space updateSpaceTitle(String id, String newTitle) throws WWException
id
- String id of the space to updatenewTitle
- String new title for the spaceWWException
- containing an error message, if the request was unsuccessfulpublic ArrayList<String> updateSpaceMembers(String id, List<String> members, SpaceUpdateGraphQLMutation.UpdateSpaceMemberOperation addOrRemove) throws WWException
id
- String id of the space to updatemembers
- List of member IDs to add / remove as membersaddOrRemove
- boolean whether members should be added to the Space or removedWWException
- containing an error message, if the request was unsuccessfulpublic UpdateSpaceContainer updateSpaceMembersAndTitle(String id, String title, List<String> members, SpaceUpdateGraphQLMutation.UpdateSpaceMemberOperation addOrRemove) throws WWException
id
- String id for the Space to updatetitle
- String title of the newly-created Spacemembers
- List of member IDs to add / remove as membersaddOrRemove
- UpdateSpaceMemberOperation enum whether members should be added to the Space or removedWWException
- containing an error message, if the request was unsuccessfulpublic UpdateSpaceContainer updateSpaceWithMutation(SpaceUpdateGraphQLMutation mutationObject) throws WWException
mutationObject
- SpaceUpdateGraphQLMutation containing the details to updateWWException
- containing an error message, if the request was unsuccessfulpublic ArrayList<String> addSpaceMembers(String id, List<SpaceMembersAddDataSenderBuilder.SpaceMemberObject> members) throws WWException
id
- String id of the space to updatemembers
- List of member IDs to add / remove as membersWWException
- containing an error message, if the request was unsuccessfulpublic ArrayList<String> removeSpaceMembers(String id, List<String> members) throws WWException
id
- String id of the space to updatemembers
- List of member IDs to remove as membersWWException
- containing an error message, if the request was unsuccessfulpublic Space getSpaceById(String spaceId) throws WWException
spaceId
- String id for the SpaceWWException
- containing an error message, if the request was unsuccessfulpublic Space getSpaceWithQuery(SpaceGraphQLQuery query) throws WWException
query
- GraphQLQuery for the callWWException
- containing an error message, if the request was unsuccessfulpublic Person getMe() throws WWException
WWException
- containing an error message, if the request was unsuccessfulpublic Person getPersonById(String personId) throws WWException
personId
- String, WWS id of the Person to returnWWException
- containing an error message, if the request was unsuccessfulpublic Person getPersonByEmail(String personEmail) throws WWException
personEmail
- String, WWS email of the Person to returnWWException
- containing an error message, if the request was unsuccessfulpublic Person getPersonWithQuery(PersonGraphQLQuery query) throws WWException
query
- PersonGraphQLQuery with selection and return criteriaWWException
- containing an error message, if the request was unsuccessfulpublic Conversation getConversation(String conversationId) throws WWException
conversationId
- String conversation idWWException
- containing an error message, if the request was unsuccessfulpublic Conversation getConversationWithQuery(ConversationGraphQLQuery query) throws WWException
query
- ConversationGraphQLQuery with selection and return criteriaWWException
- containing an error message, if the request was unsuccessfulpublic ConversationWrapper getConversationWrapperWithQuery(ConversationGraphQLQuery query) throws WWException
query
- ConversationGraphQLQuery with selection and return criteriaWWException
- containing an error message, if the request was unsuccessfulpublic Message getMessageById(String messageId) throws WWException
messageId
- String id of the messageWWException
- containing an error message, if the request was unsuccessfulpublic Message getMessageWithQuery(MessageGraphQLQuery query) throws WWException
query
- MessageGraphQLQuery with selection and return criteriaWWException
- containing an error message, if the request was unsuccessfulpublic List<Person> getSpaceMembers(String spaceId) throws WWException
spaceId
- String id for the SpaceWWException
- containing an error message, if the request was unsuccessfulpublic List<Person> getSpaceMembersWithQuery(SpaceMembersGraphQLQuery query) throws WWException
query
- SpaceMembersGraphQLQuery with selection and return criteriaWWException
- containing an error message, if the request was unsuccessfulpublic List<Person> getPeople(List<String> ids) throws WWException
ids
- List of String idsWWException
- containing an error message, if the request was unsuccessfulpublic List<Person> getPeopleByName(String name) throws WWException
name
- String single word corresponding to part of a nameWWException
- containing an error message, if the request was unsuccessfulpublic List<Person> getPeopleWithQuery(PeopleGraphQLQuery query) throws WWException
query
- PeopleGraphQLQuery with selection and return criteriaWWException
- containing an error message, if the request was unsuccessfulpublic MembersContainer getPeopleContainerWithQuery(PeopleGraphQLQuery query) throws WWException
query
- PeopleGraphQLQuery with selection and return criteriaWWException
- containing an error message, if the request was unsuccessfulpublic List<Mentioned> getMentioned() throws WWException
WWException
- containing an error message, if the request was unsuccessfulpublic List<Mentioned> getMentioned(MentionedGraphQLQuery query) throws WWException
query
- MentionedGraphQLQuery with relevant parametersWWException
- containing an error message, if the request was unsuccessfulpublic MentionedContainer getMentionedContainerWithQuery(MentionedGraphQLQuery query) throws WWException
query
- MentionedGraphQLQuery with relevant parametersWWException
- containing an error message, if the request was unsuccessfulCopyright © 2018 OpenNTF. All rights reserved.