public class OntrackDSLV3Facade extends Object implements OntrackDSLFacade
| Constructor and Description |
|---|
OntrackDSLV3Facade(OntrackConfiguration config,
OntrackDSLLogger logger) |
| Modifier and Type | Method and Description |
|---|---|
BranchFacade |
branch(String project,
String branch)
Gets a branch
|
BuildFacade |
build(String projectName,
String branchName,
String buildName)
Gets a build
|
String |
getAppVersion()
Gets the version of the remote app version
|
Object |
getDSLRoot()
Gets the root object to inject as
ontrack into the
DSL scripts. |
String |
getVersion()
Version of this facade
|
Object |
graphQLQuery(String query,
Map<String,?> vars)
Runs an arbitrary GraphQL query
|
void |
onClientException(Exception exception,
Consumer<String> handler)
Catching client exceptions
|
<T> T |
onNotFoundException(Exception exception,
Supplier<T> handler)
Catching not found exceptions
|
ProjectFacade |
project(String project)
Gets a project
|
public OntrackDSLV3Facade(OntrackConfiguration config, OntrackDSLLogger logger)
public String getVersion()
OntrackDSLFacadegetVersion in interface OntrackDSLFacadeOntrackConfiguration.getOntrackVersion(),
OntrackConfiguration.VERSION_3,
OntrackConfiguration.VERSION_4public String getAppVersion()
OntrackDSLFacadegetAppVersion in interface OntrackDSLFacadepublic Object getDSLRoot()
OntrackDSLFacadeontrack into the
DSL scripts.getDSLRoot in interface OntrackDSLFacadepublic void onClientException(Exception exception, Consumer<String> handler)
OntrackDSLFacadeonClientException in interface OntrackDSLFacadeexception - Exception to managehandler - Handler called with the exception message if the exception is a client exceptionpublic <T> T onNotFoundException(Exception exception, Supplier<T> handler)
OntrackDSLFacadeonNotFoundException in interface OntrackDSLFacadeT - Type of object returned by the handlerexception - Exception to managehandler - Handler called if the exception is a "not found" exceptionpublic Object graphQLQuery(String query, Map<String,?> vars)
OntrackDSLFacadegraphQLQuery in interface OntrackDSLFacadequery - GraphQL queryvars - Variables for the querypublic ProjectFacade project(String project)
OntrackDSLFacadeproject in interface OntrackDSLFacadeproject - Name of the projectpublic BranchFacade branch(String project, String branch)
OntrackDSLFacadebranch in interface OntrackDSLFacadeproject - Name of the projectbranch - Name of the branchpublic BuildFacade build(String projectName, String branchName, String buildName)
OntrackDSLFacadebuild in interface OntrackDSLFacadeprojectName - Name of the projectbranchName - Name of the branchbuildName - Name of the buildCopyright © 2016–2023. All rights reserved.