We study the stationary nonlinear Schr\"odinger equation, or Gross-Pitaevskii
equation, for a one--dimensional finite square well potential. By neglecting
the mean--field interaction outside the potential well it is possible to
discuss the transport properties of the system analytically in terms of ingoing
and outgoing waves. Resonances and bound states are obtained analytically. The
transmitted flux shows a bistable behaviour. Novel crossing scenarios of
eigenstates similar to beak--to--beak structures are observed for a repulsive
mean-field interaction. It is proven that resonances transform to bound states
due to an attractive nonlinearity and vice versa for a repulsive nonlinearity,
and the critical nonlinearity for the transformation is calculated
analytically. The bound state wavefunctions of the system satisfy an
oscillation theorem as in the case of linear quantum mechanics. Furthermore,
the implications of the eigenstates on the dymamics of the system are
discussed.Comment: RevTeX4, 16 pages, 19 figure