package com.atlassian.confluence.extra.livesearch;

import com.atlassian.confluence.search.actions.SearchSiteAction;
import com.atlassian.confluence.search.actions.SearchBean;
import com.atlassian.confluence.search.actions.SearchQueryBean;
import com.mchange.v2.c3p0.util.TestUtils;
import com.opensymphony.util.TextUtils;

public class LiveSearchAction extends SearchSiteAction
{
    private String spaceKey;

    public void setSpaceKey(String spaceKey)
    {
        this.spaceKey = spaceKey;
    }

    public SearchQueryBean getSearchQuery()
    {
        SearchQueryBean bean = super.getSearchQuery();
        if (TextUtils.stringSet(spaceKey))
        {
            bean.setSpaceKey(spaceKey);
        }
        return bean;
    }
}
