Step 1: Create The Applet
Last updated on: 1/16/2013 1:31 PM
Created on: 3/21/2014 2:18 PM
There is only one way to have an applet run in the System Core 7 framework and that is to implement the Applet Interface into System Core. To create our Demo Applet we need to create a class called AppletDemo and have it subclassed from the ISCApplet class. This particular interface class has both pure virtual functions that we must implement but also some base functions to handle functionality not required. Two pure virtual functions must be implemented: GetName() and Initialize().
Seven methods are provided to customize the outward identify of our Demo Applet. We are required to provide the method GetName() and have it return the string "Demo". The framework may at times display a graphical image associated with our applet. To have the proper image displayed the string resource identifier needs to be returned from the GetImage() method. Additional, a textual description of the applet's features and purpose can be displayed by the framework. To customize this text, return the appropriate string from the GetDescription() method. By default, both GetImage() and GetDescription() return empty strings leaving the framework to provide the appropriate defaults for both fields.
Two methods are provided for custom purposes but in most cases should not be re-implemented from the default behavior provided by the ISCApplet class. GetCategory() will by default return a type identifier of APP_TYPE_APPLICATION indicating that our applet is providing application style functionality to the user. There are two types that are reserved for the framework and are marked as reserved in the documentation. Two other types are available for use but in most cases will never be needed. APP_TYPE_ADMINISTRATION indicates that the applet would be used to provide administration functionality and should only be available on server orrientated implementation of the framework. The last type, APP_TYPE_CONTACTS, indicates that the applet is providing address book type functionality. The framework reserves the right to make use of contacts in a way that is appropriate with its implementation of the address book. It is recommended that this last type be used only if the app is providing users with access to X.509 end entity certificates.
The other custom purpose method is GetFeatureEnableFlags(). The default will return AFF_ENABLED_NONE indicating no special services of the framework are required by the applet. A combination of any of the flags AFF_ENABLED_LDAP, AFF_ENABLED_DAS and AFF_ENABLED_ENCRYPTION can be used to specify that the applet requests these services to be made available. This function however contradicts the design principle of the framework's intent to hide advanced PKI features and these flags may in current and future versions be ignored as the product matures.
To have information about our Demo applet appear in the framework's about dialog we need to implement two methods: AboutCopyrightString() and AboutVersionString(). The version should be returned as a textual representation of the version number such as 1.0.2. The Copyright only needs to be implemented if there is copyright information specific to the applet that isn't covered by the existing copyright notice in the about dialog. If the Demo applet uses open source or licensed code, legal notices as such should be returned in this method.
The framework implements the notion of centralized management and communicates with a server to obtain the proper organizational configuration for products that exist in the framework. To have our applet use these built in features, a template is provided to the administrator. The framework uses the template to create a configuration that can be downloaded and used by the framework running on the workstations. To allow for product names to be modified or enhanced over time the templates instead are matched up by using a string identifier not meant to be changed for visible to the end user. The template identifier is stored in the XML template file and that identifier must be returned by the ProductTemplateString() method. The framework will use the product template name to obtain the proper administrator configured settings should one be available.
The framework also wants all applets to be have default initialization parameters configured before the applet is run for the first time. When the framework detects that a workstation is running the framework for the first time, the framework will call OnBuildInitialSettings() in each applet to prepare the initial defaults needed by the applet. The base implementation of this method provides no default settings and exists solely for the purpose that our Demo applet doesn't require settings. However, in most cases this method needs to be implemented to provide the base values so the user doesn't need to provide any configuration information to start using the applet.
While the framework is a user interface product designed for interactive user actions, the framework also supports command line processing for scripting and batch file procedures. The ISCApplet interface exposes a number of function to deal with actions being issued via the command line. The first method that needs to be implemented is the SupportsFileType() method. A QString is passed into this method containing the file extension of the file specified in the command line. If the file extension is one that is handled by our Demo applet, this method needs to return true. Once we return true, the proper action is invoked based on the command line switches. This action will come from this list of methods: OnFileOpen(), OnFileSave(), OnFileEmail(), OnEditDelete(), OnEditCopyTo(), OnEditMoveTo(), OnEditRename() and OnViewProperties(). By default all these methods return ALE_NOT_SUPPORTED indicating that the specified action for the given file isn't available. If our Demo Applet's primary purpose is to share existing content with others, we may choose to implement the OnFileSave() and OnFileEmail() methods while not implementing any of the file actions that aren't needed.
At this point we now have an Applet called Demo that can display its version information, configure its initial settings and handle any supported command line operations.
TopicsDeveloper's Historical Persepctive Why A Platform Standards The User Experience
InterfacesISCApplet ISCTaskListExtension ISCConfigPanelExtension ISCErrorReporterExtension ISCLogConnector/ISCLogEntry ISCCertificateStoreExtension ISCSystemTrayExtension ISCAppletWindowExtension ISCSecureObjectExtension
Applet Building StepsStep 1: Create The Applet Step 2: Adding Action Items Step 3: Adding Configuration Panels Step 4: Adding Custom Error Text Step 5: Startup/Shutdown Step 6: Adding Main Window Support Step 7: Adding Obejct Window Support