modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerBean.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerLocal.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerRemote.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SearchExpressionException.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/antlr/RHQLNode.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/antlr/RHQLNodeAdaptor.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/AbstractSearchAssistant.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/GroupSearchAssistant.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/ResourceSearchAssistant.java | 27 ++++++++--
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/SearchAssistant.java | 23 ++++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/SearchAssistantFactory.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/TabAwareSearchAssistant.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/common/SearchQueryGenerationUtility.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchTranslationManager.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/AbstractSearchTranslator.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/GroupSearchTranslator.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/ResourceSearchTranslator.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/SearchTranslator.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/SearchTranslatorFactory.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLAdvancedTerm.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLComparisonOperator.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLSimpleTerm.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLTerm.java | 21 +++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLTreeOperator.java | 21 +++++++
25 files changed, 448 insertions(+), 9 deletions(-)
New commits:
commit b44367128e10551115f74592eda4dbc59c1d7664
Author: Joseph Marques <joseph(a)redhat.com>
Date: Tue Jan 4 10:51:31 2011 -0500
update copyright notice for org.rhq.enterprise.server.search package
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerBean.java
index d08fefb..9f623ef 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerBean.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerLocal.java
index 7ced552..093a20d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerLocal.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerRemote.java
index 64d4824..1a7029f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerRemote.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerRemote.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SearchExpressionException.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SearchExpressionException.java
index dc1a91e..aaabbbd 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SearchExpressionException.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SearchExpressionException.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2010 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
commit 2e5932bc3d91e6720e78715631835b5a2f8762f8
Author: Joseph Marques <joseph(a)redhat.com>
Date: Tue Jan 4 10:50:32 2011 -0500
add copyright and author tags to search.antlr sub-package
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/antlr/RHQLNode.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/antlr/RHQLNode.java
index 092863e..12c1732 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/antlr/RHQLNode.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/antlr/RHQLNode.java
@@ -1,8 +1,29 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.antlr;
import org.antlr.runtime.Token;
import org.antlr.runtime.tree.CommonTree;
+/**
+ * @author Joseph Marques
+ */
public class RHQLNode extends CommonTree {
public RHQLNode(Token t) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/antlr/RHQLNodeAdaptor.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/antlr/RHQLNodeAdaptor.java
index 9f20c16..9202f8b 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/antlr/RHQLNodeAdaptor.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/antlr/RHQLNodeAdaptor.java
@@ -1,3 +1,21 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.antlr;
import java.util.ArrayList;
@@ -9,6 +27,9 @@ import org.antlr.runtime.Token;
import org.antlr.runtime.TokenStream;
import org.antlr.runtime.tree.CommonTreeAdaptor;
+/**
+ * @author Joseph Marques
+ */
public class RHQLNodeAdaptor extends CommonTreeAdaptor {
List<String> errorMessages = new ArrayList<String>();
commit d78d1365b583a02dad5f452f47e068ba4a2961c7
Author: Joseph Marques <joseph(a)redhat.com>
Date: Tue Jan 4 10:49:41 2011 -0500
add copyright and author tags to search.assist sub-package
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/AbstractSearchAssistant.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/AbstractSearchAssistant.java
index 5209c26..aacb50e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/AbstractSearchAssistant.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/AbstractSearchAssistant.java
@@ -1,3 +1,21 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.assist;
import static org.rhq.enterprise.server.search.common.SearchQueryGenerationUtility.getJPQLForString;
@@ -17,6 +35,9 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.enterprise.server.search.SearchExpressionException;
import org.rhq.enterprise.server.util.LookupUtil;
+/**
+ * @author Joseph Marques
+ */
public abstract class AbstractSearchAssistant implements SearchAssistant {
private final Log log = LogFactory.getLog(SearchAssistant.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/GroupSearchAssistant.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/GroupSearchAssistant.java
index 765d8f6..e163230 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/GroupSearchAssistant.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/GroupSearchAssistant.java
@@ -1,3 +1,21 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.assist;
import java.util.Arrays;
@@ -9,6 +27,9 @@ import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.search.SearchSubsystem;
+/**
+ * @author Joseph Marques
+ */
public class GroupSearchAssistant extends TabAwareSearchAssistant {
private static final List<String> parameterizedContexts;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/ResourceSearchAssistant.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/ResourceSearchAssistant.java
index 67cbc2a..9bf266b 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/ResourceSearchAssistant.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/ResourceSearchAssistant.java
@@ -1,3 +1,21 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.assist;
import java.util.Arrays;
@@ -11,6 +29,9 @@ import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.search.SearchSubsystem;
import org.rhq.core.domain.search.assist.AlertSearchAssistParam;
+/**
+ * @author Joseph Marques
+ */
public class ResourceSearchAssistant extends TabAwareSearchAssistant {
private static final List<String> parameterizedContexts;
@@ -66,8 +87,7 @@ public class ResourceSearchAssistant extends TabAwareSearchAssistant {
+ " FROM ResourceType type, Resource res, PropertyDefinitionSimple simpleDefinition " //"
+ " JOIN type.pluginConfigurationDefinition.propertyDefinitions definition " //
+ " WHERE res.resourceType = type " // only suggest names that exist for resources in inventory
- + " AND type.deleted = false"
- + " AND simpleDefinition = definition " // only suggest names for simple properties
+ + " AND type.deleted = false" + " AND simpleDefinition = definition " // only suggest names for simple properties
+ " AND simpleDefinition.type <> 'PASSWORD' " // do not suggest hidden/password property types
+ conditionallyAddJPQLString("definition.name", filter) //
+ conditionallyAddJPQLString("type.category", tab) //
@@ -80,8 +100,7 @@ public class ResourceSearchAssistant extends TabAwareSearchAssistant {
+ " FROM ResourceType type, Resource res, PropertyDefinitionSimple simpleDefinition " //"
+ " JOIN type.resourceConfigurationDefinition.propertyDefinitions definition " //
+ " WHERE res.resourceType = type " // only suggest names that exist for resources in inventory
- + " AND type.deleted = false"
- + " AND simpleDefinition = definition " // only suggest names for simple properties
+ + " AND type.deleted = false" + " AND simpleDefinition = definition " // only suggest names for simple properties
+ " AND simpleDefinition.type <> 'PASSWORD' " // do not suggest hidden/password property types
+ conditionallyAddJPQLString("definition.name", filter) //
+ conditionallyAddJPQLString("type.category", tab) //
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/SearchAssistant.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/SearchAssistant.java
index 8c8929b..9a58cea 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/SearchAssistant.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/SearchAssistant.java
@@ -1,9 +1,30 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.assist;
import java.util.List;
import org.rhq.core.domain.search.SearchSubsystem;
+/**
+ * @author Joseph Marques
+ */
public interface SearchAssistant {
SearchSubsystem getSearchSubsystem();
@@ -21,4 +42,4 @@ public interface SearchAssistant {
List<String> getParameters(String context, String filter);
List<String> getValues(String context, String param, String filter);
-}
+}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/SearchAssistantFactory.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/SearchAssistantFactory.java
index 040d15f..6379ace 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/SearchAssistantFactory.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/SearchAssistantFactory.java
@@ -1,8 +1,29 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.assist;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.search.SearchSubsystem;
+/**
+ * @author Joseph Marques
+ */
public class SearchAssistantFactory {
private SearchAssistantFactory() {
// force use of static methods only
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/TabAwareSearchAssistant.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/TabAwareSearchAssistant.java
index 27f17b3..6f759c5 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/TabAwareSearchAssistant.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/TabAwareSearchAssistant.java
@@ -1,7 +1,28 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.assist;
import org.rhq.core.domain.auth.Subject;
+/**
+ * @author Joseph Marques
+ */
public abstract class TabAwareSearchAssistant extends AbstractSearchAssistant {
protected String tab;
commit 22c218f195faad057ad75d2b0498903984841aeb
Author: Joseph Marques <joseph(a)redhat.com>
Date: Tue Jan 4 10:48:35 2011 -0500
add copyright and author tags to search.common sub-package
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/common/SearchQueryGenerationUtility.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/common/SearchQueryGenerationUtility.java
index 734526a..9da5334 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/common/SearchQueryGenerationUtility.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/common/SearchQueryGenerationUtility.java
@@ -1,8 +1,29 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.common;
import org.rhq.enterprise.server.search.translation.antlr.RHQLComparisonOperator;
import org.rhq.enterprise.server.util.QueryUtility;
+/**
+ * @author Joseph Marques
+ */
public class SearchQueryGenerationUtility {
public enum ValueFilter {
STARTS_WITH, //
commit c02ae1111c37954b58b351c5e677f303eb611a19
Author: Joseph Marques <joseph(a)redhat.com>
Date: Tue Jan 4 10:47:58 2011 -0500
add copyright and author tags to search.execution sub-package
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java
index 4afb3e7..8a063b1 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java
@@ -1,3 +1,21 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.execution;
import java.io.PrintStream;
@@ -21,6 +39,9 @@ import org.rhq.enterprise.server.search.assist.SearchAssistant;
import org.rhq.enterprise.server.search.assist.SearchAssistantFactory;
import org.rhq.enterprise.server.util.LookupUtil;
+/**
+ * @author Joseph Marques
+ */
public class SearchAssistManager {
private static final Log LOG = LogFactory.getLog(SearchAssistManager.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchTranslationManager.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchTranslationManager.java
index 7e5f5a9..c31f069 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchTranslationManager.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchTranslationManager.java
@@ -1,3 +1,21 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.execution;
import java.util.ArrayList;
@@ -25,6 +43,9 @@ import org.rhq.enterprise.server.search.translation.antlr.RHQLTerm;
import org.rhq.enterprise.server.search.translation.antlr.RHQLTreeOperator;
import org.rhq.enterprise.server.search.translation.jpql.SearchFragment;
+/**
+ * @author Joseph Marques
+ */
public class SearchTranslationManager {
private SearchSubsystem context;
commit 83240feeb110a6729e0dac0c21c059291748c69a
Author: Joseph Marques <joseph(a)redhat.com>
Date: Tue Jan 4 10:46:59 2011 -0500
add copyright and author tags to search.translation sub-package
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/AbstractSearchTranslator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/AbstractSearchTranslator.java
index 1848192..4e34c34 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/AbstractSearchTranslator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/AbstractSearchTranslator.java
@@ -1,3 +1,21 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.translation;
import org.rhq.core.domain.auth.Subject;
@@ -5,6 +23,9 @@ import org.rhq.enterprise.server.search.SearchExpressionException;
import org.rhq.enterprise.server.search.translation.antlr.RHQLComparisonOperator;
import org.rhq.enterprise.server.util.LookupUtil;
+/**
+ * @author Joseph Marques
+ */
public abstract class AbstractSearchTranslator implements SearchTranslator {
private int subjectId;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/GroupSearchTranslator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/GroupSearchTranslator.java
index 21cf762..4422756 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/GroupSearchTranslator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/GroupSearchTranslator.java
@@ -1,3 +1,21 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.translation;
import static org.rhq.enterprise.server.search.common.SearchQueryGenerationUtility.getJPQLForString;
@@ -9,6 +27,9 @@ import org.rhq.enterprise.server.search.translation.antlr.RHQLAdvancedTerm;
import org.rhq.enterprise.server.search.translation.antlr.RHQLComparisonOperator;
import org.rhq.enterprise.server.search.translation.jpql.SearchFragment;
+/**
+ * @author Joseph Marques
+ */
public class GroupSearchTranslator extends AbstractSearchTranslator {
public GroupSearchTranslator(Subject subject) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/ResourceSearchTranslator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/ResourceSearchTranslator.java
index 1c65c51..2ff8209 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/ResourceSearchTranslator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/ResourceSearchTranslator.java
@@ -1,3 +1,21 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.translation;
import static org.rhq.enterprise.server.search.common.SearchQueryGenerationUtility.getJPQLForString;
@@ -12,6 +30,9 @@ import org.rhq.enterprise.server.search.translation.antlr.RHQLAdvancedTerm;
import org.rhq.enterprise.server.search.translation.antlr.RHQLComparisonOperator;
import org.rhq.enterprise.server.search.translation.jpql.SearchFragment;
+/**
+ * @author Joseph Marques
+ */
public class ResourceSearchTranslator extends AbstractSearchTranslator {
public ResourceSearchTranslator(Subject subject) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/SearchTranslator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/SearchTranslator.java
index 4febbe8..d61ffbd 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/SearchTranslator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/SearchTranslator.java
@@ -1,8 +1,29 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.translation;
import org.rhq.enterprise.server.search.translation.antlr.RHQLAdvancedTerm;
import org.rhq.enterprise.server.search.translation.jpql.SearchFragment;
+/**
+ * @author Joseph Marques
+ */
public interface SearchTranslator {
public SearchFragment getSearchFragment(String alias, RHQLAdvancedTerm term);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/SearchTranslatorFactory.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/SearchTranslatorFactory.java
index 16661c1..b23eb71 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/SearchTranslatorFactory.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/SearchTranslatorFactory.java
@@ -1,8 +1,29 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.translation;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.search.SearchSubsystem;
+/**
+ * @author Joseph Marques
+ */
public class SearchTranslatorFactory {
private SearchTranslatorFactory() {
// force use of static methods only
commit e6e64bf443a4cfd2ace2680bb4a4d1cacecf43e2
Author: Joseph Marques <joseph(a)redhat.com>
Date: Tue Jan 4 10:45:46 2011 -0500
add copyright and author tags to search.translation.antlr sub-package
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLAdvancedTerm.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLAdvancedTerm.java
index abe36f2..55e2cd0 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLAdvancedTerm.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLAdvancedTerm.java
@@ -1,5 +1,26 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.translation.antlr;
+/**
+ * @author Joseph Marques
+ */
public class RHQLAdvancedTerm implements RHQLTerm {
private final String lineage;
private final String path;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLComparisonOperator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLComparisonOperator.java
index 70a6272..436fe2a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLComparisonOperator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLComparisonOperator.java
@@ -1,5 +1,26 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.translation.antlr;
+/**
+ * @author Joseph Marques
+ */
public enum RHQLComparisonOperator {
EQUALS(" = "), //
EQUALS_STRICT(" = "), //
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLSimpleTerm.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLSimpleTerm.java
index f60fe65..9f221f3 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLSimpleTerm.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLSimpleTerm.java
@@ -1,5 +1,26 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.translation.antlr;
+/**
+ * @author Joseph Marques
+ */
public class RHQLSimpleTerm implements RHQLTerm {
private final String value;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLTerm.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLTerm.java
index 013bc08..9e8798f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLTerm.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLTerm.java
@@ -1,5 +1,26 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.translation.antlr;
+/**
+ * @author Joseph Marques
+ */
public interface RHQLTerm {
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLTreeOperator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLTreeOperator.java
index a1e9a6c..810090e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLTreeOperator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/translation/antlr/RHQLTreeOperator.java
@@ -1,5 +1,26 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
package org.rhq.enterprise.server.search.translation.antlr;
+/**
+ * @author Joseph Marques
+ */
public enum RHQLTreeOperator {
AND, //
OR;