public Collection < ? extends RepositoryResource > getAllResources ( LicenseType licenseType , ResourceType type ) throws RepositoryBackendException { Collection < ? extends RepositoryResource > allResources = getAllResources ( type ) ; if ( licenseType != null ) { Collection < RepositoryResource > licensedResources = new ArrayList < RepositoryResource > ( ) ; for ( RepositoryResource resource : getAllResources ( type ) ) { if ( licenseType . equals ( resource . getLicenseType ( ) ) ) { licensedResources . add ( resource ) ; } } return licensedResources ; } else { return allResources ; } }
Gets all resources of the specified type and license type from the repositories .