RepositoryDoc.Builder

public static class RepositoryDoc.Builder extends Object

Public Constructor Summary

Public Method Summary

RepositoryDoc.Builder
addChildId(String id, PushItem item)
RepositoryDoc
build()
RepositoryDoc.Builder
setAclFragments(Map<String, Acl> fragments)
RepositoryDoc.Builder
setContent(AbstractInputStreamContent content, IndexingService.ContentFormat contentFormat)
Sets the content and content format.
RepositoryDoc.Builder
setContent(AbstractInputStreamContent content, String contentHash, IndexingService.ContentFormat contentFormat)
Sets the content, content hash, and content format.
RepositoryDoc.Builder
setItem(Item item)
RepositoryDoc.Builder

Inherited Method Summary

Public Constructors

public RepositoryDoc.Builder ()

Public Methods

public RepositoryDoc.Builder addChildId (String id, PushItem item)

Parameters
id
item

public RepositoryDoc build ()

public RepositoryDoc.Builder setAclFragments (Map<String, Acl> fragments)

Parameters
fragments

public RepositoryDoc.Builder setContent (AbstractInputStreamContent content, IndexingService.ContentFormat contentFormat)

Sets the content and content format. The content parameter should use a concrete implementation of AbstractInputStreamContent based on the natural source object:

  • For InputStream, use InputStreamContent. For best results, if the length of the content (in bytes) is known without reading the stream, call setLength on the InputStreamContent.
  • For String or byte[], use ByteArrayContent.
  • For existing files, use FileContent.

Use this method when the content hash is not being used.

Parameters
content
contentFormat

public RepositoryDoc.Builder setContent (AbstractInputStreamContent content, String contentHash, IndexingService.ContentFormat contentFormat)

Sets the content, content hash, and content format. The content parameter should use a concrete implementation of AbstractInputStreamContent based on the natural source object:

  • For InputStream, use InputStreamContent. For best results, if the length of the content (in bytes) is known without reading the stream, call setLength on the InputStreamContent.
  • For String or byte[], use ByteArrayContent.
  • For existing files, use FileContent.

Use this method when the content hash is being used. The content hash allows the Cloud Search queue to determine whether a document's content has been modified during a subsequent push of the document. This allows the document's queue status to automatically change to a modified state.

Parameters
content
contentHash
contentFormat

public RepositoryDoc.Builder setItem (Item item)

Parameters
item

public RepositoryDoc.Builder setRequestMode (IndexingService.RequestMode requestMode)

Parameters
requestMode

Send feedback about...

Cloud Search
Cloud Search