public abstract class FileBasedProctorStore extends Object implements ProctorStore
| Modifier and Type | Class and Description |
|---|---|
static interface |
FileBasedProctorStore.ProctorUpdater |
static interface |
FileBasedProctorStore.RcsClient |
| Modifier and Type | Field and Description |
|---|---|
protected FileBasedPersisterCore |
core |
static String |
DEFAULT_TEST_DEFINITIONS_DIRECTORY |
| Modifier | Constructor and Description |
|---|---|
protected |
FileBasedProctorStore(FileBasedPersisterCore core) |
protected |
FileBasedProctorStore(FileBasedPersisterCore core,
String testDefinitionsDirectory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTestDefinition(ChangeMetadata changeMetadata,
String testName,
TestDefinition testDefinition,
Map<String,String> metadata)
Add new test definition to this store.
|
void |
close() |
void |
deleteTestDefinition(ChangeMetadata changeMetadata,
String previousVersion,
String testName,
TestDefinition testDefinition) |
FileBasedPersisterCore |
getCore() |
TestDefinition |
getCurrentTestDefinition(String testName) |
TestMatrixVersion |
getCurrentTestMatrix() |
TestDefinition |
getTestDefinition(String testName,
String fetchRevision) |
TestMatrixVersion |
getTestMatrix(String fetchRevision) |
void |
shutdown() |
void |
updateTestDefinition(ChangeMetadata changeMetadata,
String previousVersion,
String testName,
TestDefinition testDefinition,
Map<String,String> metadata)
Updates a test with testName that already exists in this store
Fails with Exception when testName does not exist, or
neither testDefinition nor metadata has changes to current version
|
protected <T> boolean |
updateThing(FileBasedProctorStore.RcsClient rcsClient,
File file,
T thing) |
protected static <T> boolean |
writeIfChanged(File f,
T newThing) |
protected static <T> void |
writeThing(File f,
T newThing) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNamegetAllHistories, getHistory, getHistory, getLatestVersion, getMatrixHistory, getMatrixHistory, getRevisionDetails, getTestEdits, getTestEdits, refresh, verifySetupaddTestDefinition, addTestDefinition, cleanUserWorkspace, deleteTestDefinition, deleteTestDefinition, updateTestDefinition, updateTestDefinition, verifySetuppublic static final String DEFAULT_TEST_DEFINITIONS_DIRECTORY
protected final FileBasedPersisterCore core
protected FileBasedProctorStore(FileBasedPersisterCore core, String testDefinitionsDirectory)
protected FileBasedProctorStore(FileBasedPersisterCore core)
protected static <T> boolean writeIfChanged(File f, T newThing) throws StoreException.TestUpdateException
StoreException.TestUpdateExceptionprotected static <T> void writeThing(File f, T newThing) throws StoreException.TestUpdateException
public TestMatrixVersion getCurrentTestMatrix() throws StoreException
getCurrentTestMatrix in interface ProctorReaderStoreExceptionpublic FileBasedPersisterCore getCore()
public final TestMatrixVersion getTestMatrix(String fetchRevision) throws StoreException
getTestMatrix in interface ProctorReaderfetchRevision - id of the revisionStoreException - if the revision is not found.public TestDefinition getCurrentTestDefinition(String testName) throws StoreException
getCurrentTestDefinition in interface ProctorReadertestName - name of the test.StoreExceptionpublic TestDefinition getTestDefinition(String testName, String fetchRevision) throws StoreException
getTestDefinition in interface ProctorReadertestName - name of the testfetchRevision - id of the revisionStoreException - if the revision is not found.public void shutdown()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionprotected final <T> boolean updateThing(FileBasedProctorStore.RcsClient rcsClient, File file, T thing) throws Exception
Exceptionpublic final void updateTestDefinition(ChangeMetadata changeMetadata, String previousVersion, String testName, TestDefinition testDefinition, Map<String,String> metadata) throws StoreException.TestUpdateException
ProctorWriterupdateTestDefinition in interface ProctorWriterStoreException.TestUpdateExceptionpublic final void addTestDefinition(ChangeMetadata changeMetadata, String testName, TestDefinition testDefinition, Map<String,String> metadata) throws StoreException.TestUpdateException
ProctorWriteraddTestDefinition in interface ProctorWriterStoreException.TestUpdateException - on invalid inputspublic final void deleteTestDefinition(ChangeMetadata changeMetadata, String previousVersion, String testName, TestDefinition testDefinition) throws StoreException.TestUpdateException
deleteTestDefinition in interface ProctorWriterStoreException.TestUpdateException - whenCopyright © 2022. All rights reserved.