WebExtensionStoreType

Inheritance: java.lang.Object

public class WebExtensionStoreType

Enumerates available types of a web extension store.

Examples:

Shows how to add a web extension to a document.


 Document doc = new Document();

 // Create task pane with "MyScript" add-in, which will be used by the document,
 // then set its default location.
 TaskPane myScriptTaskPane = new TaskPane();
 doc.getWebExtensionTaskPanes().add(myScriptTaskPane);
 myScriptTaskPane.setDockState(TaskPaneDockState.RIGHT);
 myScriptTaskPane.isVisible(true);
 myScriptTaskPane.setWidth(300.0);
 myScriptTaskPane.isLocked(true);

 // If there are multiple task panes in the same docking location, we can set this index to arrange them.
 myScriptTaskPane.setRow(1);

 // Create an add-in called "MyScript Math Sample", which the task pane will display within.
 WebExtension webExtension = myScriptTaskPane.getWebExtension();

 // Set application store reference parameters for our add-in, such as the ID.
 webExtension.getReference().setId("WA104380646");
 webExtension.getReference().setVersion("1.0.0.0");
 webExtension.getReference().setStoreType(WebExtensionStoreType.OMEX);
 webExtension.getReference().setStore("English (United States)");
 webExtension.getProperties().add(new WebExtensionProperty("MyScript", "MyScript Math Sample"));
 webExtension.getBindings().add(new WebExtensionBinding("MyScript", WebExtensionBindingType.TEXT, "104380646"));

 // Allow the user to interact with the add-in.
 webExtension.isFrozen(false);

 // We can access the web extension in Microsoft Word via Developer -> Add-ins.
 doc.save(getArtifactsDir() + "Document.WebExtension.docx");

 // Remove all web extension task panes at once like this.
 doc.getWebExtensionTaskPanes().clear();

 Assert.assertEquals(0, doc.getWebExtensionTaskPanes().getCount());
 

Fields

FieldDescription
DEFAULTDefault value.
EXCHANGESpecifies that the store type is an Exchange server.
EX_CATALOGSpecifies that the store type is Centralized Deployment via Exchange.
FILE_SYSTEMSpecifies that the store type is a file system share.
OMEXSpecifies that the store type is Office.com.
REGISTRYSpecifies that the store type is the system registry.
SP_APP
SP_CATALOG
length

Methods

MethodDescription
fromName(String webExtensionStoreTypeName)
getName(int webExtensionStoreType)
getValues()
toString(int webExtensionStoreType)

DEFAULT

public static int DEFAULT

Default value.

EXCHANGE

public static int EXCHANGE

Specifies that the store type is an Exchange server.

EX_CATALOG

public static int EX_CATALOG

Specifies that the store type is Centralized Deployment via Exchange.

FILE_SYSTEM

public static int FILE_SYSTEM

Specifies that the store type is a file system share.

OMEX

public static int OMEX

Specifies that the store type is Office.com.

REGISTRY

public static int REGISTRY

Specifies that the store type is the system registry.

SP_APP

public static int SP_APP

SP_CATALOG

public static int SP_CATALOG

length

public static int length

fromName(String webExtensionStoreTypeName)

public static int fromName(String webExtensionStoreTypeName)

Parameters:

ParameterTypeDescription
webExtensionStoreTypeNamejava.lang.String

Returns: int

getName(int webExtensionStoreType)

public static String getName(int webExtensionStoreType)

Parameters:

ParameterTypeDescription
webExtensionStoreTypeint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int webExtensionStoreType)

public static String toString(int webExtensionStoreType)

Parameters:

ParameterTypeDescription
webExtensionStoreTypeint

Returns: java.lang.String