public class ETClient extends Object
ETClient
is the central object in the Java
client library.Constructor and Description |
---|
ETClient()
Class constructor, Initializes a new instance of the class.
|
ETClient(ETConfiguration configuration)
Class constructor, Initializes a new instance of the class.
|
ETClient(String file)
Class constructor, Initializes a new instance of the class.
|
Modifier and Type | Method and Description |
---|---|
Boolean |
autoHydrateObjects() |
<T extends ETApiObject> |
create(List<T> objects) |
<T extends ETApiObject> |
create(T... objects) |
<T extends ETApiObject> |
delete(Class<T> type,
ETFilter filter) |
<T extends ETApiObject> |
delete(Class<T> type,
String filter) |
<T extends ETApiObject> |
delete(List<T> objects) |
<T extends ETApiObject> |
delete(T... objects) |
String |
getAccessToken() |
String |
getClientId() |
ETConfiguration |
getConfiguration() |
com.google.gson.Gson |
getGson() |
String |
getLegacyToken() |
ETRestConnection |
getRestConnection() |
ETRestConnection |
getRESTConnection()
Deprecated.
Use getRestConnection().
|
ETSoapConnection |
getSoapConnection() |
ETSoapConnection |
getSOAPConnection()
Deprecated.
Use getSoapConnection().
|
<T extends ETApiObject> |
instantiate(Class<T> type) |
String |
refreshToken() |
String |
requestToken() |
String |
requestToken(String refreshToken) |
<T extends ETApiObject> |
retrieve(Class<T> type,
ETFilter filter) |
<T extends ETApiObject> |
retrieve(Class<T> type,
ETFilter filter,
Integer page,
Integer pageSize,
String... properties)
Deprecated.
Pass properties in
filter argument. |
<T extends ETApiObject> |
retrieve(Class<T> type,
ETFilter filter,
String... properties)
Deprecated.
Pass properties in
filter argument. |
<T extends ETApiObject> |
retrieve(Class<T> type,
Integer page,
Integer pageSize,
ETFilter filter) |
<T extends ETApiObject> |
retrieve(Class<T> type,
Integer page,
Integer pageSize,
String... filter) |
<T extends ETApiObject> |
retrieve(Class<T> type,
String... filter) |
<T extends ETApiObject> |
retrieve(Class<T> type,
String filter,
Integer page,
Integer pageSize,
String... properties)
Deprecated.
Pass properties in
filter argument. |
<T extends ETApiObject> |
retrieveObject(Class<T> type,
ETFilter filter) |
<T extends ETApiObject> |
retrieveObject(Class<T> type,
ETFilter filter,
String... properties)
Deprecated.
Pass properties in
filter argument. |
<T extends ETApiObject> |
retrieveObject(Class<T> type,
String... filter) |
<T extends ETApiObject> |
retrieveObjects(Class<T> type,
ETFilter filter) |
<T extends ETApiObject> |
retrieveObjects(Class<T> type,
ETFilter filter,
Integer page,
Integer pageSize,
String... properties)
Deprecated.
Pass properties in
filter argument. |
<T extends ETApiObject> |
retrieveObjects(Class<T> type,
ETFilter filter,
String... properties)
Deprecated.
Pass properties in
filter argument. |
<T extends ETApiObject> |
retrieveObjects(Class<T> type,
Integer page,
Integer pageSize,
ETFilter filter) |
<T extends ETApiObject> |
retrieveObjects(Class<T> type,
Integer page,
Integer pageSize,
String... filter) |
<T extends ETApiObject> |
retrieveObjects(Class<T> type,
String... filter) |
<T extends ETApiObject> |
retrieveObjects(Class<T> type,
String filter,
Integer page,
Integer pageSize,
String... properties)
Deprecated.
Pass properties in
filter argument. |
<T extends ETApiObject> |
update(Class<T> type,
String filter,
String... values) |
<T extends ETApiObject> |
update(List<T> objects) |
<T extends ETApiObject> |
update(T... objects) |
public ETClient() throws ETSdkException
ETSdkException
public ETClient(String file) throws ETSdkException
file
- The configuration file which contains the clientId and clientSecretETSdkException
public ETClient(ETConfiguration configuration) throws ETSdkException
configuration
- The ETConfiguration object which contains the clientId and clientSecretETSdkException
public String getClientId()
public String getAccessToken()
public String getLegacyToken()
public Boolean autoHydrateObjects()
public ETConfiguration getConfiguration()
public com.google.gson.Gson getGson()
public ETRestConnection getRestConnection()
public ETSoapConnection getSoapConnection()
@Deprecated public ETRestConnection getRESTConnection()
@Deprecated public ETSoapConnection getSOAPConnection()
public String requestToken() throws ETSdkException
ETSdkException
public String requestToken(String refreshToken) throws ETSdkException
refreshToken
- The refresh tokenETSdkException
public String refreshToken() throws ETSdkException
ETSdkException
public <T extends ETApiObject> T instantiate(Class<T> type) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to instantiateETSdkException
public <T extends ETApiObject> ETResponse<T> retrieve(Class<T> type, ETFilter filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to retrievefilter
- The ETFilter object to be used to retrieve objectsETSdkException
public <T extends ETApiObject> ETResponse<T> retrieve(Class<T> type, String... filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to retrievefilter
- The filter to be used to retrieve as variable arguments of StringETSdkException
public <T extends ETApiObject> ETResponse<T> retrieve(Class<T> type, Integer page, Integer pageSize, ETFilter filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to retrievepage
- The page numberpageSize
- The page sizefilter
- The ETFilter object to be used to retrieve objectsETSdkException
public <T extends ETApiObject> ETResponse<T> retrieve(Class<T> type, Integer page, Integer pageSize, String... filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to retrievepage
- The page numberpageSize
- The page sizefilter
- The filter to be used to retrieve as variable arguments of StringETSdkException
@Deprecated public <T extends ETApiObject> ETResponse<T> retrieve(Class<T> type, ETFilter filter, String... properties) throws ETSdkException
filter
argument.ETSdkException
@Deprecated public <T extends ETApiObject> ETResponse<T> retrieve(Class<T> type, ETFilter filter, Integer page, Integer pageSize, String... properties) throws ETSdkException
filter
argument.ETSdkException
@Deprecated public <T extends ETApiObject> ETResponse<T> retrieve(Class<T> type, String filter, Integer page, Integer pageSize, String... properties) throws ETSdkException
filter
argument.ETSdkException
public <T extends ETApiObject> T retrieveObject(Class<T> type, ETFilter filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to retrievefilter
- The ETFilter object to be used to retrieve objectsETSdkException
public <T extends ETApiObject> T retrieveObject(Class<T> type, String... filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to retrievefilter
- The filter to be used to retrieve objects as variable arguments of StringETSdkException
@Deprecated public <T extends ETApiObject> T retrieveObject(Class<T> type, ETFilter filter, String... properties) throws ETSdkException
filter
argument.ETSdkException
public <T extends ETApiObject> List<T> retrieveObjects(Class<T> type, ETFilter filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to retrievefilter
- The ETFilter object to be used to retrieve objectsETSdkException
public <T extends ETApiObject> List<T> retrieveObjects(Class<T> type, String... filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to retrievefilter
- The filter to be used to retrieve objects as variable arguments of StringETSdkException
public <T extends ETApiObject> List<T> retrieveObjects(Class<T> type, Integer page, Integer pageSize, ETFilter filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to retrievepage
- The page numberpageSize
- The page sizefilter
- The ETFilter object to be used to retrieve objectsETSdkException
public <T extends ETApiObject> List<T> retrieveObjects(Class<T> type, Integer page, Integer pageSize, String... filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to retrievepage
- The page numberpageSize
- The page sizefilter
- The filter to be used to retrieve objects as variable arguments of StringETSdkException
@Deprecated public <T extends ETApiObject> List<T> retrieveObjects(Class<T> type, ETFilter filter, String... properties) throws ETSdkException
filter
argument.ETSdkException
@Deprecated public <T extends ETApiObject> List<T> retrieveObjects(Class<T> type, ETFilter filter, Integer page, Integer pageSize, String... properties) throws ETSdkException
filter
argument.ETSdkException
@Deprecated public <T extends ETApiObject> List<T> retrieveObjects(Class<T> type, String filter, Integer page, Integer pageSize, String... properties) throws ETSdkException
filter
argument.ETSdkException
public <T extends ETApiObject> ETResponse<T> create(T... objects) throws ETSdkException
T
- The type which extends from ETApiObjectobjects
- The objects to be created as variable arguments of type TETSdkException
public <T extends ETApiObject> ETResponse<T> create(List<T> objects) throws ETSdkException
T
- The type which extends from ETApiObjectobjects
- The List of objects of type T to be createdETSdkException
public <T extends ETApiObject> ETResponse<T> update(T... objects) throws ETSdkException
T
- The type which extends from ETApiObjectobjects
- The objects to be updated as variable arguments of type TETSdkException
public <T extends ETApiObject> ETResponse<T> update(List<T> objects) throws ETSdkException
T
- The type which extends from ETApiObjectobjects
- The List of objects of type T to be updatedETSdkException
public <T extends ETApiObject> ETResponse<T> delete(T... objects) throws ETSdkException
T
- The type which extends from ETApiObjectobjects
- The objects to be deleted as variable arguments of type TETSdkException
public <T extends ETApiObject> ETResponse<T> delete(List<T> objects) throws ETSdkException
T
- The type which extends from ETApiObjectobjects
- The List of objects of type T to be deletedETSdkException
public <T extends ETApiObject> ETResponse<T> update(Class<T> type, String filter, String... values) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to deletefilter
- The filter to be used to do filtervalues
- The values as variable arguments of String which is used to do the updateETSdkException
public <T extends ETApiObject> ETResponse<T> delete(Class<T> type, ETFilter filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to deletefilter
- The ETFilter object to be used for filterETSdkException
public <T extends ETApiObject> ETResponse<T> delete(Class<T> type, String filter) throws ETSdkException
T
- The type which extends from ETApiObjecttype
- The class type to deletefilter
- The filter to be used to do filterETSdkException
Copyright © 2017. All rights reserved.