Package com.attivio.sdk.service
Class MockTransportDefinitionStore
- java.lang.Object
-
- com.attivio.sdk.service.MockTransportDefinitionStore
-
- All Implemented Interfaces:
ExternalizableStore
,TransportDefinitionStore
public class MockTransportDefinitionStore extends java.lang.Object implements TransportDefinitionStore
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.attivio.sdk.client.ExternalizableStore
ExternalizableStore.ImportOption
-
-
Constructor Summary
Constructors Constructor Description MockTransportDefinitionStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTransportDefinition(TransportDefinition tdef)
Add a transport definition.long
exportStore(java.io.OutputStream output, java.lang.Long ifModifiedSince)
Export the model for the store to a jar file written tooutput
.long
getStoreRevision()
Get the current revision number for this store.TransportDefinition
getTransportDefinition(java.lang.String className)
java.util.List<TransportDefinition>
getTransportDefinitions()
void
importStore(java.io.InputStream input, java.lang.Long ifUnmodifiedSince, ExternalizableStore.ImportOption... options)
Import the model for the store from a jar file read frominput
.void
removeTransportDefinition(java.lang.String className)
Remove the TransportDefinition associated withclassName
.-
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.transport.TransportDefinitionStore
getStoreName
-
-
-
-
Method Detail
-
getStoreRevision
public long getStoreRevision() throws AttivioException
Get the current revision number for this store.NOTE: revision numbers are not guaranteed to follow any sequence and may represent arbitrary checksums of internal data.
- Specified by:
getStoreRevision
in interfaceExternalizableStore
- Throws:
AttivioException
-
exportStore
public long exportStore(java.io.OutputStream output, java.lang.Long ifModifiedSince) throws AttivioException
Export the model for the store to a jar file written tooutput
.- Specified by:
exportStore
in interfaceExternalizableStore
- Parameters:
output
- TheOutputStream
to write the jar export to.ifModifiedSince
- If non-null, will only write export tooutput
if the store's current revision does not match this value.- Returns:
- The store revision for the export.
- Throws:
AttivioException
-
importStore
public void importStore(java.io.InputStream input, java.lang.Long ifUnmodifiedSince, ExternalizableStore.ImportOption... options) throws AttivioException
Import the model for the store from a jar file read frominput
.- Specified by:
importStore
in interfaceExternalizableStore
- Parameters:
input
- The inputstream that contains the jar.ifUnmodifiedSince
- If non-null, will only perform import if the store's current revision matches this value.options
- A list ofExternalizableStore.ImportOption
s to use when importing to the store.- Throws:
AttivioException
-
getTransportDefinitions
public java.util.List<TransportDefinition> getTransportDefinitions()
- Specified by:
getTransportDefinitions
in interfaceTransportDefinitionStore
- Returns:
- list of all TransportDefinitions
-
addTransportDefinition
public void addTransportDefinition(TransportDefinition tdef)
Add a transport definition. If transport class already exists it will be replaced.- Specified by:
addTransportDefinition
in interfaceTransportDefinitionStore
-
removeTransportDefinition
public void removeTransportDefinition(java.lang.String className)
Remove the TransportDefinition associated withclassName
.- Specified by:
removeTransportDefinition
in interfaceTransportDefinitionStore
-
getTransportDefinition
public TransportDefinition getTransportDefinition(java.lang.String className)
- Specified by:
getTransportDefinition
in interfaceTransportDefinitionStore
- Returns:
- the TransportDefinition associated with
className
ornull
if none found
-
-