As your characterization of what he said doesn't exactly jive with what he actually said. ;)
Now, finally, there remains the question of detainees at Guantanamo who cannot be prosecuted yet who pose a clear danger to the American people. And I have to be honest here -- this is the toughest single issue that we will face. We're going to exhaust every avenue that we have to prosecute those at Guantanamo who pose a danger to our country. But even when this process is complete, there may be a number of people who cannot be prosecuted for past crimes, in some cases because evidence may be tainted, but who nonetheless pose a threat to the security of the United States. Examples of that threat include people who've received extensive explosives training at al Qaeda training camps, or commanded Taliban troops in battle, or expressed their allegiance to Osama bin Laden, or otherwise made it clear that they want to kill Americans. These are people who, in effect, remain at war with the United States.
(notice all of the past tense verbs used there)
Let me repeat: I am not going to release individuals who endanger the American people. Al Qaeda terrorists and their affiliates are at war with the United States, and those that we capture -- like other prisoners of war -- must be prevented from attacking us again. Having said that, we must recognize that these detention policies cannot be unbounded. They can't be based simply on what I or the executive branch decide alone. That's why my administration has begun to reshape the standards that apply to ensure that they are in line with the rule of law.
In attempting to hold these hypothetical prisoners, he will, working with all branches of government attempt to answer HOW it can be done Constitutionally.
We must have clear, defensible, and lawful standards for those who fall into this category. We must have fair procedures so that we don't make mistakes. We must have a thorough process of periodic review, so that any prolonged detention is carefully evaluated and justified.
I know that creating such a system poses unique challenges. And other countries have grappled with this question; now, so must we. But I want to be very clear that our goal is to construct a legitimate legal framework for the remaining Guantanamo detainees that cannot be transferred. Our goal is not to avoid a legitimate legal framework. In our constitutional system, prolonged detention should not be the decision of any one man. If and when we determine that the United States must hold individuals to keep them from carrying out an act of war, we will do so within a system that involves judicial and congressional oversight. And so, going forward, my administration will work with Congress to develop an appropriate legal regime so that our efforts are consistent with our values and our Constitution.
http://www.nytimes.com/2009/05/21/us/politics/21obama.text.html?pagewanted=5&_r=1