API Docs for: 0.1
Show:

File: /home/alex/dev/work/webapps/branches/scopes/doc/src/bindings/src/categorised-result.js

/**
 * 
 * A result, including the category it belongs to.
 * 
 * @module ScopeJS
 * @class CategorisedResult
 *
 * @constructor
 * @param category The category for the result.*/
function CategorisedResult(){}

CategorisedResult.prototype = {
/**
* Updates the category of this result.
 * @method set_category
 * @param category The category for the result.
*/
set_category: function(Category: category) {
},
/**
* Get the category instance this result belongs to.
 * @method category
 * @return {Category} The category instance.
*/
category: function() {
},
/**
* This method is meant to be used by aggregator scopes which want to modify
 * results they receive, but want to keep a copy of the original result so
 * that they can be correctly handled by the original scopes
 * who created them when it comes to activation or previews.
 * Scopes middleware will automatically pass the correct inner stored result
 * to the activation or preview request handler
 * 
 * @method store
 * @param {Result} The original result to store within this result.
 * @param {Boolean} intercept_activation True if this scope should receive activation and preview requests.
*/
store: function({Result}: result, {Boolean}: intercept_activation) {
},
/**
* Check if this Result instance has a stored result.
 * @method has_stored_result
 * @return {Boolean} True if there is a stored result
*/
has_stored_result: function() {
},
/**
* Get a stored result.
 * @method retrieve
 * @return {Result} stored result
*/
retrieve: function() {
},
/**
* Set the "uri" attribute of this result.
 * @method set_uri
 * @param uri {String}
*/
set_uri: function(uri) {
},
/**
* Set the "title" attribute of this result.
 * @method set_title
 * @param title {String}
*/
set_title: function(title) {
},
/**
* Set the "art" attribute of this result.
 * @method set_art
 * @param art {String}
*/
set_art: function(art) {
},
/**
* Set the "dnd_uri" attribute of this result.
 * @method set_dnd_uri
 * @param dnd_uri {String}
*/
set_dnd_uri: function(dnd_uri) {
},
/**
* Indicates to the receiver that this scope should intercept
 * activation requests for this result.
 * By default, a scope receives preview requests for the results it
 * creates, but does not receive activation requests (they are handled
 * directly by the shell). Intercepting activation implies intercepting
 * preview requests as well; this is important for scopes that forward
 * results from other scopes and call set_intercept_activation() on these scopes.
 * A scope that sets intercept activation flag for a result should re-implement
 * Scope.activate() and provide an implementation of ActivationQuery that
 * handles the actual activation. If not called, the result will be activated
 * directly by the Unity shell whithout involving the scope, assuming an appropriate
 * URI schema handler is present on the system.
 * 
 * @method set_intercept_activation
*/
set_intercept_activation: function() {
},
/**
* Check if this result should be activated directly by the shell
 * because the scope doesn't handle activation of this result.
 * @method direct_activation
 * @return {Boolean} True if this result needs to be activated directly.
*/
direct_activation: function() {
},
/**
* Get the "uri" property of this Result.
 * This method returns an empty string if this attribute is not of type String.
 * @method uri
 * @return {String} The value of "uri" or the empty string.
*/
uri: function() {
},
/**
* Get the "title" property of this Result.
 * This method returns an empty string if this attribute is not of type String.
 * @method title
 * @return {String} The value of "title" or the empty string.
*/
title: function() {
},
/**
* Get the "art" property of this Result.
 * This method returns an empty string if this attribute is not of type String.
 * @method art
 * @return {String} The value of "art" or the empty string.
*/
art: function() {
},
/**
* Get the "dnd_uri" property of this Result.
 * This method returns an empty string if this attribute is not of type String.
 * @method dnd_uri
 * @return {String} The value of "dnd_uri" or the empty string.
*/
dnd_uri: function() {
},
/**
* Check if this Result has an attribute.
 * @method contains
 * @param key The attribute name.
 * @return {Boolean} True if the attribute is set.
*/
contains: function(key) {
},
/**
* Check if this result is an online account login result.
 * @method is_account_login_result
 * @return {Boolean} True if this result is an online account login result.
*/
is_account_login_result: function() {
},
/**
* Gets the value of a custom metadata attribute.
 * @method get
 * @param key {String} The name of the attribute.
 * @return Attribute value or null
*/
get: function(key) {
},
/**
* Sets the value of a custom metadata attribute.
 * @method set
 * @param key {String} The name of the attribute.
 * @param value The value of the attribute.
*/
set: function(key, value) {
}
};