Class BrowserIntent
java.lang.Object
com.tccc.kos.core.service.browser.BrowserNav
com.tccc.kos.core.service.browser.BrowserIntent
- Direct Known Subclasses:
AppBrowserIntent
A
BrowserIntent
is a generic way to describe how to
navigate a given browser to a particular page. An intent is
defined as a type and collection of properties that capture
the goal of the intent. Resolvers can then process the intent
and transform it into another intent to be resolved again, or
ultimately a BrowserUrl
which contains an actual url.
An intent captures the target browser for the navigation
by way of BrowserId
which is a combination of
NodeId
and browserName
. If not specified,
the target browser is the default browser on the current node.
When transforming intents, the BrowserId
from the
original intent should be used in the new intent to ensure
that it still targets the same browser.
- Since:
- 1.0
- Version:
- 2024-02-12
-
Constructor Summary
ConstructorsConstructorDescriptionBrowserIntent
(NodeId nodeId, String browserName, String type) Create a browser intent for the specified browser in the specified node with the specified type.Create a browser intent for the specified browser in the specified node with the specified type and properties.BrowserIntent
(BrowserId browserId, String type) Create a browser intent targeting the specified browser.Create a browser intent targeting the specified browser.BrowserIntent
(BrowserIntent intent, String type) Create a browser intent targeting the browser contained in the specified intent.BrowserIntent
(BrowserIntent intent, String type, Map<String, Object> properties) Create a browser intent targeting the browser contained in the specified intent.BrowserIntent
(String type) Create a browser intent for the default browser on the current node with the specified type.BrowserIntent
(String type, Map<String, Object> properties) Create a browser intent for the default browser on the current node with the specified type and properties -
Method Summary
Modifier and TypeMethodDescriptionReturn the properties from this intent.getProperty
(String name) Return the named property.getStrProperty
(String name) Return the named property as a string.getType()
Return the type of the intent.setProperty
(String name, Object val) Add a property to the intent.toString()
Methods inherited from class com.tccc.kos.core.service.browser.BrowserNav
getBrowserId, setBrowserId
-
Constructor Details
-
BrowserIntent
Create a browser intent for the default browser on the current node with the specified type.- Parameters:
type
- type of the intent
-
BrowserIntent
Create a browser intent for the default browser on the current node with the specified type and properties- Parameters:
type
- type of the intentproperties
- properties of the intent
-
BrowserIntent
Create a browser intent for the specified browser in the specified node with the specified type.- Parameters:
nodeId
- the node the browser is running onbrowserName
- the name of the browser on the nodetype
- type of the intent
-
BrowserIntent
Create a browser intent for the specified browser in the specified node with the specified type and properties.- Parameters:
nodeId
- the node the browser is running onbrowserName
- the name of the browser on the nodetype
- type of the intentproperties
- properties of the intent
-
BrowserIntent
Create a browser intent targeting the browser contained in the specified intent. This is used when transforming one intent to another so that the target browser doesn't get lost.- Parameters:
intent
- the original intent containing the target browsertype
- type of the new intent
-
BrowserIntent
Create a browser intent targeting the browser contained in the specified intent. This is used when transforming one intent to another so that the target browser doesn't get lost.- Parameters:
intent
- the original intent containing the target browsertype
- type of the new intentproperties
- properties of the new intent
-
BrowserIntent
Create a browser intent targeting the specified browser.- Parameters:
browserId
- the browser to targettype
- type of the new intent
-
BrowserIntent
Create a browser intent targeting the specified browser.- Parameters:
browserId
- the browser to targetproperties
- type of the new intent
-
-
Method Details
-
getType
Return the type of the intent. -
getProperty
Return the named property.- Parameters:
name
- the property name
-
getStrProperty
Return the named property as a string. This is simply a convenience method that casts the resulting object.- Parameters:
name
- the property name
-
setProperty
Add a property to the intent.- Parameters:
name
- property nameval
- property value
-
getProperties
Return the properties from this intent. -
toString
- Overrides:
toString
in classBrowserNav
-