Search in sources :

Example 16 with ApplicationNode

use of org.codice.ddf.admin.application.service.ApplicationNode in project ddf by codice.

the class ApplicationServiceBean method getApplications.

@Override
public List<Map<String, Object>> getApplications() {
    Set<ApplicationNode> rootApplications = appService.getApplicationTree();
    List<Map<String, Object>> applications = new ArrayList<Map<String, Object>>();
    List<Map<String, Object>> applicationsArray = new ArrayList<Map<String, Object>>();
    for (ApplicationNode curRoot : rootApplications) {
        List<String> parentList = new ArrayList<String>();
        applications.add(convertApplicationEntries(curRoot, parentList, applicationsArray));
    }
    LOGGER.debug("Returning {} root applications.", applications.size());
    return applicationsArray;
}
Also used : ArrayList(java.util.ArrayList) ApplicationNode(org.codice.ddf.admin.application.service.ApplicationNode) HashMap(java.util.HashMap) Map(java.util.Map)

Example 17 with ApplicationNode

use of org.codice.ddf.admin.application.service.ApplicationNode in project ddf by codice.

the class ApplicationServiceBean method getApplicationTree.

@Override
public List<Map<String, Object>> getApplicationTree() {
    Set<ApplicationNode> rootApplications = appService.getApplicationTree();
    List<Map<String, Object>> applications = new ArrayList<Map<String, Object>>();
    for (ApplicationNode curRoot : rootApplications) {
        applications.add(convertApplicationNode(curRoot));
    }
    LOGGER.debug("Returning {} root applications.", applications.size());
    return applications;
}
Also used : ArrayList(java.util.ArrayList) ApplicationNode(org.codice.ddf.admin.application.service.ApplicationNode) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

ApplicationNode (org.codice.ddf.admin.application.service.ApplicationNode)17 Application (org.codice.ddf.admin.application.service.Application)11 HashMap (java.util.HashMap)8 Test (org.junit.Test)8 HashSet (java.util.HashSet)5 Map (java.util.Map)5 TreeSet (java.util.TreeSet)5 ArrayList (java.util.ArrayList)4 Repository (org.apache.karaf.features.Repository)3 ApplicationService (org.codice.ddf.admin.application.service.ApplicationService)3 FeaturesService (org.apache.karaf.features.FeaturesService)2 SecurityServiceException (ddf.security.service.SecurityServiceException)1 PrintStream (java.io.PrintStream)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 EnumSet (java.util.EnumSet)1 Set (java.util.Set)1 Dependency (org.apache.karaf.features.Dependency)1 Feature (org.apache.karaf.features.Feature)1 RepositoryImpl (org.apache.karaf.features.internal.service.RepositoryImpl)1 ApplicationServiceException (org.codice.ddf.admin.application.service.ApplicationServiceException)1