Class GrouperClientWs
java.lang.Object
edu.internet2.middleware.grouperClient.ws.GrouperClientWs
this is the client that all requests go through. if you add an instance field, make sure to add to copyFrom()
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignContentType
(String theContentType) assign the content type, defaults to xmlassignWsEndpoint
(String theWsEndpoint) endpoint to grouper WS, e.g.assignWsPass
(String theWsPass) ws passassignWsUser
(String theWsUser) ws uservoid
copyFrom
(GrouperClientWs grouperClientWs) copy from the argument to this objectexecuteService
(String urlSuffix, Object toSend, String labelForLog, String clientVersion, boolean readOnly) void
handleFailure
(Object responseContainer, ResultMetadataHolder[] resultMetadataHolders, String resultMessage) if failure, handle it
-
Field Details
-
mostRecentRequest
keep a reference to the most recent for testing -
mostRecentResponse
keep a reference to the most recent for testing -
READ_ONLY_FAILOVER_CONFIG_NAME
readonly failover config name- See Also:
-
READ_WRITE_FAILOVER_CONFIG_NAME
readwrite failover config name- See Also:
-
-
Constructor Details
-
GrouperClientWs
public GrouperClientWs()
-
-
Method Details
-
copyFrom
copy from the argument to this object- Parameters:
grouperClientWs
-
-
assignContentType
assign the content type, defaults to xml- Parameters:
theContentType
-- Returns:
- this for chaining
-
executeService
public Object executeService(String urlSuffix, Object toSend, String labelForLog, String clientVersion, boolean readOnly) - Parameters:
urlSuffix
- e.g. groups/aStem:aGroup/memberstoSend
- is the bean which will transform into XML, or just a string of XML to send...labelForLog
- label if the request is logged to fileclientVersion
-readOnly
- true if readonly, false if readwrite- Returns:
- the response object
-
handleFailure
public void handleFailure(Object responseContainer, ResultMetadataHolder[] resultMetadataHolders, String resultMessage) if failure, handle it- Parameters:
responseContainer
- is the object that everything marshaled toresultMetadataHolders
-resultMessage
-- Throws:
GcWebServiceError
- if there is a problem
-
assignWsEndpoint
endpoint to grouper WS, e.g. https://server.school.edu/grouper-ws/servicesRest- Parameters:
theWsEndpoint
-- Returns:
- this for chaining
-
assignWsPass
ws pass- Parameters:
theWsPass
-- Returns:
- this for chaining
-
assignWsUser
ws user- Parameters:
theWsUser
-- Returns:
- this for chaining
-