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 Schema
addSchema(Schema schema)
Add/updateschema
void
close()
static Schema
createDefaultSchema()
Schema
getSchema(java.lang.String schemaName)
Fetch a schema according toschemaName
.java.util.List<java.lang.String>
getSchemaNames()
Get the names of all available schemas.void
removeSchema(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:SchemaApi
Get the names of all available schemas.- Specified by:
getSchemaNames
in interfaceSchemaApi
-
getSchema
public Schema getSchema(java.lang.String schemaName)
Description copied from interface:SchemaApi
Fetch a schema according toschemaName
.If
schemaName
isnull
, the default schema will be returned, if available.Returns
null
if schema does not exist.- Specified by:
getSchema
in interfaceSchemaApi
- Specified by:
getSchema
in interfaceSchemaUtil
- Parameters:
schemaName
- the schema name- Returns:
- the schema
-
addSchema
public Schema addSchema(Schema schema)
Description copied from interface:SchemaApi
Add/updateschema
WARNING: 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:SchemaApi
Remove a schema from the system.WARNING: System restart will be required for all components to take notice of the removed schema.
- Specified by:
removeSchema
in interfaceSchemaApi
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
createDefaultSchema
public static Schema createDefaultSchema()
-
-