public synchronized void attachManagedResources(String routerPath,Router router){
  if (CONFIG_BASE_PATH.equals(routerPath)) {
    this.configRouter=router;
  }
 else   if (SCHEMA_BASE_PATH.equals(routerPath)) {
    this.schemaRouter=router;
  }
 else {
    throw new SolrException(ErrorCode.SERVER_ERROR,routerPath + " not supported by the RestManager");
  }
  int numAttached=0;
  for (  String resourceId : managed.keySet()) {
    if (resourceId.startsWith(routerPath)) {
      String path=resourceId.substring(routerPath.length());
      attachManagedResource(managed.get(resourceId),path,router);
      ++numAttached;
    }
  }
  log.info("Attached {} ManagedResource endpoints to Restlet router: {}",numAttached,routerPath);
}

public synchronized void attachManagedResources ( String routerPath , Router router ) { if ( CONFIG_BASE_PATH . equals ( routerPath ) ) { this . configRouter = router ; } else if ( SCHEMA_BASE_PATH . equals ( routerPath ) ) { this . schemaRouter = router ; } else { throw new SolrException ( ErrorCode . SERVER_ERROR , routerPath + " not supported by the RestManager" ) ; } int numAttached = 0 ; for ( String resourceId : managed . keySet ( ) ) { if ( resourceId . startsWith ( routerPath ) ) { String path = resourceId . substring ( routerPath . length ( ) ) ; attachManagedResource ( managed . get ( resourceId ) , path , router ) ; ++ numAttached ; } } log . info ( "Attached {} ManagedResource endpoints to Restlet router: {}" , numAttached , routerPath ) ; }
attach managed resource paths to the given restlet router .
