public class MockHubService extends Object implements HubService
Modifier and Type | Field and Description |
---|---|
static UUID |
alreadyRegisteredUUID |
static String |
apiKey |
static UUID |
deletedUUID |
static UUID |
failUUID |
static HubChangeLog |
lastCreatedChangelog |
static UUID |
notFoundChangeLogUUID |
static Integer |
numberOfProjectsInList |
boolean |
online |
static Date |
operationCreateDate |
static UUID |
organizationId |
static UUID |
randomUUID |
List<HubChangeLog> |
returnChangeLogs |
List<Connection> |
returnConnections |
List<Project> |
returnProjects |
static SortedMap<String,List> |
sentObjects |
PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
Constructor and Description |
---|
MockHubService() |
public static UUID randomUUID
public static UUID deletedUUID
public static UUID alreadyRegisteredUUID
public static UUID failUUID
public static UUID notFoundChangeLogUUID
public static Date operationCreateDate
public static String apiKey
public static UUID organizationId
public static Integer numberOfProjectsInList
public static HubChangeLog lastCreatedChangelog
public List<Connection> returnConnections
public List<HubChangeLog> returnChangeLogs
public boolean online
public int getPriority()
getPriority
in interface PrioritizedService
public boolean isOnline()
isOnline
in interface HubService
public HubUser getMe() throws LiquibaseHubException
getMe
in interface HubService
LiquibaseHubException
public Organization getOrganization() throws LiquibaseHubException
getOrganization
in interface HubService
LiquibaseHubException
public Project createProject(Project project)
createProject
in interface HubService
public HubChangeLog createChangeLog(HubChangeLog hubChangeLog) throws LiquibaseException
createChangeLog
in interface HubService
LiquibaseException
public List<Project> getProjects() throws LiquibaseHubException
getProjects
in interface HubService
LiquibaseHubException
public Project getProject(UUID projectId) throws LiquibaseHubException
getProject
in interface HubService
LiquibaseHubException
public Project findProjectByConnectionIdOrJdbcUrl(UUID connectionId, String jdbcUrl) throws LiquibaseHubException
findProjectByConnectionIdOrJdbcUrl
in interface HubService
LiquibaseHubException
public HubRegisterResponse register(String email) throws LiquibaseHubException
register
in interface HubService
LiquibaseHubException
public HubChangeLog deactivateChangeLog(HubChangeLog hubChangeLog) throws LiquibaseHubException
deactivateChangeLog
in interface HubService
LiquibaseHubException
public void setRanChangeSets(Connection connectionId, List<RanChangeSet> ranChangeSets) throws LiquibaseHubException
setRanChangeSets
in interface HubService
LiquibaseHubException
public List<Connection> getConnections(Connection exampleConnection)
getConnections
in interface HubService
public Connection getConnection(Connection exampleConnection, boolean createIfNotExists) throws LiquibaseHubException
getConnection
in interface HubService
LiquibaseHubException
public Connection createConnection(Connection connection) throws LiquibaseHubException
createConnection
in interface HubService
LiquibaseHubException
public HubChangeLog getHubChangeLog(UUID changeLogId) throws LiquibaseHubException
getHubChangeLog
in interface HubService
LiquibaseHubException
public HubChangeLog getHubChangeLog(UUID changeLogId, String includeStatus) throws LiquibaseHubException
getHubChangeLog
in interface HubService
LiquibaseHubException
public Operation createOperation(String operationType, String operationCommand, HubChangeLog changeLog, Connection connection) throws LiquibaseHubException
createOperation
in interface HubService
LiquibaseHubException
public Operation createOperationInOrganization(String operationType, String operationCommand, UUID organizationId) throws LiquibaseHubException
createOperationInOrganization
in interface HubService
LiquibaseHubException
public OperationEvent sendOperationEvent(Operation operation, OperationEvent operationEvent) throws LiquibaseException
sendOperationEvent
in interface HubService
LiquibaseException
public void sendOperationChangeEvent(OperationChangeEvent operationChangeEvent) throws LiquibaseException
sendOperationChangeEvent
in interface HubService
LiquibaseException
public void sendOperationChanges(OperationChange operationChange) throws LiquibaseHubException
sendOperationChanges
in interface HubService
LiquibaseHubException
public String shortenLink(String url) throws LiquibaseException
HubService
shortenLink
in interface HubService
url
- The link to shortenLiquibaseHubException
- If shortening failsLiquibaseException
public OperationEvent sendOperationEvent(Operation operation, OperationEvent operationEvent, UUID organizationId) throws LiquibaseException
sendOperationEvent
in interface HubService
LiquibaseException
public CoreInitOnboardingResponse validateOnboardingToken(String token) throws LiquibaseHubException
validateOnboardingToken
in interface HubService
LiquibaseHubException
public void reset()
Copyright © 2023 Liquibase.org. All rights reserved.