Over the course of the next 12 months I will be adding functions to this page so bookmark it and come back regularly for new cool features and updates.
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: OrchestratorBaseService.ts
import{MissingRequiredParameterError}from"../Extensions";
import{BaseService}from"../BaseService";
exportclassPluginBaseServiceextendsBaseService{
constructor(strProjectID:string){
if (!strProjectID){
thrownewMissingRequiredParameterError('strProjectID');
}
super(strProjectID,"Orchestrator");
this.arrWorkflows= [];
}
protectedserverFindAllForType<T>(strObjectTypeName:string,strQuery?:string,blnXPathQuery:boolean=true):T[]{
if (blnXPathQuery===true&&strQuery){
strQuery=`xpath:${strQuery}`;
}
letarrObjectType:T[]=Server.findAllForType(strObjectTypeName,strQuery)asT[];
returnarrObjectType;
}
protectedserverFindForType<T>(strObjectTypeName:string,strObjectID:string):T{
letobjObjectType:T=Server.findForType(strObjectTypeName,strObjectID)asT;
returnobjObjectType;
}
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
