AuboStudio SDK 0.6.3

installation_node_service.h
浏览该文件的文档.
1 #ifndef AUBO_SCOPE_INSTALLATION_SERVICE_H
2 #define AUBO_SCOPE_INSTALLATION_SERVICE_H
3
4 #include <string>
5 #include <aubo_caps/domain/data/data_model.h>
6 #include <aubo_caps/contribution/view_api_provider.h>
7 #include <aubo_caps/contribution/installation/installation_node_view.h>
8 #include <aubo_caps/contribution/installation/installation_node_contribution.h>
9 #include <aubo_caps/contribution/installation/installation_creation_context.h>
10 #include <aubo_caps/contribution/installation/installation_contribution_configuration.h>
11 #include <aubo_caps/contribution/installation/installation_api_provider.h>
12
13 namespace arcs {
14 namespace aubo_scope {
15 ARCS_CLASS_FORWARD(InstallationNodeService);
16
17 /**
18 * Defines an API required for defining and adding to AuboScope an installation
19 * node and corresponding screen where the user interface is Swing-based.
20 */
21 class InstallationNodeService
22 {
23 public:
24 virtual ~InstallationNodeService() = default;
25
26 /**
27 * @param locale the current locale of AuboScope. Can be used for supporting
28 * titles in several languages.
29 * @return The text displayed for this installation contribution in the
30 * left-hand side navigation of the Installation Tab as well as the title of
31 * the corresponding installation node screen. Called once at start up.
32 */
33 virtual std::string getTitle() = 0;
34
35 /**
36 * @param locale the current locale of AuboScope. Can be used for supporting
37 * titles in several languages.
38 * @return The text displayed for this installation contribution in the
39 * left-hand side navigation of the Installation Tab as well as the title of
40 * the corresponding installation node screen. Called once at start up.
41 */
42 virtual std::string getIcon() = 0;
43
44 /**
45 * This method is called once after this service is registered. Modify the
46 * configuration parameter to configure your contribution/ The configuration
47 * object will already have default values for its properties matching most
48 * use cases. <p> The values of the ContributionConfiguration object will be
49 * read once immediately after this method call. Changing values at a later
50 * stage will have no effect, so do not store a reference to the
51 * configuration object.
52 * </p>
53 * If the default values are appropriate, leave this method empty.
54 *
55 * @param configuration a modifiable ContributionConfiguration with default
56 * values
57 */
58 virtual void configureContribution(
59 InstallationContributionConfigurationPtr configuration) = 0;
60
61 /**
62 * Creates a new View instance which implements the UI for your installation
63 * node screen. Called once when a new installation is loaded or created.
64 *
65 * @param api_provider Provides access to functionality and services
66 * available from within AuboScope related to user interface and end user
67 * interaction
68 * @return the view
69 */
70 virtual InstallationNodeViewPtr createView(
71 ViewApiProviderPtr api_provider) = 0;
72
73 /**
74 * <p>
75 * Creates a new installation node instance.
76 * </p>
77 * <p>
78 * The returned node must use the supplied data model object to retrieve and
79 * store the data contained in it. All modifications to the supplied data
80 * model from the installation node constructor are ignored when an existing
81 * installation is loaded. The data model object is shared between all
82 * installation nodes contributed by the same AuboCap.
83 * </p>
84 *
85 * @param api_provider Provides access to functionality and services
86 * available from within AuboScope relevant for the installation node
87 * @param view the View created by {@link #createView(ViewAPIProvider)}
88 * @param model object where all configuration data of the new installation
89 * node instance is to be stored in and retrieved from
90 * @param context the context in which this node is created
91 * @return the newly constructed installation node contribution instance
92 */
93 virtual InstallationNodeContributionPtr createInstallationNode(
94 InstallationApiProviderPtr api_provider, InstallationNodeViewPtr view,
95 DataModelPtr model, InstallationCreationContextPtr context) = 0;
96 };
97
98 } // namespace aubo_scope
99 } // namespace arcs
100
101 #endif
arcs::aubo_scope::InstallationNodeService
Defines an API required for defining and adding to AuboScope an installation node and corresponding s...
Definition: installation_node_service.h:22
arcs::aubo_scope::InstallationNodeService::getIcon
virtual std::string getIcon()=0
arcs::aubo_scope::InstallationNodeService::createView
virtual InstallationNodeViewPtr createView(ViewApiProviderPtr api_provider)=0
Creates a new View instance which implements the UI for your installation node screen.
arcs::aubo_scope::InstallationNodeService::~InstallationNodeService
virtual ~InstallationNodeService()=default
arcs::aubo_scope::InstallationNodeService::createInstallationNode
virtual InstallationNodeContributionPtr createInstallationNode(InstallationApiProviderPtr api_provider, InstallationNodeViewPtr view, DataModelPtr model, InstallationCreationContextPtr context)=0
arcs::aubo_scope::InstallationNodeService::getTitle
virtual std::string getTitle()=0
arcs::aubo_scope::InstallationNodeService::configureContribution
virtual void configureContribution(InstallationContributionConfigurationPtr configuration)=0
This method is called once after this service is registered.
data_model.h
installation_api_provider.h
installation_contribution_configuration.h
installation_creation_context.h
installation_node_contribution.h
installation_node_view.h
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs
Definition: contribution_provider.h:7
view_api_provider.h