/** * Searches for resource managers corresponding to a workspace path. * * @param workspace * may not be <code>null</code> * @param path * may not be <code>null</code>, may contain other path elements * @return a list of matching resource managers, may be empty but never <code>null</code> */ public static List<ResourceManager<?>> getManagersForWorkspacePath( Workspace workspace, String path ) { List<ResourceManager<?>> result = new ArrayList<ResourceManager<?>>(); List<ResourceManager<?>> list = workspace.getResourceManagers(); for ( ResourceManager<?> mgr : list ) { ResourceManagerMetadata<?> md = mgr.getMetadata(); if ( path.startsWith( md.getWorkspacePath() ) ) { result.add( mgr ); } } return result; }