RepositoryDoc.Builder

public static class RepositoryDoc.Builder extends Object

Public Constructor Summary

RepositoryDoc.Builder()
Creates an instance of RepositoryDoc.Builder

Public Method Summary

RepositoryDoc.Builder
addChildId(String id, PushItem item)
Adds a child item to be pushed
RepositoryDoc
build()
Builds an instance of RepositoryDoc
RepositoryDoc.Builder
setAclFragments(Map<String, Acl> fragments)
Sets Acl fragments to be created.
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)
Sets item to be indexed.
RepositoryDoc.Builder
setRequestMode(IndexingService.RequestMode requestMode)
Sets IndexingService.RequestMode to be used for indexing requests.

Inherited Method Summary

Public Constructors

public RepositoryDoc.Builder ()

Creates an instance of RepositoryDoc.Builder

Public Methods

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

Adds a child item to be pushed

Parameters
id for item to be pushed
item PushItem to be pushed

public RepositoryDoc build ()

Builds an instance of RepositoryDoc

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

Sets Acl fragments to be created.

Parameters
fragments to be created.

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)

Sets item to be indexed.

Parameters
item to be indexed.

public RepositoryDoc.Builder setRequestMode (IndexingService.RequestMode requestMode)

Sets IndexingService.RequestMode to be used for indexing requests.

Parameters
requestMode to be used for indexing requests.

Skicka feedback om ...