public class SearchApiPublisher
extends java.lang.Object
window.MBAPI.search
window.MBAPI.search.getViewPage()
for example)Constructor and Description |
---|
SearchApiPublisher() |
Modifier and Type | Method and Description |
---|---|
static void |
addResolverToBasket(java.lang.String theResolver,
com.google.gwt.core.client.JavaScriptObject theCallback)
Adds assets specified by the resolver to a basket.
|
static jb.gwt_main_modules.base_widgets.client.searches.GwtBooleanCriterion |
createBooleanCriterion(java.lang.String theConjugation)
Create a GwtSearchCriteria object for searching with
|
static jb.gwt_main_modules.base_widgets.client.searches.GwtCurrentSelectionSearchLocation |
createCurrentSelectionSearch()
Get a location object for displaying the current selection
|
static jb.gwt_main_modules.base_widgets.client.searches.GwtDirectoryCriterion |
createDirectorySearch(int theDirectoryId,
boolean theIsTransparent)
Get a search object for directory search
|
static jb.gwt_main_modules.base_widgets.client.searches.GwtDirectoryCriterion |
createDirectorySearchRelative(java.lang.String theDirectoryRelativePath,
boolean theIsTransparent)
Get a search object for directory search
|
static jb.gwt_main_modules.base_widgets.client.searches.GwtFieldCriterion |
createFieldCriterion(java.lang.String theField,
java.lang.String theCondition,
java.lang.String theValue)
Create a field criterion
|
static jb.gwt_main_modules.base_widgets.client.searches.GwtQuickSearchCriterion |
createQuickSearch(java.lang.String theSearch,
boolean theUseDictionaries,
boolean theUseSynonyms,
boolean theUseThesaurus)
Get a search object for the "quick search" portion.
|
static jb.gwt_main_modules.base_widgets.client.searches.GwtSavedSelectionCriterion |
createSavedSelectionSearch(int theSelectionId)
Get a location object for displaying a saved selection
|
static com.google.gwt.core.client.JavaScriptObject |
getNativeBooleanCriteria(jb.gwt_main_modules.base_widgets.client.searches.GwtBooleanCriterion theCriterion) |
static void |
getPlacedImages(int theAssetId,
com.google.gwt.core.client.JavaScriptObject theCallback)
Returns an array of record ids of places assets
|
static void |
getSavedSearch(java.lang.String theSavedSearchName,
com.google.gwt.core.client.JavaScriptObject theCallback)
Method returns a saved search by name
Example code:
function doSearch()
{
parent.MBAPI.search.getSavedSearch("My Search Name", callback);
}
function callback(theSearch)
{
parent.MBAPI.search.getViewPage().setSearch(theSearch);
parent.MBAPI.search.refreshView(function(){});
}
|
static void |
getSavedSearchById(int theSavedSearchId,
com.google.gwt.core.client.JavaScriptObject theCallback)
Method returns a saved search by id
Example code:
function doSearch()
{
parent.MBAPI.search.getSavedSearchById(3, callback);//3 is the search id
}
function callback(theSearch)
{
parent.MBAPI.search.getViewPage().setSearch(theSearch);
parent.MBAPI.search.refreshView(function(){});
}
|
static jb.gwt_main_modules.base_widgets.client.services.ViewPage |
getViewPage()
Gets an instance of our current ViewPage so we can modify and do searches
|
static void |
hasVersions(int theRecordId,
jb.gwt_main_modules.base_widgets.client.DefaultCallback theCallback)
Does this asset have any versions
|
static void |
internalHasVersions(int theRecordId,
com.google.gwt.core.client.JavaScriptObject theCallback) |
static void |
loadAllVersions(int theRecordId)
Load all versions of this file into the user's current selection and show them in the active view widget
|
static void |
refreshView(jb.gwt_main_modules.base_widgets.client.DefaultCallback theCallback)
Calling this method will reload our current ViewPage
|
static void |
setSortOrder(java.lang.String theField)
Sets the sort order for specified field.
|
static void |
setupJavascriptAPIs() |
public static void setupJavascriptAPIs()
public static void getSavedSearch(java.lang.String theSavedSearchName, com.google.gwt.core.client.JavaScriptObject theCallback)
theSavedSearchName
- the saved search nametheCallback
- callback function to pass the search topublic static void getSavedSearchById(int theSavedSearchId, com.google.gwt.core.client.JavaScriptObject theCallback)
theSavedSearchId
- the saved search idtheCallback
- callback function to pass the search topublic static com.google.gwt.core.client.JavaScriptObject getNativeBooleanCriteria(jb.gwt_main_modules.base_widgets.client.searches.GwtBooleanCriterion theCriterion)
public static jb.gwt_main_modules.base_widgets.client.searches.GwtDirectoryCriterion createDirectorySearchRelative(java.lang.String theDirectoryRelativePath, boolean theIsTransparent)
theDirectoryRelativePath
- the directory relative paththeIsTransparent
- should we show files only in the current directory or assets in subdirectories as wellpublic static jb.gwt_main_modules.base_widgets.client.searches.GwtDirectoryCriterion createDirectorySearch(int theDirectoryId, boolean theIsTransparent)
theDirectoryId
- the directory idtheIsTransparent
- should we show files only in the current directory or assets in subdirectories as wellpublic static jb.gwt_main_modules.base_widgets.client.searches.GwtQuickSearchCriterion createQuickSearch(java.lang.String theSearch, boolean theUseDictionaries, boolean theUseSynonyms, boolean theUseThesaurus)
theSearch
- the search stringtheUseDictionaries
- use dictionaries in the searchtheUseSynonyms
- search for synonyms toopublic static jb.gwt_main_modules.base_widgets.client.searches.GwtCurrentSelectionSearchLocation createCurrentSelectionSearch()
public static jb.gwt_main_modules.base_widgets.client.searches.GwtBooleanCriterion createBooleanCriterion(java.lang.String theConjugation)
theConjugation
- AND or ORpublic static jb.gwt_main_modules.base_widgets.client.searches.GwtFieldCriterion createFieldCriterion(java.lang.String theField, java.lang.String theCondition, java.lang.String theValue)
theField
- the field id eg http://mediabeacon.com/work/1.0/ timetheCondition
- the condition (3 is equals)theValue
- the value to search withpublic static jb.gwt_main_modules.base_widgets.client.searches.GwtSavedSelectionCriterion createSavedSelectionSearch(int theSelectionId)
theSelectionId
- the selection id to loadpublic static jb.gwt_main_modules.base_widgets.client.services.ViewPage getViewPage()
public static void refreshView(jb.gwt_main_modules.base_widgets.client.DefaultCallback theCallback)
theCallback
- function to inform when the viewpage is fetched and parsed from the serverpublic static void loadAllVersions(int theRecordId)
theRecordId
- the asset id to search withpublic static void internalHasVersions(int theRecordId, com.google.gwt.core.client.JavaScriptObject theCallback)
public static void hasVersions(int theRecordId, jb.gwt_main_modules.base_widgets.client.DefaultCallback theCallback)
theRecordId
- the asset to look fortheCallback
- returns true if we have any of the version typespublic static void setSortOrder(java.lang.String theField)
theField
- the field to sortpublic static void getPlacedImages(int theAssetId, com.google.gwt.core.client.JavaScriptObject theCallback)
theAssetId
- INDD asset to search withtheCallback
- callback function to inform when we have the informationpublic static void addResolverToBasket(java.lang.String theResolver, com.google.gwt.core.client.JavaScriptObject theCallback)
theResolver
- the resolver.theCallback
- the callback.Copyright © 2023 MediaBeacon, Inc. All Rights Reserved.