code: @Override
  	public List<Instance> listChildrenInstances( String applicationName, String instancePath, boolean allChildren ) {
  
  		List<Instance> result = new ArrayList<> ();
  		Application app = this.manager.applicationMngr().findApplicationByName( applicationName );
  
  		// Log
  		if( instancePath == null )
  			this.logger.fine( "Request: list " + (allChildren ? "all" : "root") + " instances for " + applicationName + "." );
  		else
  			this.logger.fine( "Request: list " + (allChildren ? "all" : "direct") + " children instances for " + instancePath + " in " + applicationName + "." );
  
  		// Find the instances
  		Instance inst;
  		if( app != null ) {
  			if( instancePath == null ) {
  				if( allChildren )
  					result.addAll( InstanceHelpers.getAllInstances( app ));
  				else
  					result.addAll( app.getRootInstances());
  			}
  
  			else if(( inst = InstanceHelpers.findInstanceByPath( app, instancePath )) != null ) {
  				if( allChildren ) {
  					result.addAll( InstanceHelpers.buildHierarchicalList( inst ));
  					result.remove( inst );
  				} else {
  					result.addAll( inst.getChildren());
  				}
  			}
  		}
  
  		// Bug #64: sort instance paths for the clients
  		Collections.sort( result, new InstanceComparator());
  		return result;
  	}
docs: /*
  (non-Javadoc)
  @see net.roboconf.dm.internal.rest.api.IApplicationWs
  #listChildrenInstances(java.lang.String, java.lang.String, boolean)