code: @Override
  	public List<TargetAssociation> findTargetAssociations( String applicationName ) {
  
  		this.logger.fine( "Request: find target associations in " + applicationName + "." );
  		List<TargetAssociation> result = new ArrayList<> ();
  
  		Application app = this.manager.applicationMngr().findApplicationByName( applicationName );
  		if( app != null ) {
  
  			// Default target for the application.
  			// It must be in first position.
  			String defaultTargetId = this.manager.targetsMngr().findTargetId( app, null );
  			TargetWrapperDescriptor twd = null;
  			if( defaultTargetId != null )
  				twd = this.manager.targetsMngr().findTargetById( defaultTargetId );
  
  			result.add( new TargetAssociation( "", null, twd ));
  
  			// Then, show the scoped instances.
  			// List them, even if they do not have an associated target.
  			for( Instance inst : InstanceHelpers.findAllScopedInstances( app )) {
  				String instancePath = InstanceHelpers.computeInstancePath( inst );
  				String targetId = this.manager.targetsMngr().findTargetId( app, instancePath, true );
  
  				twd = null;
  				if( targetId != null )
  					twd = this.manager.targetsMngr().findTargetById( targetId );
  
  				result.add( new TargetAssociation( instancePath, inst.getComponent().getName(), twd ));
  			}
  
  			// Deal with components.
  			for( Component comp : ComponentHelpers.findAllComponents( app )) {
  				if( ! ComponentHelpers.isTarget( comp ))
  					continue;
  
  				String key = "@" + comp.getName();
  				String targetId = this.manager.targetsMngr().findTargetId( app, key, true );
  
  				twd = null;
  				if( targetId != null )
  					twd = this.manager.targetsMngr().findTargetById( targetId );
  
  				result.add( new TargetAssociation( key, null, twd ));
  			}
  		}
  
  		return result;
  	}
docs: /*
  (non-Javadoc)
  @see net.roboconf.dm.rest.services.internal.resources.IApplicationResource
  #findTargetAssociations(java.lang.String)