MockItem
Stay organized with collections
Save and categorize content based on your preferences.
Generates an Item using IndexingItemBuilder
with specified values for metadata.
MockItem item = new MockItem.Builder("ItemName").setTitle("Title").setMimeType("HTML")
.setContentLanguage("en-us").setItemType(ItemType.CONTENT_ITEM.toString()).build();
Public Constructor Summary
|
MockItem(String itemName, Multimap<String, Object> values)
|
Inherited Method Summary
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
Public Constructors
public
MockItem
(String itemName, Multimap<String, Object> values)
Public Methods
public
String
getContainerName
()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-18 UTC.
[null,null,["Last updated 2025-03-18 UTC."],[],[],null,["# MockItem\n\npublic class **MockItem** extends Object \nGenerates an Item using [IndexingItemBuilder](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/IndexingItemBuilder) with specified values for metadata.\n\n```\n MockItem item = new MockItem.Builder(\"ItemName\").setTitle(\"Title\").setMimeType(\"HTML\")\n .setContentLanguage(\"en-us\").setItemType(ItemType.CONTENT_ITEM.toString()).build();\n \n```\n\n\u003cbr /\u003e\n\n### Nested Class Summary\n\n|-------|---|---|-------------------------------------------------------|\n| class | [MockItem.Builder](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/MockItem.Builder) || Builder class to set meta data attributes of an Item. |\n\n### Public Constructor Summary\n\n|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [MockItem](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/MockItem#MockItem(java.lang.String, com.google.common.collect.Multimap\u003cjava.lang.String, java.lang.Object\u003e))(String itemName, Multimap\\\u003cString, Object\\\u003e values) |\n\n### Public Method Summary\n\n|--------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| String | [getContainerName](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/MockItem#getContainerName())() |\n| Item | [getItem](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/MockItem#getItem())() |\n| String | [getName](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/MockItem#getName())() |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| boolean | equals(Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public\n**MockItem**\n(String itemName, Multimap\\\u003cString, Object\\\u003e values)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| itemName | |\n| values | |\n|----------|---|\n\nPublic Methods\n--------------\n\n#### public String\n**getContainerName**\n()\n\n\u003cbr /\u003e\n\n#### public Item\n**getItem**\n()\n\n\u003cbr /\u003e\n\n#### public String\n**getName**\n()\n\n\u003cbr /\u003e"]]