Class SearchSuggestTransform
- java.lang.Object
-
- com.microstrategy.web.transform.AbstractTransform
-
- com.microstrategy.web.transform.AbstractLayoutTransform
-
- com.microstrategy.web.app.transforms.AbstractAppTransform
-
- com.microstrategy.web.app.transforms.SearchSimpleTransform
-
- com.microstrategy.web.app.transforms.SearchSuggestTransform
-
- All Implemented Interfaces:
AppTransform
,LayoutTransform
,Transform
public class SearchSuggestTransform extends SearchSimpleTransform implements LayoutTransform
Transform for the search page- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
AbstractAppTransform.Context
-
-
Field Summary
Fields Modifier and Type Field Description protected PageComponent
_mstrPage
Property to keep the information about thePageComponent
associated with the page currently being renderedprotected FormalParameter
defaultRootFolderType
Search scope folder that used when no explicit folder is given (default as "All Folders").protected FormalParameter
id
Indicates the name of the outer shell for all folder modes.protected FormalParameter
isMiniSearchBox
Flag to indicate whether this is SearchBox in ShortcutsBar.protected FormalParameter
isServerSearch
Flag to indicate whether this is SearchBox in IServer Admin page (Users and Security Roles Search)protected FormalParameter
showAsPopup
Flag to indicate whether to show Search Results in a Popup This should be true for QuickSearchBox in ShortcutsBar, and SearchBox in Desktop Page.protected FormalParameter
showSettings
Flag to indicate where to make Advanced Search Options visible.protected FormalParameter
showSuggestionAsPopup
Flag to indicate whether to show Suggestion List in a popup; or just below the SearchBox This should be true for QuickSearchBox in ShortcutsBar, and SearchBox in Desktop Page.-
Fields inherited from class com.microstrategy.web.app.transforms.SearchSimpleTransform
CLASS_FOLDER_NAME, CLASS_INVALID_FIELD, CLASS_REQUIRED, CLASS_SECTION_NAME, DIV_DATES, DIV_DESCRIPTION, DIV_LOCATION, DIV_LOCATION_TITLE, DIV_NAME, DIV_NAME_OPTIONS, DIV_OWNER, DIV_TYPES, imgCalendar
-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
_bean, _componentBlock, _cssPrefix, _imgBlank, _imgWait, _selfOutput, _subOutput, appliesTo, CLASS_INPUT, CLASS_MESSAGE, contextMenus, cssFile, cssPrefix, debugErrorFlags, debugFlags, dragMode, extraInput, extraUrl, FP_APPLIES_TO, FP_CONTEXT_MENUS, FP_CSS_ERROR_MESSAGE, FP_CSS_ERROR_TITLE, FP_CSS_FILE, FP_CSS_PREFIX, FP_DEBUG_ERROR_FLAGS, FP_DEBUG_FLAGS, FP_DRAG_MODE, FP_EXTRA_INPUT, FP_EXTRA_URL, FP_HEIGHT, FP_IFRAME_ENABLED, FP_IMG_WAIT, FP_INITIAL_INDENT, FP_ORIENTATION, FP_ORIENTATIONS_ALLOWED, FP_PARTIAL_IFRAME_UPDATE, FP_PROCESSING_BUTTONS_FLAGS, FP_PROCESSING_INFO_FLAGS, FP_RESIZE_LEVEL, FP_SCRIPT_CLASS, FP_TYPE, FP_USE_DHTML, FP_WIDTH, globalCssErrorMessage, globalCssErrorTitle, height, iframeEnabled, imgWait, indent, initialIndent, isDHTML, orientation, orientationsAllowed, partialIframeUpdate, PROCESSING_BUTTONS_ALL, PROCESSING_BUTTONS_CANCEL, PROCESSING_BUTTONS_HISTORY_LIST, PROCESSING_BUTTONS_REFRESH, PROCESSING_BUTTONS_VIEW_DETAILS, PROCESSING_INFO_ALL, PROCESSING_INFO_DESCRIPTION, PROCESSING_INFO_LAST_UPDATE, PROCESSING_INFO_NAME, PROCESSING_INFO_NONE, PROCESSING_INFO_STATUS, processingButtonsFlags, processingInfoFlags, RESIZE_ALL, RESIZE_HORIZONTAL, RESIZE_NONE, RESIZE_VERTICAL, resizeLevel, scriptClass, scriptEndTagEncoder, type, useDHTML, width
-
-
Constructor Summary
Constructors Constructor Description SearchSuggestTransform()
Default no-args constructor, initialize formal parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map
addAttr(java.lang.String name, int descId)
java.util.Map
addAttr(java.lang.String name, java.lang.String value)
java.util.Map
addTitleAttr(int descId)
protected Block
createSearchBlock(MarkupOutput out)
java.lang.String
getID()
Returns the unique name of the component to be used as the ID for its shell.protected java.lang.String
getObjectTypes()
Returns a comma separated list of object-types.protected java.lang.String
getPreferenceSharedReportsFolderID()
Returns the value of the admin preference for shared reports, or null if it has not been set.protected java.lang.String
getRootFolderId()
Returns the id of the folder to be used as root for searching.protected int
getSysFolder()
Returns the system folder name as defined inEnumDSSXMLFolderNames
to be used as root for searching.void
initializeTransform(Transformable data)
This method initialize the private and protected fields of the transform, such as width and height.boolean
isSettingVisible()
void
renderJavaScriptFooter(MarkupOutput out)
Renders javascript variables at the bottom of the transform to be used in DHTML mode.void
renderShell(MarkupOutput out)
Generates the shell for this Transform.protected void
setBoneProperties(JsonGenerator boneProps)
If we render bone shell from transform, then we want to pass these properties to the bone.void
setObjectTypes(java.lang.String value)
Sets the list of object-types used for searching.void
setRootFolderId(java.lang.String value)
Sets the id of the folder to be used as root for searching.void
setSysFolder(java.lang.String sysFolder)
Sets the system folder name as defined inEnumDSSXMLFolderNames
to be used as root for searching.void
transformForRequestSuccessful(MarkupOutput out)
Transform when the status is "Successful".-
Methods inherited from class com.microstrategy.web.app.transforms.SearchSimpleTransform
generateAnchor, getCalendar, getCancelEvent, getDescription, getNewSearchEvent, getRefreshEvent, getSearchBean, getSupportedBeanType, getSwitchSearchModeEvent, hasCurrentSearchFolder, initializeImages, isTypeSelected, renderAdvancedNameSection, renderDateAdvancedFindAllObjectsWithSpecifiedDates, renderDateForPreviousTimeUnits, renderDateSimpleFindAllObject, renderDatesSection, renderDateStartAndEndDate, renderDateTitle, renderDescriptionSection, renderDescriptionTextArea, renderDescriptionTitle, renderDivEnd, renderDivStart, renderFieldName, renderFieldName, renderFindAllObjectsWithCreatedOrModified, renderFullAdvancedLocationSection, renderFullSimpleLocationSection, renderImage, renderLocationRadioButtons, renderLocationSection, renderLocationTitle, renderNameSection, renderNewSearchLink, renderOwnerCreatedByAnyUser, renderOwnerCreatedOnlyByMe, renderOwnerSection, renderOwnerTitle, renderProcessingButton, renderProcessingButtons, renderProcessingInfo, renderRequiredLabelForSearchName, renderSearchDetails, renderSearchLocationAllFolders, renderSearchLocationCurrentFolder, renderSearchLocationMyReportFolder, renderSearchLocationSharedReportsFolder, renderSearchNameTextInputBox, renderSearchNameTitle, renderSearchObjectTypeCustomGroups, renderSearchObjectTypeDocuments, renderSearchObjectTypeFilters, renderSearchObjectTypeFolders, renderSearchObjectTypeGroups, renderSearchObjectTypeHTMLDocuments, renderSearchObjectTypePrompts, renderSearchObjectTypeReports, renderSearchObjectTypeSecurityRoles, renderSearchObjectTypeShortcuts, renderSearchObjectTypeTemplates, renderSearchObjectTypeUsers, renderSearchOptionsDerefrenceShortcut, renderSearchOptionsTitle, renderSearchStringConstraintsComboBox, renderSearchTypeLink, renderSimpleNameSection, renderSpanEnd, renderSpanStart, renderTypesSection, renderTypeTitle
-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
addContactInfo, addDynamicScriptClass, addDynamicScriptFile, addFormalParameter, checkLevel, checkProcessingButtonsFlag, checkProcessingInfoFlag, checkStatus, displayError, displayError, displayError, emptyCell, excludeStaticTags, generateAnchorForExport, generateHiddenInputsForEvent, generateIFrameTag, getAppContext, getArgumentName, getAttributesShellDiv, getBeanPath, getBoneId, getClientSideHelper, getContainerServices, getContext, getContextMenu, getContextMenuManager, getContextMenuManagerName, getContextMenusDefinition, getCssPrefix, getDateFormat, getDebugOut, getDescriptor, getDescriptor, getDescriptor, getDescriptor, getDisplayMode, getDisplayName, getErrorMessage, getErrorMessage, getErrorTitle, getErrorTitle, getEventManager, getFirstDayOfWeek, getFloatValue, getHelpPath, getIntValue, getJSNameSpace, getLayoutContext, getLocale, getLocale, getPreferenceValue, getProjectID, getRequestKeys, getResourcesFolder, getScriptClass, getStringValue, getStyleRequestContext, getStyleShellDiv, getTagsFactory, getTimeFormat, getUnitsLabel, getWebBeanErrorInfo, hasSubBlock, initHeightAndWidthFromPreferences, initializeCss, initializeWebComponent, is508, isBlockMode, isContextMenusEnabled, isDhtml, isDialog, isDormant, isFeatureAvailable, isIFrameDisplayMode, isIFrameEnabled, isIFrameRequest, isJobExpired, isModal, isOpen, isPortlet, isTrue, localIsIFrameDisplayMode, newContext, newHiddenInputBuilder, newNamespaceEncoder, newURIBuilder, redirectToDisplayError, redirectToDisplayError, renderBean, renderBean, renderBean, renderBean, renderCancelButton, renderContextMenus, renderCssLink, renderDescriptor, renderDescriptor, renderErrorButton, renderHiddenInputFromRequest, renderLayout, renderProcessingButton, renderProcessingButton, renderProcessingButtonForGet, renderProcessingButtonForGet, renderProcessingInfoData, renderProcessingInfoImage, renderProcessingInfoSubtitle, renderProcessingInfoTitle, renderProcessingObjectName, renderRefreshButton, renderRegisterBone, renderSelf, renderSubBlock, renderUserHelpAnchor, setDisplayMode, setHasSubBlock, setHeight, setIFrameDisplayMode, setIsDormant, setRenderSubBlock, setShellAttributeOnClosedComponent, setWidth, shouldDisplay, transform, transformForRequestCanceled, transformForRequestInError, transformForRequestNotInited, transformForRequestProcessing, transformForRequestWaitingForUserInput
-
Methods inherited from class com.microstrategy.web.transform.AbstractLayoutTransform
getLayoutDefinition, setLayoutDefinition, transformUsingLayout
-
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, canTransform, getEvents, getFormalParams, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports, supports
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.transform.LayoutTransform
getLayoutDefinition, setLayoutDefinition
-
Methods inherited from interface com.microstrategy.web.transform.Transform
canTransform, getDescription, getFormalParams, getPreview, getSupportedBeanType, isPreviewAvailable, isResolved, supports, supports, transform
-
-
-
-
Field Detail
-
_mstrPage
protected PageComponent _mstrPage
Property to keep the information about thePageComponent
associated with the page currently being rendered
-
id
protected FormalParameter id
Indicates the name of the outer shell for all folder modes.- Since:
- MicroStrategy Web 9.0.0
-
isMiniSearchBox
protected FormalParameter isMiniSearchBox
Flag to indicate whether this is SearchBox in ShortcutsBar.
-
isServerSearch
protected FormalParameter isServerSearch
Flag to indicate whether this is SearchBox in IServer Admin page (Users and Security Roles Search)
-
showAsPopup
protected FormalParameter showAsPopup
Flag to indicate whether to show Search Results in a Popup This should be true for QuickSearchBox in ShortcutsBar, and SearchBox in Desktop Page.
-
showSuggestionAsPopup
protected FormalParameter showSuggestionAsPopup
Flag to indicate whether to show Suggestion List in a popup; or just below the SearchBox This should be true for QuickSearchBox in ShortcutsBar, and SearchBox in Desktop Page.
-
showSettings
protected FormalParameter showSettings
Flag to indicate where to make Advanced Search Options visible. This should be true for Desktop Page and Search Page SearchBox.
-
defaultRootFolderType
protected FormalParameter defaultRootFolderType
Search scope folder that used when no explicit folder is given (default as "All Folders"). Such as in Home, Search, Preferences page. But not in pages that have explicit folder, such as My Reports, Shared Reports, or navigating to any folder. Value options: Root Folder, My Reports, Shared Reports that defined in @EnumDSSXMLFolderNames;
-
-
Method Detail
-
initializeTransform
public void initializeTransform(Transformable data)
Description copied from class:AbstractAppTransform
This method initialize the private and protected fields of the transform, such as width and height. It also invokes the
This method is automatically called from theinitializeWebComponent
,initializeImages
andinitializeCss
methods.transform
method. Transforms which would like to invoke other methods in this instance directly (for example, to invoke some render methods), need first to call this method to guarantee that the Transform is ready to generate output.- Specified by:
initializeTransform
in interfaceAppTransform
- Overrides:
initializeTransform
in classSearchSimpleTransform
- Parameters:
data
- the bean to transform.
-
getID
public java.lang.String getID()
Description copied from class:AbstractAppTransform
Returns the unique name of the component to be used as the ID for its shell. This id is used for updating the page using the iFrame technology, and as the id for the corresponding bone (if any).- Specified by:
getID
in interfaceTransform
- Overrides:
getID
in classAbstractAppTransform
- Returns:
- the component's unique id
- Since:
- MicroStrategy Web 9.0.0
-
setBoneProperties
protected void setBoneProperties(JsonGenerator boneProps)
If we render bone shell from transform, then we want to pass these properties to the bone.- Overrides:
setBoneProperties
in classAbstractAppTransform
- Parameters:
boneProps
- the JsonGenerator object that contains the collection of bone properties.
-
renderJavaScriptFooter
public void renderJavaScriptFooter(MarkupOutput out)
Renders javascript variables at the bottom of the transform to be used in DHTML mode.- Overrides:
renderJavaScriptFooter
in classSearchSimpleTransform
- Parameters:
out
- where to write the output of the method.
-
isSettingVisible
public boolean isSettingVisible()
-
addTitleAttr
public java.util.Map addTitleAttr(int descId)
-
addAttr
public java.util.Map addAttr(java.lang.String name, java.lang.String value)
-
addAttr
public java.util.Map addAttr(java.lang.String name, int descId)
-
renderShell
public void renderShell(MarkupOutput out)
Description copied from class:AbstractAppTransform
Generates the shell for this Transform.
The shell is a
The attributes to append to this<div>
tag that automatically surrounds the content generated by the Transform. It's used among other things by the javascript to identify the HTML associated with a bone, and by the iFrame update technology to identify a component in the page.<div>
are obtained from thegetAttributesShellDiv
method; the style from thegetStyleShellDiv
method.
This method callsrenderCssLink
andcheckStatus
to generate the Transform's content.- Overrides:
renderShell
in classAbstractAppTransform
- Parameters:
out
- output by this transform
-
transformForRequestSuccessful
public void transformForRequestSuccessful(MarkupOutput out)
Transform when the status is "Successful".- Overrides:
transformForRequestSuccessful
in classSearchSimpleTransform
- Parameters:
out
- output by this transform- See Also:
AbstractAppTransform.checkStatus(com.microstrategy.web.beans.MarkupOutput)
-
createSearchBlock
protected Block createSearchBlock(MarkupOutput out) throws java.lang.Exception
- Throws:
java.lang.Exception
-
setObjectTypes
public void setObjectTypes(java.lang.String value)
Sets the list of object-types used for searching. This must be a comma separated list of object-types. Valid object types are those from theEnumDSSXMLObjectSubTypes
orEnumDSSXMLObjectTypes
enumerations.- Since:
- MicroStrategy Web 9.0.0
-
getObjectTypes
protected java.lang.String getObjectTypes()
Returns a comma separated list of object-types. If this parameter is not explicitly set, this method will return the default list of object types, that is: reports, documents and folders.- Since:
- MicroStrategy Web 9.0.0
-
setRootFolderId
public void setRootFolderId(java.lang.String value)
Sets the id of the folder to be used as root for searching. This must be a valid id of a folder existing in the md.- Since:
- MicroStrategy Web 9.0.0
-
getRootFolderId
protected java.lang.String getRootFolderId()
Returns the id of the folder to be used as root for searching. If this parameter has not been explicitly set, it will be calculated based on the application context.- Since:
- MicroStrategy Web 9.0.0
-
getSysFolder
protected int getSysFolder()
Returns the system folder name as defined inEnumDSSXMLFolderNames
to be used as root for searching. When a folder-id is also set, this method will return "0". If shared-reports has been set, this method might return "0" if the admin has configured a custom folder for shared reports.
If this parameter has not been explicitly set, it will be calculated based on the application context.- Since:
- MicroStrategy Web 9.0.0
-
setSysFolder
public void setSysFolder(java.lang.String sysFolder)
Sets the system folder name as defined inEnumDSSXMLFolderNames
to be used as root for searching. When a non-system folder should be used, this value must be set to "0". Assigning any other value will clear the root folder id parameter.- Since:
- MicroStrategy Web 9.0.0
- See Also:
getSysFolder()
-
getPreferenceSharedReportsFolderID
protected java.lang.String getPreferenceSharedReportsFolderID()
Returns the value of the admin preference for shared reports, or null if it has not been set.- Since:
- MicroStrategy Web 9.0.0
-
-