Skip to content

Commit

Permalink
Resolving javadoc warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Palis <[email protected]>
  • Loading branch information
joshpalis committed Oct 12, 2023
1 parent b910ebc commit decb31f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/main/java/org/opensearch/flowframework/common/CommonValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@
*/
public class CommonValue {

/** Default value for no schema version */
public static Integer NO_SCHEMA_VERSION = 0;
/** Index mapping meta field name*/
public static final String META = "_meta";
/** Schema Version field name */
public static final String SCHEMA_VERSION_FIELD = "schema_version";
/** Global Context Index Name */
public static final String GLOBAL_CONTEXT_INDEX = ".plugins-ai-global-context";
/** Global Context index mapping file path */
public static final String GLOBAL_CONTEXT_INDEX_MAPPING = "mappings/global-context.json";
/** Global Context index mapping version */
public static final Integer GLOBAL_CONTEXT_INDEX_VERSION = 1;

/** The base URI for this plugin's rest actions */
Expand All @@ -34,13 +40,22 @@ public class CommonValue {
/** The provision workflow thread pool name */
public static final String PROVISION_THREAD_POOL = "opensearch_workflow_provision";

/** Model Id field */
public static final String MODEL_ID = "model_id";
/** Function Name field */
public static final String FUNCTION_NAME = "function_name";
/** Model Name field */
public static final String MODEL_NAME = "name";
/** Model Version field */
public static final String MODEL_VERSION = "model_version";
/** Model Group Id field */
public static final String MODEL_GROUP_ID = "model_group_id";
/** Description field */
public static final String DESCRIPTION = "description";
/** Connector Id field */
public static final String CONNECTOR_ID = "connector_id";
/** Model format field */
public static final String MODEL_FORMAT = "model_format";
/** Model config field */
public static final String MODEL_CONFIG = "model_config";
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class FlowFrameworkException extends RuntimeException {

private static final long serialVersionUID = 1L;

/** The rest status code of this exception */
private final RestStatus restStatus;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* An enumeration of Flow Framework indices
*/
public enum FlowFrameworkIndex {
/**
* Global Context Index
*/
GLOBAL_CONTEXT(
GLOBAL_CONTEXT_INDEX,
ThrowingSupplierWrapper.throwingSupplierWrapper(GlobalContextHandler::getGlobalContextMappings),
Expand All @@ -35,14 +38,26 @@ public enum FlowFrameworkIndex {
this.version = version;
}

/**
* Retrieves the index name
* @return the index name
*/
public String getIndexName() {
return indexName;
}

/**
* Retrieves the index mapping
* @return the index mapping
*/
public String getMapping() {
return mapping;
}

/**
* Retrieves the index version
* @return the index version
*/
public Integer getVersion() {
return version;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
* @param builder the XContentBuilder
* @param params the params
* @return the XContentBuilder
* @throws IOException
* @throws IOException if the document source fails to be generated
*/
public XContentBuilder toDocumentSource(XContentBuilder builder, Params params) throws IOException {
XContentBuilder xContentBuilder = builder.startObject();
Expand Down

0 comments on commit decb31f

Please sign in to comment.