Package com.attivio.sdk.schema
Class MockSchemaApi
- java.lang.Object
-
- com.attivio.sdk.schema.MockSchemaApi
-
- All Implemented Interfaces:
SchemaApi,SchemaUtil,java.io.Closeable,java.lang.AutoCloseable
public class MockSchemaApi extends java.lang.Object implements SchemaApi, java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description MockSchemaApi()MockSchemaApi(Schema... schemas)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemaaddSchema(Schema schema)Add/updateschemavoidclose()static SchemacreateDefaultSchema()SchemagetSchema(java.lang.String schemaName)Fetch a schema according toschemaName.java.util.List<java.lang.String>getSchemaNames()Get the names of all available schemas.voidremoveSchema(java.lang.String schemaName)Remove a schema from the system.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.attivio.sdk.server.util.SchemaUtil
getDefaultSchema
-
-
-
-
Constructor Detail
-
MockSchemaApi
public MockSchemaApi()
-
MockSchemaApi
public MockSchemaApi(Schema... schemas)
-
-
Method Detail
-
getSchemaNames
public java.util.List<java.lang.String> getSchemaNames()
Description copied from interface:SchemaApiGet the names of all available schemas.- Specified by:
getSchemaNamesin interfaceSchemaApi
-
getSchema
public Schema getSchema(java.lang.String schemaName)
Description copied from interface:SchemaApiFetch a schema according toschemaName.If
schemaNameisnull, the default schema will be returned, if available.Returns
nullif schema does not exist.- Specified by:
getSchemain interfaceSchemaApi- Specified by:
getSchemain interfaceSchemaUtil- Parameters:
schemaName- the schema name- Returns:
- the schema
-
addSchema
public Schema addSchema(Schema schema)
Description copied from interface:SchemaApiAdd/updateschemaWARNING: System restart will be required for all components to take notice of the new/modified schema.
-
removeSchema
public void removeSchema(java.lang.String schemaName)
Description copied from interface:SchemaApiRemove a schema from the system.WARNING: System restart will be required for all components to take notice of the removed schema.
- Specified by:
removeSchemain interfaceSchemaApi
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
createDefaultSchema
public static Schema createDefaultSchema()
-
-