Package org.apache.syncope.client.lib
Class SyncopeClientFactoryBean
- java.lang.Object
-
- org.apache.syncope.client.lib.SyncopeClientFactoryBean
-
public class SyncopeClientFactoryBean extends Object
Factory bean for creating instances ofSyncopeClient. Supports Spring-bean configuration and override via subclassing (see protected methods).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSyncopeClientFactoryBean.ContentType
-
Constructor Summary
Constructors Constructor Description SyncopeClientFactoryBean()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SyncopeClientcreate()Builds client instance with no authentication, for user self-registration and password reset.SyncopeClientcreate(String jwt)Builds client instance which will be passing the provided value in theHttpHeaders.AUTHORIZATIONrequest header.SyncopeClientcreate(String username, String password)Builds client instance with the given credentials.SyncopeClientcreate(AuthenticationHandler handler)Builds client instance with the given authentication handler.protected static RestClientExceptionMapperdefaultExceptionMapper()protected static com.fasterxml.jackson.jaxrs.json.JacksonJsonProviderdefaultJsonProvider()protected org.apache.cxf.jaxrs.client.JAXRSClientFactoryBeandefaultRestClientFactoryBean()protected static com.fasterxml.jackson.jaxrs.xml.JacksonXMLProviderdefaultXmlProvider()protected static com.fasterxml.jackson.jaxrs.yaml.JacksonYAMLProviderdefaultYamlProvider()StringgetAddress()SyncopeClientFactoryBean.ContentTypegetContentType()StringgetDomain()RestClientExceptionMappergetExceptionMapper()com.fasterxml.jackson.jaxrs.json.JacksonJsonProvidergetJsonProvider()org.apache.cxf.jaxrs.client.JAXRSClientFactoryBeangetRestClientFactoryBean()org.apache.cxf.configuration.jsse.TLSClientParametersgetTlsClientParameters()com.fasterxml.jackson.jaxrs.xml.JacksonXMLProvidergetXmlProvider()com.fasterxml.jackson.jaxrs.yaml.JacksonYAMLProvidergetYamlProvider()booleanisUseCompression()SyncopeClientFactoryBeansetAddress(String address)SyncopeClientFactoryBeansetContentType(String contentType)SyncopeClientFactoryBeansetContentType(SyncopeClientFactoryBean.ContentType contentType)SyncopeClientFactoryBeansetDomain(String domain)SyncopeClientFactoryBeansetExceptionMapper(RestClientExceptionMapper exceptionMapper)voidsetJsonProvider(com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider jsonProvider)SyncopeClientFactoryBeansetRestClientFactoryBean(org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean restClientFactoryBean)SyncopeClientFactoryBeansetTlsClientParameters(org.apache.cxf.configuration.jsse.TLSClientParameters tlsClientParameters)Sets the client TLS configuration.SyncopeClientFactoryBeansetUseCompression(boolean useCompression)Sets the given service instance for transparent gzipContent-Encodinghandling.voidsetXmlProvider(com.fasterxml.jackson.jaxrs.xml.JacksonXMLProvider xmlProvider)voidsetYamlProvider(com.fasterxml.jackson.jaxrs.yaml.JacksonYAMLProvider yamlProvider)
-
-
-
Method Detail
-
defaultJsonProvider
protected static com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider defaultJsonProvider()
-
defaultXmlProvider
protected static com.fasterxml.jackson.jaxrs.xml.JacksonXMLProvider defaultXmlProvider()
-
defaultYamlProvider
protected static com.fasterxml.jackson.jaxrs.yaml.JacksonYAMLProvider defaultYamlProvider()
-
defaultExceptionMapper
protected static RestClientExceptionMapper defaultExceptionMapper()
-
defaultRestClientFactoryBean
protected org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean defaultRestClientFactoryBean()
-
getJsonProvider
public com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider getJsonProvider()
-
setJsonProvider
public void setJsonProvider(com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider jsonProvider)
-
getXmlProvider
public com.fasterxml.jackson.jaxrs.xml.JacksonXMLProvider getXmlProvider()
-
setXmlProvider
public void setXmlProvider(com.fasterxml.jackson.jaxrs.xml.JacksonXMLProvider xmlProvider)
-
getYamlProvider
public com.fasterxml.jackson.jaxrs.yaml.JacksonYAMLProvider getYamlProvider()
-
setYamlProvider
public void setYamlProvider(com.fasterxml.jackson.jaxrs.yaml.JacksonYAMLProvider yamlProvider)
-
getExceptionMapper
public RestClientExceptionMapper getExceptionMapper()
-
setExceptionMapper
public SyncopeClientFactoryBean setExceptionMapper(RestClientExceptionMapper exceptionMapper)
-
getAddress
public String getAddress()
-
setAddress
public SyncopeClientFactoryBean setAddress(String address)
-
getContentType
public SyncopeClientFactoryBean.ContentType getContentType()
-
setContentType
public SyncopeClientFactoryBean setContentType(SyncopeClientFactoryBean.ContentType contentType)
-
setContentType
public SyncopeClientFactoryBean setContentType(String contentType)
-
getDomain
public String getDomain()
-
setDomain
public SyncopeClientFactoryBean setDomain(String domain)
-
setUseCompression
public SyncopeClientFactoryBean setUseCompression(boolean useCompression)
Sets the given service instance for transparent gzipContent-Encodinghandling.- Parameters:
useCompression- whether transparent gzipContent-Encodinghandling is to be enabled- Returns:
- the current instance
-
isUseCompression
public boolean isUseCompression()
-
setTlsClientParameters
public SyncopeClientFactoryBean setTlsClientParameters(org.apache.cxf.configuration.jsse.TLSClientParameters tlsClientParameters)
Sets the client TLS configuration.- Parameters:
tlsClientParameters- client TLS configuration- Returns:
- the current instance
-
getTlsClientParameters
public org.apache.cxf.configuration.jsse.TLSClientParameters getTlsClientParameters()
-
getRestClientFactoryBean
public org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean getRestClientFactoryBean()
-
setRestClientFactoryBean
public SyncopeClientFactoryBean setRestClientFactoryBean(org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean restClientFactoryBean)
-
create
public SyncopeClient create()
Builds client instance with no authentication, for user self-registration and password reset.- Returns:
- client instance with no authentication
-
create
public SyncopeClient create(String username, String password)
Builds client instance with the given credentials. Such credentials will be used only to obtain a valid JWT in theHttpHeaders.AUTHORIZATIONheader;- Parameters:
username- usernamepassword- password- Returns:
- client instance with the given credentials
-
create
public SyncopeClient create(String jwt)
Builds client instance which will be passing the provided value in theHttpHeaders.AUTHORIZATIONrequest header.- Parameters:
jwt- value received after login, in theRESTHeaders.TOKENresponse header- Returns:
- client instance which will be passing the provided value in the
HttpHeaders.AUTHORIZATIONrequest header
-
create
public SyncopeClient create(AuthenticationHandler handler)
Builds client instance with the given authentication handler.- Parameters:
handler- authentication handler- Returns:
- client instance with the given authentication handler
-
-