CCM NG/ccm-cms: ItemSearchPane now compiles (but will not work yet).
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4524 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
5da5d5bd55
commit
a22c7a67c7
|
|
@ -52,6 +52,7 @@ import org.arsdigita.cms.CMSConfig;
|
|||
import org.libreccm.cdi.utils.CdiUtil;
|
||||
import org.libreccm.security.PermissionChecker;
|
||||
import org.librecms.CmsConstants;
|
||||
import org.librecms.contentsection.ContentItemVersion;
|
||||
import org.librecms.contentsection.privileges.AdminPrivileges;
|
||||
|
||||
/**
|
||||
|
|
@ -119,7 +120,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener {
|
|||
private TabbedPane m_tabbedPane;
|
||||
private FolderAdminPane m_folderPane;
|
||||
//ToDo NG private BrowsePane m_browsePane;
|
||||
//ToDo NG private ItemSearch m_searchPane;
|
||||
private ItemSearch m_searchPane;
|
||||
//ToDo NG private ImagesPane m_imagesPane;
|
||||
private RoleAdminPane m_rolePane;
|
||||
private WorkflowAdminPane m_workflowPane;
|
||||
|
|
@ -146,7 +147,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener {
|
|||
// Initialize the individual panes
|
||||
m_folderPane = getFolderAdminPane();
|
||||
//ToDo NG m_browsePane = getBrowsePane();
|
||||
//ToDo NG m_searchPane = getSearchPane();
|
||||
m_searchPane = getSearchPane();
|
||||
//ToDo NG m_imagesPane = getImagesPane();
|
||||
m_rolePane = getRoleAdminPane();
|
||||
m_workflowPane = getWorkflowAdminPane();
|
||||
|
|
@ -249,16 +250,15 @@ public class ContentSectionPage extends CMSPage implements ActionListener {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
// ToDo NG
|
||||
// protected ItemSearch getSearchPane() {
|
||||
// if (m_searchPane == null) {
|
||||
// m_searchPane
|
||||
// = new ItemSearch(
|
||||
// ContentItemVersion.DRAFT.toString(),
|
||||
// CMSConfig.getConfig().isLimitItemSearchToContentSection());
|
||||
// }
|
||||
// return m_searchPane;
|
||||
// }
|
||||
protected ItemSearch getSearchPane() {
|
||||
if (m_searchPane == null) {
|
||||
m_searchPane
|
||||
= new ItemSearch(
|
||||
ContentItemVersion.DRAFT.toString(),
|
||||
CMSConfig.getConfig().isLimitItemSearchToContentSection());
|
||||
}
|
||||
return m_searchPane;
|
||||
}
|
||||
// ToDo NG
|
||||
// protected ImagesPane getImagesPane() {
|
||||
// if (m_imagesPane == null) {
|
||||
|
|
@ -266,6 +266,7 @@ public class ContentSectionPage extends CMSPage implements ActionListener {
|
|||
// }
|
||||
// return m_imagesPane;
|
||||
// }
|
||||
|
||||
protected RoleAdminPane getRoleAdminPane() {
|
||||
if (m_rolePane == null) {
|
||||
m_rolePane = new RoleAdminPane();
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@ import com.arsdigita.bebop.Form;
|
|||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.Resettable;
|
||||
import com.arsdigita.bebop.SimpleContainer;
|
||||
import com.arsdigita.search.ui.QueryGenerator;
|
||||
|
||||
import org.apache.lucene.search.Query;
|
||||
import org.librecms.contentsection.ContentItem;
|
||||
|
||||
/**
|
||||
|
|
@ -34,7 +32,7 @@ import org.librecms.contentsection.ContentItem;
|
|||
* @author Stanislav Freidin (sfreidin@arsdigita.com)
|
||||
* @author <a href="jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
public class ItemSearch extends Form implements Resettable, QueryGenerator {
|
||||
public class ItemSearch extends Form implements Resettable {
|
||||
|
||||
public static final String SINGLE_TYPE_PARAM = ItemSearchSection.SINGLE_TYPE_PARAM;
|
||||
|
||||
|
|
@ -72,16 +70,6 @@ public class ItemSearch extends Form implements Resettable, QueryGenerator {
|
|||
return new ItemSearchSection(context, limitToContentSection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasQuery(final PageState state) {
|
||||
return itemSearchSection.hasQuery(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query getQuerySpecification(final PageState state) {
|
||||
return itemSearchSection.getQuerySpecification(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset(final PageState state) {
|
||||
itemSearchSection.reset(state);
|
||||
|
|
@ -29,8 +29,10 @@ import com.arsdigita.bebop.PageState;
|
|||
import com.arsdigita.bebop.event.FormProcessListener;
|
||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||
import com.arsdigita.bebop.parameters.BigDecimalParameter;
|
||||
|
||||
import org.librecms.contentsection.ContentItem;
|
||||
import org.librecms.contentsection.ContentType;
|
||||
|
||||
import com.arsdigita.cms.ui.search.ItemQueryComponent;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
|
||||
|
|
@ -38,9 +40,6 @@ import com.arsdigita.search.ui.ResultsPane;
|
|||
import com.arsdigita.search.ui.QueryGenerator;
|
||||
import com.arsdigita.toolbox.ui.LayoutPanel;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.lucene.search.Query;
|
||||
import org.librecms.CmsConstants;
|
||||
|
||||
/**
|
||||
|
|
@ -51,11 +50,8 @@ import org.librecms.CmsConstants;
|
|||
* @author Stanislav Freidin (sfreidin@arsdigita.com)
|
||||
* @version $Id: ItemSearchSection.java 1940 2009-05-29 07:15:05Z terry $
|
||||
*/
|
||||
public class ItemSearchSection extends FormSection implements Resettable,
|
||||
QueryGenerator {
|
||||
public class ItemSearchSection extends FormSection implements Resettable {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger(
|
||||
ItemSearchSection.class);
|
||||
public static final String SINGLE_TYPE_PARAM = "single_type";
|
||||
|
||||
private ItemQueryComponent itemQueryComponent;
|
||||
|
|
@ -117,22 +113,13 @@ public class ItemSearchSection extends FormSection implements Resettable,
|
|||
searchPanel.setBody(resultsComponent);
|
||||
this.add(searchPanel);
|
||||
|
||||
// addQueryGenerator(this);
|
||||
// addResultsPane(this);
|
||||
addQueryGenerator(this);
|
||||
addResultsPane(this);
|
||||
addFormListener();
|
||||
|
||||
setClassAttr("itemSearch");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasQuery(final PageState state) {
|
||||
return itemQueryComponent.hasQuery(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query getQuerySpecification(final PageState state) {
|
||||
return itemQueryComponent.getQuerySpecification(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset(final PageState state) {
|
||||
|
|
@ -18,16 +18,12 @@
|
|||
*/
|
||||
package com.arsdigita.cms.ui.search;
|
||||
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.form.Submit;
|
||||
import org.libreccm.categorization.Category;
|
||||
import com.arsdigita.cms.CMS;
|
||||
import org.librecms.contentsection.ContentSection;
|
||||
|
||||
import org.librecms.contentsection.ContentType;
|
||||
|
||||
import com.arsdigita.cms.ui.ContentSectionPage;
|
||||
import com.arsdigita.search.ui.BaseQueryComponent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class provides a basic query form for CMS admin pages that automatically
|
||||
|
|
@ -52,6 +48,7 @@ public class ItemQueryComponent extends BaseQueryComponent {
|
|||
final ContentType type) {
|
||||
this.context = context;
|
||||
|
||||
//ToDo
|
||||
// add(new PermissionFilterComponent(
|
||||
// SecurityManager.CMS_PREVIEW_ITEM));
|
||||
//
|
||||
|
|
@ -121,10 +118,7 @@ public class ItemQueryComponent extends BaseQueryComponent {
|
|||
// CreationUserFilterType.KEY));
|
||||
// add(new PartyFilterWidget(new LastModifiedUserFilterType(),
|
||||
// LastModifiedUserFilterType.KEY));
|
||||
|
||||
|
||||
Submit submit =
|
||||
new Submit(context + "_search",
|
||||
Submit submit = new Submit(context + "_search",
|
||||
ContentSectionPage.globalize("cms.ui.search"));
|
||||
add(submit);
|
||||
}
|
||||
Loading…
Reference in New Issue