public class DSTClient extends Object
DSTClient
provides methods for Liberty
Data Service Template.Constructor and Description |
---|
DSTClient(BinarySecurityToken token,
String soapURI,
String providerID)
Constructor
The constructor connects to the data Service using
WSS X509
Token. |
DSTClient(BinarySecurityToken token,
String soapURI,
String providerID,
javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Constructor
The constructor connects to Data Service with
WSS
SAML token, the HttpServletRequest and
HttpServletResponse object of the current request
agent will be used for resource owner interactions if needed. |
DSTClient(ResourceOffering resourceOffering,
String providerID,
Object credential)
Constructor
Creates a data service template client instance.
|
DSTClient(ResourceOffering resourceOffering,
String providerID,
Object credential,
javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Contructor
Creates a data service template client instance.
|
DSTClient(SecurityAssertion assertion,
String soapURI,
String providerID)
Constructor
The constructor connects to Data Service using
WSS
SAML Token |
DSTClient(SecurityAssertion assertion,
String soapURI,
String providerID,
javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Constructor
The constructor connects to Data Service with
WSS
SAML token, the HttpServletRequest and
HttpServletResponse object of the current request
agent will be used for resource owner interactions if needed. |
DSTClient(String soapURI,
String providerID)
Constructor
The constructor connects to Data Service without
WSS token |
DSTClient(String soapURI,
String providerID,
javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Constructor
The constructor connects to Data Service without
WSS token,
the HttpServletRequest and HttpServletResponse
object of the current request agent will be used for resource owner
interactions if needed. |
Modifier and Type | Method and Description |
---|---|
List |
getData(List items)
Gets data for the specified query items.
|
List |
getModifyResponse(List modifies)
Performs a list of modifications specified by a list of
DSTModify objects (possible on different resource ID). |
List |
getQueryResponse(List queries)
Gets query responses for a list of
DST queries |
ServiceInstanceUpdateHeader |
getServiceInstanceUpdateHeader()
Gets the
serviceInstanceUpdate header from the SOAP
response message. |
DSTModifyResponse |
modify(DSTModify modify)
Gets modify response for the specified modify.
|
DSTModifyResponse |
modify(List items)
Gets response for a list of
DST Modifications. |
DSTQueryResponse |
query(DSTQuery query)
Gets
QueryResponse for the specified query. |
void |
setBinarySecurityToken(BinarySecurityToken binaryToken)
Sets the binary security token.
|
void |
setClientAuth(boolean value)
Sets the client authentication.
|
void |
setClientCert(String certAlias)
Sets the alias for the client certificate if the connection is TLS/SSL
with client authentication.
|
void |
setProviderID(String providerID)
Sets the provider ID.
|
void |
setResourceID(EncryptedResourceID encResourceID)
Sets the encrypted resource ID to be accessed
|
void |
setResourceID(String resourceID)
Sets the resource ID to be accessed
|
void |
setSecurityAssertion(SecurityAssertion secAssertion)
Sets the Security Assertion.
|
void |
setSecurityMech(String secMech)
Sets the security mechanism.
|
void |
setSOAPAction(String action)
Sets SOAP Action such as query or modify
|
void |
setSOAPEndPoint(String endpoint)
Sets the SOAP Endpoint.
|
void |
setWSFVersion(String wsfVersion)
Sets the web services version.
|
public DSTClient(String soapURI, String providerID)
WSS
tokensoapURI
- URI of the SOAP end point for this Data service
instanceproviderID
- ID of service provider.public DSTClient(SecurityAssertion assertion, String soapURI, String providerID)
WSS
SAML Tokenassertion
- WSS
SAML TokensoapURI
- URI of the SOAP end point for this data
service instanceproviderID
- ID of service provider.public DSTClient(BinarySecurityToken token, String soapURI, String providerID)
WSS X509
Token.token
- WSS X.509
Certificate TokensoapURI
- URI of the SOAP end point for this Data
service instanceproviderID
- ID of service provider.public DSTClient(String soapURI, String providerID, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
WSS
token,
the HttpServletRequest
and HttpServletResponse
object of the current request agent will be used for resource owner
interactions if needed.soapURI
- URI of the SOAP end point for this Data
service instanceproviderID
- ID of service provider.httpRequest
- HttpServletRequest
object of current
user agent request.httpResponse
- HttpServletResponse
object of current
user agent request.public DSTClient(SecurityAssertion assertion, String soapURI, String providerID, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
WSS
SAML token, the HttpServletRequest
and
HttpServletResponse
object of the current request
agent will be used for resource owner interactions if needed.assertion
- WSS
SAML Token.soapURI
- URI of the SOAP end point for this Data service instance.providerID
- ID of service provider.httpRequest
- HttpServletRequest
object of current
user agent request.httpResponse
- HttpServletResponse
object of current
user agent request.public DSTClient(BinarySecurityToken token, String soapURI, String providerID, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
WSS
SAML token, the HttpServletRequest
and
HttpServletResponse
object of the current request
agent will be used for resource owner interactions if needed.token
- WSS X.509
Certificate TokensoapURI
- URI of the SOAP end point for this Data
service instanceproviderID
- ID of service provider.httpRequest
- HttpServletRequest
object of current
user agent request.httpResponse
- HttpServletResponse
object of current
user agent.public DSTClient(ResourceOffering resourceOffering, String providerID, Object credential, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse) throws DSTException
resourceID
, security mechanism and SOAP endpoint defined
in the ResourceOffering
will be used.resourceOffering
- resource offering for this
discovery service instanceproviderID
- ID of this service provider.credential
- Credential of WSC
httpRequest
- HttpServletRequest
object of current
user agent request.httpResponse
- HttpServletResponse
object of current
user agent.DSTException
- if the resourceOffering
is not validpublic DSTClient(ResourceOffering resourceOffering, String providerID, Object credential) throws DSTException
resourceID
, security mechanism and SOAP endpoint defined
in the ResourceOffering
will be used.resourceOffering
- resource offering for this
discovery service instanceproviderID
- ID of this service provider.credential
- Credential of WSC
DSTException
- if the resourceOffering
is not validpublic void setResourceID(String resourceID)
resourceID
- resource ID Stringpublic void setResourceID(EncryptedResourceID encResourceID)
encResourceID
- encrypted resource IDpublic void setProviderID(String providerID)
providerID
- Provider ID.public void setClientCert(String certAlias)
certAlias
- certificate alias namepublic void setSOAPAction(String action)
action
- action for this soap requestpublic void setClientAuth(boolean value)
value
- true value to enable client authentication.public void setSOAPEndPoint(String endpoint)
endpoint
- SOAP Endpoint.public void setSecurityAssertion(SecurityAssertion secAssertion)
secAssertion
- Security Assertion.public void setBinarySecurityToken(BinarySecurityToken binaryToken)
binaryToken
- Binary Security Token.public void setSecurityMech(String secMech)
secMech
- security mechanism.public List getData(List items) throws DSTException, InteractionRedirectException
items
- list of DSTQueryItem
objectDSTData
objects which have one-to-one
correspondence to the list of query items. If no response for
one of the query item, the corresponding return
DSTData
object will be null.DSTException
- if error occurs when trying to get dataInteractionRedirectException
- if user agent is redirected to
Web Service Provider (WSP
) for resource owner
interactionspublic DSTQueryResponse query(DSTQuery query) throws DSTException, InteractionRedirectException
QueryResponse
for the specified query.query
- DSTQuery
object.DSTDQueryResponse
Object.DSTException
- if error occurs when trying to get dataInteractionRedirectException
- if user agent is redirected to
Web Service Provider (WSP
) for resource owner
interactionspublic DSTModifyResponse modify(List items) throws DSTException, InteractionRedirectException
DST
Modifications.items
- List of DSTModification
objects.DSTModifyResponse
.DSTException
- if error occurs when trying to modify dataInteractionRedirectException
- if user agent is redirected to
Web Service Provider (WSP
) for resource owner
interactions.public DSTModifyResponse modify(DSTModify modify) throws DSTException, InteractionRedirectException
modify
- DSTModify
object.DSTModifyResponse
object.DSTException
- if error occurs when trying to modify dataInteractionRedirectException
- if user agent is redirected to
Web Service Provider (WSP
) for resource owner
interactionspublic List getQueryResponse(List queries) throws DSTException, InteractionRedirectException
DST
queriesqueries
- list of DSTQuery
objectsDSTQueryResponse
objects, corresponding
to each DSTQuery
object.DSTException
- if error occurs when trying to get dataInteractionRedirectException
- if interaction is required.public List getModifyResponse(List modifies) throws DSTException, InteractionRedirectException
DSTModify
objects (possible on different resource ID).modifies
- list of DSTModify
objects specifying
resource and modifications to be made.DSTModifyResponse
object corresponding
to each DSTModify
.DSTException
- if error occurs when trying to modify dataInteractionRedirectException
- if interaction is required.public ServiceInstanceUpdateHeader getServiceInstanceUpdateHeader()
serviceInstanceUpdate
header from the SOAP
response message.
Applications can make use of this method to check if there is an
alternate endpoint or credential available for the service requests.ServiceInstanceUpdateHeader
from the response
message.public void setWSFVersion(String wsfVersion)
wsfVersion
- the web services version that needs to be set.Copyright © 2010-2018, ForgeRock All Rights Reserved.