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 voidaddTransportDefinition(TransportDefinition tdef)Add a transport definition.longexportStore(java.io.OutputStream output, java.lang.Long ifModifiedSince)Export the model for the store to a jar file written tooutput.longgetStoreRevision()Get the current revision number for this store.TransportDefinitiongetTransportDefinition(java.lang.String className)java.util.List<TransportDefinition>getTransportDefinitions()voidimportStore(java.io.InputStream input, java.lang.Long ifUnmodifiedSince, ExternalizableStore.ImportOption... options)Import the model for the store from a jar file read frominput.voidremoveTransportDefinition(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 AttivioExceptionGet 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:
getStoreRevisionin interfaceExternalizableStore- Throws:
AttivioException
-
exportStore
public long exportStore(java.io.OutputStream output, java.lang.Long ifModifiedSince) throws AttivioExceptionExport the model for the store to a jar file written tooutput.- Specified by:
exportStorein interfaceExternalizableStore- Parameters:
output- TheOutputStreamto write the jar export to.ifModifiedSince- If non-null, will only write export tooutputif 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 AttivioExceptionImport the model for the store from a jar file read frominput.- Specified by:
importStorein 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.ImportOptions to use when importing to the store.- Throws:
AttivioException
-
getTransportDefinitions
public java.util.List<TransportDefinition> getTransportDefinitions()
- Specified by:
getTransportDefinitionsin 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:
addTransportDefinitionin interfaceTransportDefinitionStore
-
removeTransportDefinition
public void removeTransportDefinition(java.lang.String className)
Remove the TransportDefinition associated withclassName.- Specified by:
removeTransportDefinitionin interfaceTransportDefinitionStore
-
getTransportDefinition
public TransportDefinition getTransportDefinition(java.lang.String className)
- Specified by:
getTransportDefinitionin interfaceTransportDefinitionStore- Returns:
- the TransportDefinition associated with
classNameornullif none found
-
-