// Path: liberty-starter-application/src/main/java/com/ibm/liberty/starter/api/v1/model/internal/Services.java
// public class Services {
//     private List<Service> services;
// 
//     public List<Service> getServices() {
//         return services;
//     }
// 
//     public void setServices(List<Service> services) {
//         this.services = services;
//     }
// 
// }
// 
// Path: liberty-starter-model/src/main/java/com/ibm/liberty/starter/api/v1/model/registration/Service.java
// public class Service {
// 
//     private String id;
//     private String name;
//     private String description;
//     private String endpoint;
//     private String configuration;
//     private boolean options;
//     private String image;
//     private String imageSelected;
// 
//     @ApiModelProperty(value="Unique ID for this technology", required=true)
//     public String getId() {
//             return id;
//     }
//     public void setId(String id) {
//             this.id = id;
//     }
// 
//     @ApiModelProperty(value="Name of the technology (does not have to be unique, although it will be confusing if it isn't)", required=true)
//     public String getName() {
//             return name;
//     }
//     public void setName(String name) {
//             this.name = name;
//     }
// 
//     @ApiModelProperty(value="Description of the technology", required=true)
//     public String getDescription() {
//             return description;
//     }
//     public void setDescription(String description) {
//             this.description = description;
//     }
// 
//     @ApiModelProperty(value="The endpoint to access the service", required=true)
//     public String getEndpoint() {
//             return endpoint;
//     }
//     public void setEndpoint(String endpoint) {
//             this.endpoint = endpoint;
//     }
// 
//     @ApiModelProperty(value="Specifies whether this technology allows any configuration(s). Value could either be 'yes' or a list of other technologies, seperated by comma. If a list of technologies is specified then the configuration(s) will be enabled only if all technologies on the list are selected by user", required=false)
//     public String getConfiguration() {
//             return configuration;
//     }
//     public void setConfiguration(String configuration) {
//             this.configuration = configuration;
//     }
// 
//     @ApiModelProperty(value="Specifies whether this technology has any additional options that can be set by the user", required=false)
//     public boolean getOptions() {
//             return options;
//     }
//     public void setOptions(boolean options) {
//             this.options = options;
//     }
// 
//     @Override
//     public String toString() {
//         return "Service [id=" + id + ", endpoint=" + endpoint + "]";
//     }
//     
//     @ApiModelProperty(value="Specifies an image to display on the technology button", required=false)
//     public String getImage() {
//         return image;
//     }
//     
//     public void setImage(String image) {
//         this.image = image;
//     }
//     
//     @ApiModelProperty(value="Specifies an image to display on the technology button when it is selected", required=false)
//     public String getImageSelected() {
//         return imageSelected;
//     }
//     
//     public void setImageSelected(String image) {
//         this.imageSelected = image;
//     }
// }


import com.ibm.liberty.starter.api.v1.model.internal.Services;
import com.ibm.liberty.starter.api.v1.model.registration.Service;
import io.jsonwebtoken.*;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.validation.ValidationException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.logging.Logger;
import java.util.stream.Collectors;
        }

        if (deploy == null) {
            log.severe("No deploy type specified");
            throw new ValidationException();
        }
        ProjectConstructor.DeployType deployType = ProjectConstructor.DeployType.valueOf(deploy.toUpperCase());
        ProjectConstructor.BuildType buildType;
        try {
            buildType = ProjectConstructor.BuildType.valueOf(build.toUpperCase());
        } catch (Exception e) {
            buildType = ProjectConstructor.BuildType.MAVEN;
        }
        if (artifactId != null && !PatternValidation.checkPattern(PatternValidation.PatternType.ARTIFACT_ID, artifactId)) {
            log.severe("Invalid artifactId.");
            throw new ValidationException();
        }
        
        if (groupId != null && !PatternValidation.checkPattern(PatternValidation.PatternType.ARTIFACT_ID, groupId)) {
            log.severe("Invalid groupId.");
            throw new ValidationException();
        }
        
        if (generationId != null && !PatternValidation.checkPattern(PatternValidation.PatternType.GENERATION_ID, generationId)) {
            log.severe("Invalid generationId.");
            throw new ValidationException();
        }
        return new ProjectConstructionInputData(services, serviceConnector, name, deployType, buildType, StarterUtil.getWorkspaceDir(workspaceId), techOptions, artifactId, groupId, generationId, beta);
    }
    
// Path: liberty-starter-application/src/main/java/com/ibm/liberty/starter/api/v1/model/internal/Services.java
// public class Services {
//     private List<Service> services;
// 
//     public List<Service> getServices() {
//         return services;
//     }
// 
//     public void setServices(List<Service> services) {
//         this.services = services;
//     }
// 
// }
// 
// Path: liberty-starter-model/src/main/java/com/ibm/liberty/starter/api/v1/model/registration/Service.java
// public class Service {
// 
//     private String id;
//     private String name;
//     private String description;
//     private String endpoint;
//     private String configuration;
//     private boolean options;
//     private String image;
//     private String imageSelected;
// 
//     @ApiModelProperty(value="Unique ID for this technology", required=true)
//     public String getId() {
//             return id;
//     }
//     public void setId(String id) {
//             this.id = id;
//     }
// 
//     @ApiModelProperty(value="Name of the technology (does not have to be unique, although it will be confusing if it isn't)", required=true)
//     public String getName() {
//             return name;
//     }
//     public void setName(String name) {
//             this.name = name;
//     }
// 
//     @ApiModelProperty(value="Description of the technology", required=true)
//     public String getDescription() {
//             return description;
//     }
//     public void setDescription(String description) {
//             this.description = description;
//     }
// 
//     @ApiModelProperty(value="The endpoint to access the service", required=true)
//     public String getEndpoint() {
//             return endpoint;
//     }
//     public void setEndpoint(String endpoint) {
//             this.endpoint = endpoint;
//     }
// 
//     @ApiModelProperty(value="Specifies whether this technology allows any configuration(s). Value could either be 'yes' or a list of other technologies, seperated by comma. If a list of technologies is specified then the configuration(s) will be enabled only if all technologies on the list are selected by user", required=false)
//     public String getConfiguration() {
//             return configuration;
//     }
//     public void setConfiguration(String configuration) {
//             this.configuration = configuration;
//     }
// 
//     @ApiModelProperty(value="Specifies whether this technology has any additional options that can be set by the user", required=false)
//     public boolean getOptions() {
//             return options;
//     }
//     public void setOptions(boolean options) {
//             this.options = options;
//     }
// 
//     @Override
//     public String toString() {
//         return "Service [id=" + id + ", endpoint=" + endpoint + "]";
//     }
//     
//     @ApiModelProperty(value="Specifies an image to display on the technology button", required=false)
//     public String getImage() {
//         return image;
//     }
//     
//     public void setImage(String image) {
//         this.image = image;
//     }
//     
//     @ApiModelProperty(value="Specifies an image to display on the technology button when it is selected", required=false)
//     public String getImageSelected() {
//         return imageSelected;
//     }
//     
//     public void setImageSelected(String image) {
//         this.imageSelected = image;
//     }
// }


// Path: liberty-starter-application/src/main/java/com/ibm/liberty/starter/ProjectConstructionInput.java
import com.ibm.liberty.starter.api.v1.model.internal.Services;
import com.ibm.liberty.starter.api.v1.model.registration.Service;
import io.jsonwebtoken.*;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.validation.ValidationException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.logging.Logger;
import java.util.stream.Collectors;

        }

        if (deploy == null) {
            log.severe("No deploy type specified");
            throw new ValidationException();
        }
        ProjectConstructor.DeployType deployType = ProjectConstructor.DeployType.valueOf(deploy.toUpperCase());
        ProjectConstructor.BuildType buildType;
        try {
            buildType = ProjectConstructor.BuildType.valueOf(build.toUpperCase());
        } catch (Exception e) {
            buildType = ProjectConstructor.BuildType.MAVEN;
        }
        if (artifactId != null && !PatternValidation.checkPattern(PatternValidation.PatternType.ARTIFACT_ID, artifactId)) {
            log.severe("Invalid artifactId.");
            throw new ValidationException();
        }
        
        if (groupId != null && !PatternValidation.checkPattern(PatternValidation.PatternType.ARTIFACT_ID, groupId)) {
            log.severe("Invalid groupId.");
            throw new ValidationException();
        }
        
        if (generationId != null && !PatternValidation.checkPattern(PatternValidation.PatternType.GENERATION_ID, generationId)) {
            log.severe("Invalid generationId.");
            throw new ValidationException();
        }
        return new ProjectConstructionInputData(services, serviceConnector, name, deployType, buildType, StarterUtil.getWorkspaceDir(workspaceId), techOptions, artifactId, groupId, generationId, beta);
    }
    
    private void prepareDynamicPackages(Service service, String workspaceId, String techOptions, String[] techs) {