code: private DOMNode getExistingComponent(final String name) {
  
  		final App app  = StructrApp.getInstance();
  		DOMNode result = null;
  
  		try (final Tx tx = app.tx()) {
  
  			if (DeployCommand.isUuid(name)) {
  
  				result = (DOMNode) StructrApp.getInstance().nodeQuery(DOMNode.class).and(GraphObject.id, name).getFirst();
  			} else {
  
  				result = Importer.findSharedComponentByName(name);
  			}
  
  			tx.success();
  
  		} catch (FrameworkException fex) {
  			logger.warn("Unable to determine if component {} already exists, ignoring.", name);
  		}
  
  		return result;
  	}
docs: ----- private methods -----