org.rhq.enterprise.server.search.assist
Class AbstractSearchAssistant

java.lang.Object
  extended by org.rhq.enterprise.server.search.assist.AbstractSearchAssistant
All Implemented Interfaces:
SearchAssistant
Direct Known Subclasses:
TabAwareSearchAssistant

public abstract class AbstractSearchAssistant
extends Object
implements SearchAssistant

Author:
Joseph Marques

Constructor Summary
AbstractSearchAssistant(org.rhq.core.domain.auth.Subject subject)
           
 
Method Summary
protected  String conditionallyAddAuthzFragment(String fragment)
           
protected  String conditionallyAddJPQLString(String fragment, String filter)
           
protected  List<String> execute(String jpql)
           
protected  Map<String,List<String>> executeMap(String jpql)
           
protected  List<String> filter(Class<? extends Enum<?>> enumType, String filter)
           
protected  List<String> filter(Class<? extends Enum<?>> enumType, String filter, boolean includeAnyOption)
           
protected  List<String> filter(List<String> data, String filter)
           
protected  List<String> filter(List<String> data, String filter, int max)
           
protected  String getFormatterValueFragment(String data)
           
 int getMaxResultCount()
           
 List<String> getParameterizedContexts()
           
 List<String> getParameters(String context, String filter)
           
 String getPrimarySimpleContext()
           
 List<String> getSimpleContexts()
           
 int getSubjectId()
           
 List<String> getValues(String context, String param, String filter)
           
 boolean isEnumContext(String context)
           
 boolean isNumericalContext(String context)
           
protected  String quote(String data)
           
 boolean requiresAuthorizationFragment()
           
 void setMaxResultCount(int maxResultCount)
           
protected  String stripQuotes(String data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rhq.enterprise.server.search.assist.SearchAssistant
getSearchSubsystem
 

Constructor Detail

AbstractSearchAssistant

public AbstractSearchAssistant(org.rhq.core.domain.auth.Subject subject)
Method Detail

getSubjectId

public int getSubjectId()

requiresAuthorizationFragment

public boolean requiresAuthorizationFragment()

getMaxResultCount

public int getMaxResultCount()

setMaxResultCount

public void setMaxResultCount(int maxResultCount)

getPrimarySimpleContext

public String getPrimarySimpleContext()
Specified by:
getPrimarySimpleContext in interface SearchAssistant

getSimpleContexts

public List<String> getSimpleContexts()
Specified by:
getSimpleContexts in interface SearchAssistant

getParameterizedContexts

public List<String> getParameterizedContexts()
Specified by:
getParameterizedContexts in interface SearchAssistant

isNumericalContext

public boolean isNumericalContext(String context)
Specified by:
isNumericalContext in interface SearchAssistant

isEnumContext

public boolean isEnumContext(String context)
Specified by:
isEnumContext in interface SearchAssistant

getParameters

public List<String> getParameters(String context,
                                  String filter)
Specified by:
getParameters in interface SearchAssistant

getValues

public List<String> getValues(String context,
                              String param,
                              String filter)
Specified by:
getValues in interface SearchAssistant

execute

protected final List<String> execute(String jpql)

executeMap

protected final Map<String,List<String>> executeMap(String jpql)

conditionallyAddJPQLString

protected final String conditionallyAddJPQLString(String fragment,
                                                  String filter)

conditionallyAddAuthzFragment

protected final String conditionallyAddAuthzFragment(String fragment)

filter

protected final List<String> filter(Class<? extends Enum<?>> enumType,
                                    String filter)

filter

protected final List<String> filter(Class<? extends Enum<?>> enumType,
                                    String filter,
                                    boolean includeAnyOption)

filter

protected final List<String> filter(List<String> data,
                                    String filter)

filter

protected final List<String> filter(List<String> data,
                                    String filter,
                                    int max)

quote

protected final String quote(String data)

getFormatterValueFragment

protected final String getFormatterValueFragment(String data)

stripQuotes

protected final String stripQuotes(String data)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.