com.centrasite.control.adapters.advancedsearch
Class SearchUtilities

java.lang.Object
  extended by com.centrasite.control.adapters.advancedsearch.SearchUtilities

public class SearchUtilities
extends java.lang.Object

Various utility methods for the advanced search functionality


Nested Class Summary
static class SearchUtilities.TimeFrame
           
 
Constructor Summary
SearchUtilities()
           
 
Method Summary
static void addTypeSpecificValidValues(java.util.ArrayList<SearchAdapter.SortableList> comboValuesForSorting, java.lang.String type, com.centrasite.jaxr.assettype.AssetTypeManager typeManager, java.util.Locale locale, java.util.Map<java.lang.String,com.centrasite.jaxr.assettype.CentraSiteAttribute> nameToAttr)
          Add type specific attributes depending on the given type (object type)
static java.lang.String constructFieldNameForTypeSpecificAttribute(java.lang.String attributeName, java.lang.String dataType)
          Construct appropriate field name based on the data type
static java.lang.String extractLocalName(java.lang.String attributeName)
          Extract the local name from fully qualified attribute name (works if local attribute name is passed too)
static java.lang.String findI18nDataTypeMsg(java.lang.String dataTypeId, java.util.Locale locale)
          Find i18n message for given data type id
static java.lang.Class<? extends FilterLine> getFilterLine(java.lang.Class<? extends com.centrasite.jaxr.query.predicates.Predicate> predicate)
           
static java.lang.Class<? extends FilterLine> getFilterLine(java.lang.String id)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchUtilities

public SearchUtilities()
Method Detail

getFilterLine

public static java.lang.Class<? extends FilterLine> getFilterLine(java.lang.Class<? extends com.centrasite.jaxr.query.predicates.Predicate> predicate)

getFilterLine

public static java.lang.Class<? extends FilterLine> getFilterLine(java.lang.String id)

addTypeSpecificValidValues

public static void addTypeSpecificValidValues(java.util.ArrayList<SearchAdapter.SortableList> comboValuesForSorting,
                                              java.lang.String type,
                                              com.centrasite.jaxr.assettype.AssetTypeManager typeManager,
                                              java.util.Locale locale,
                                              java.util.Map<java.lang.String,com.centrasite.jaxr.assettype.CentraSiteAttribute> nameToAttr)
                                       throws javax.xml.registry.JAXRException
Add type specific attributes depending on the given type (object type)

Parameters:
comboValuesForSorting -
type -
typeManager -
locale -
nameToAttr -
Throws:
javax.xml.registry.JAXRException

findI18nDataTypeMsg

public static java.lang.String findI18nDataTypeMsg(java.lang.String dataTypeId,
                                                   java.util.Locale locale)
Find i18n message for given data type id

Parameters:
dataTypeId -
locale -
Returns:

constructFieldNameForTypeSpecificAttribute

public static java.lang.String constructFieldNameForTypeSpecificAttribute(java.lang.String attributeName,
                                                                          java.lang.String dataType)
Construct appropriate field name based on the data type

Parameters:
attributeName -
dataType -
Returns:

extractLocalName

public static java.lang.String extractLocalName(java.lang.String attributeName)
Extract the local name from fully qualified attribute name (works if local attribute name is passed too)

Parameters:
attributeName -
Returns: