Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
157 changed files
with
6,463 additions
and
2,751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,39 @@ | ||
package edu.tamu.app; | ||
|
||
import java.util.Arrays; | ||
import java.util.HashSet; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.CommandLineRunner; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.stereotype.Component; | ||
|
||
import edu.tamu.app.model.repo.VersionManagementSoftwareRepo; | ||
import edu.tamu.app.model.CardType; | ||
import edu.tamu.app.model.repo.CardTypeRepo; | ||
import edu.tamu.app.model.repo.RemoteProjectManagerRepo; | ||
import edu.tamu.app.service.registry.ManagementBeanRegistry; | ||
|
||
@Component | ||
@Profile("!test") | ||
public class ProjectInitialization implements CommandLineRunner { | ||
|
||
@Autowired | ||
private ManagementBeanRegistry managementBeanRegistry; | ||
|
||
@Autowired | ||
private VersionManagementSoftwareRepo versionManagementSoftwareRepo; | ||
private RemoteProjectManagerRepo remoteProjectManagerRepo; | ||
|
||
@Autowired | ||
private CardTypeRepo cardTypeRepo; | ||
|
||
@Override | ||
public void run(String... args) throws Exception { | ||
versionManagementSoftwareRepo.findAll().forEach(versionManagementSoftware -> { | ||
remoteProjectManagerRepo.findAll().forEach(versionManagementSoftware -> { | ||
managementBeanRegistry.register(versionManagementSoftware); | ||
}); | ||
if (cardTypeRepo.findByIdentifier("Feature") == null) { | ||
cardTypeRepo.create(new CardType("Feature", new HashSet<String>(Arrays.asList(new String[] { "Story" })))); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package edu.tamu.app.cache; | ||
|
||
public abstract class AbstractCache<T> implements Cache<T> { | ||
|
||
private T cache; | ||
|
||
public synchronized T get() { | ||
return cache; | ||
} | ||
|
||
public synchronized void set(T cache) { | ||
this.cache = cache; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package edu.tamu.app.cache; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import edu.tamu.app.cache.model.Sprint; | ||
|
||
public class ActiveSprintsCache extends AbstractCache<List<Sprint>> { | ||
|
||
public ActiveSprintsCache() { | ||
set(new ArrayList<Sprint>()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package edu.tamu.app.cache; | ||
|
||
public interface Cache<T> { | ||
|
||
public T get(); | ||
|
||
public void set(T cache); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package edu.tamu.app.cache; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import edu.tamu.app.cache.model.ProjectStats; | ||
|
||
public class ProjectsStatsCache extends AbstractCache<List<ProjectStats>> { | ||
|
||
public ProjectsStatsCache() { | ||
set(new ArrayList<ProjectStats>()); | ||
} | ||
|
||
} |
Oops, something went wrong.