File[] concretStacks = stackFolder.listFiles(FILENAME_FILTER);
for (File stack : concretStacks) {
if (stack.isFile())
continue;
StackInfo stackInfo = getStackInfo(stack);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding new stack to known stacks"
+ ", stackName=" + stackFolder.getName()
+ ", stackVersion=" + stack.getName());
}
stacksResult.add(stackInfo);
// get repository data for current stack of techs
File repositoryFolder = new File(stack.getAbsolutePath()
+ File.separator + REPOSITORY_FOLDER_NAME + File.separator
+ REPOSITORY_FILE_NAME);
if (repositoryFolder.exists()) {
if (LOG.isDebugEnabled()) {
LOG.debug("Adding repositories to stack"
+ ", stackName=" + stackFolder.getName()
+ ", stackVersion=" + stack.getName()
+ ", repoFolder=" + repositoryFolder.getPath());
}
List<RepositoryInfo> repositoryInfoList = getRepository(repositoryFolder, stackInfo.getVersion());
stackInfo.getRepositories().addAll(repositoryInfoList);
}
// Get services for this stack
File servicesRootFolder = new File(stack.getAbsolutePath()
+ File.separator + SERVICES_FOLDER_NAME);
File[] servicesFolders = servicesRootFolder.listFiles(FILENAME_FILTER);
if (servicesFolders != null) {
for (File serviceFolder : servicesFolders) {
// Get information about service
ServiceInfo serviceInfo = new ServiceInfo();
serviceInfo.setName(serviceFolder.getName());
stackInfo.getServices().add(serviceInfo);
if (LOG.isDebugEnabled()) {
LOG.debug("Adding new service to stack"
+ ", stackName=" + stackFolder.getName()
+ ", stackVersion=" + stack.getName()