Package com.coveo.pushapiclient
Class Source
java.lang.Object
com.coveo.pushapiclient.Source
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddOrUpdateDocument(String sourceId, DocumentBuilder docBuilder)Adds or updates an individual item in a push source.batchUpdateDocuments(String sourceId, BatchUpdate batchUpdate)Manage batches of items in a push source.create(String name, SourceVisibility sourceVisibility)Create a new push source.createOrUpdateSecurityIdentity(String securityProviderId, SecurityIdentityModel securityIdentityModel)Create or update a security identity.createOrUpdateSecurityIdentityAlias(String securityProviderId, SecurityIdentityAliasModel securityIdentityAliasModel)Create or update a security identity alias.deleteDocument(String sourceId, String documentId, Boolean deleteChildren)Deletes a specific item from a Push source.deleteOldSecurityIdentities(String securityProviderId, SecurityIdentityDeleteOptions batchDelete)Delete old security identities.deleteSecurityIdentity(String securityProviderId, SecurityIdentityDelete securityIdentityDelete)Delete a security identity.manageSecurityIdentities(String securityProviderId, SecurityIdentityBatchConfig batchConfig)Manage batches of security identities.
-
Constructor Details
-
Source
- Parameters:
apiKey- An apiKey capable of pushing documents and managing sources in a Coveo organization. See [Manage API Keys](https://docs.coveo.com/en/1718).organizationId- The Coveo Organization identifier.
-
-
Method Details
-
create
public HttpResponse<String> create(String name, SourceVisibility sourceVisibility) throws IOException, InterruptedExceptionCreate a new push source.- Parameters:
name- The name of the source to createsourceVisibility- The security option that should be applied to the content of the source. See [Content Security](https://docs.coveo.com/en/1779).- Returns:
- Throws:
IOExceptionInterruptedException
-
createOrUpdateSecurityIdentity
public HttpResponse<String> createOrUpdateSecurityIdentity(String securityProviderId, SecurityIdentityModel securityIdentityModel) throws IOException, InterruptedExceptionCreate or update a security identity. See [Adding a Single Security Identity](https://docs.coveo.com/en/167) and [Security Identity Models](https://docs.coveo.com/en/139).- Parameters:
securityProviderId-securityIdentityModel-- Returns:
- Throws:
IOExceptionInterruptedException
-
createOrUpdateSecurityIdentityAlias
public HttpResponse<String> createOrUpdateSecurityIdentityAlias(String securityProviderId, SecurityIdentityAliasModel securityIdentityAliasModel) throws IOException, InterruptedExceptionCreate or update a security identity alias. See [Adding a Single Alias](https://docs.coveo.com/en/142) and [User Alias Definition Examples](https://docs.coveo.com/en/46).- Parameters:
securityProviderId-securityIdentityAliasModel-- Returns:
- Throws:
IOExceptionInterruptedException
-
deleteSecurityIdentity
public HttpResponse<String> deleteSecurityIdentity(String securityProviderId, SecurityIdentityDelete securityIdentityDelete) throws IOException, InterruptedExceptionDelete a security identity. See [Disabling a Single Security Identity](https://docs.coveo.com/en/84).- Parameters:
securityProviderId-securityIdentityDelete-- Returns:
- Throws:
IOExceptionInterruptedException
-
deleteOldSecurityIdentities
public HttpResponse<String> deleteOldSecurityIdentities(String securityProviderId, SecurityIdentityDeleteOptions batchDelete) throws IOException, InterruptedExceptionDelete old security identities. See [Disabling Old Security Identities](https://docs.coveo.com/en/33).- Parameters:
securityProviderId-batchDelete-- Returns:
- Throws:
IOExceptionInterruptedException
-
manageSecurityIdentities
public HttpResponse<String> manageSecurityIdentities(String securityProviderId, SecurityIdentityBatchConfig batchConfig) throws IOException, InterruptedExceptionManage batches of security identities. See [Manage Batches of Security Identities](https://docs.coveo.com/en/55).- Parameters:
securityProviderId-batchConfig-- Returns:
- Throws:
IOExceptionInterruptedException
-
addOrUpdateDocument
public HttpResponse<String> addOrUpdateDocument(String sourceId, DocumentBuilder docBuilder) throws IOException, InterruptedExceptionAdds or updates an individual item in a push source. See [Adding a Single Item in a Push Source](https://docs.coveo.com/en/133).- Parameters:
sourceId-docBuilder-- Returns:
- Throws:
IOExceptionInterruptedException
-
deleteDocument
public HttpResponse<String> deleteDocument(String sourceId, String documentId, Boolean deleteChildren) throws IOException, InterruptedExceptionDeletes a specific item from a Push source. Optionally, the child items of that item can also be deleted. See [Deleting an Item in a Push Source](https://docs.coveo.com/en/171).- Parameters:
sourceId-documentId-deleteChildren-- Returns:
- Throws:
IOExceptionInterruptedException
-
batchUpdateDocuments
public HttpResponse<String> batchUpdateDocuments(String sourceId, BatchUpdate batchUpdate) throws IOException, InterruptedExceptionManage batches of items in a push source. See [Manage Batches of Items in a Push Source](https://docs.coveo.com/en/90)- Parameters:
sourceId-batchUpdate-- Returns:
- Throws:
IOExceptionInterruptedException
-