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.batchUpdateSecurityIdentities(String securityProviderId, BatchIdentity batchIdentity) Manages pushing batches of Security Identities to a File Container, then into Coveo.create(String name, SourceVisibility sourceVisibility) Create a new push source.Creates a File Container.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.pushBinaryToFileContainer(FileContainer fileContainer, byte[] fileAsBytes) Push file to a File Container.updateSourceStatus(String sourceId, PushAPIStatus status) Update the status of a Push source.
-
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.
-
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.platformUrl-
-
Source
Deprecated.Please now use PlatformUrl to define your Platform environment- 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.environment- The Environment to be used.- See Also:
-
-
Method Details
-
create
public HttpResponse<String> create(String name, SourceVisibility sourceVisibility) throws IOException, InterruptedException Create 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, InterruptedException Create 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, InterruptedException Create 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, InterruptedException Delete a security identity. See [Disabling a Single Security Identity](https://docs.coveo.com/en/84).- Parameters:
securityProviderId-securityIdentityDelete-- Returns:
- Throws:
IOExceptionInterruptedException
-
updateSourceStatus
public HttpResponse<String> updateSourceStatus(String sourceId, PushAPIStatus status) throws IOException, InterruptedException Update the status of a Push source. See [Updating the Status of a Push Source](https://docs.coveo.com/en/35).- Parameters:
sourceId-status-- Returns:
- Throws:
IOExceptionInterruptedException
-
deleteOldSecurityIdentities
public HttpResponse<String> deleteOldSecurityIdentities(String securityProviderId, SecurityIdentityDeleteOptions batchDelete) throws IOException, InterruptedException Delete 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, InterruptedException Manage 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, InterruptedException Adds 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, InterruptedException Deletes 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, InterruptedException Manage 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
-
batchUpdateSecurityIdentities
public SecurityIdentityBatchResponse batchUpdateSecurityIdentities(String securityProviderId, BatchIdentity batchIdentity) throws IOException, InterruptedException Manages pushing batches of Security Identities to a File Container, then into Coveo. See [Manage Batches of Security Identities](https://docs.coveo.com/en/55)- Parameters:
securityProviderId-batchIdentity-- Returns:
- Throws:
IOExceptionInterruptedException
-
createFileContainer
Creates a File Container. [Creating a File Container](https://docs.coveo.com/en/43)- Returns:
- Throws:
IOExceptionInterruptedException
-
pushBinaryToFileContainer
public HttpResponse<String> pushBinaryToFileContainer(FileContainer fileContainer, byte[] fileAsBytes) throws IOException, InterruptedException Push file to a File Container. [Using the compressedBinaryDataFileId Property](https://docs.coveo.com/en/69)- Parameters:
fileContainer-fileAsBytes-- Returns:
- Throws:
IOExceptionInterruptedException
-