private List < Group > getGroups ( ) throws Exception { List < Group > groups = new ArrayList < Group > ( ) ; List < Group > sourceGroups = PathOverrideService . getInstance ( ) . findAllGroups ( ) ; // loop through the groups for ( Group sourceGroup : sourceGroups ) { Group group = new Group ( ) ; // add all methods ArrayList < Method > methods = new ArrayList < Method > ( ) ; for ( Method sourceMethod : EditService . getInstance ( ) . getMethodsFromGroupId ( sourceGroup . getId ( ) , null ) ) { Method method = new Method ( ) ; method . setClassName ( sourceMethod . getClassName ( ) ) ; method . setMethodName ( sourceMethod . getMethodName ( ) ) ; methods . add ( method ) ; } group . setMethods ( methods ) ; group . setName ( sourceGroup . getName ( ) ) ; groups . add ( group ) ; } return groups ; }
Get all Groups