Custom Action Integration

Custom Action Integration

Custom actions provide amazing flexibility and strength to your Flux application, allowing for seamless integration into every aspect of your Flux Environment. This document outlines just how easy, and seamless, integration with custom actions can be.

The "GoogleCalendarAction.zip" archive file, attached to this document, holds all the images, source code, and Google Calendar libraries needed to create the custom action, "Add Event Action". Also included are the Eclipse and IntelliJ IDEA project files. By opening this project in either IDE, this example can be navigated, built, and run quickly and easily. The "AddEventAction.jar" file has the custom classes, images, and factory.properties file
packaged together for use on the engine's class path. IntelliJ IDEA or Eclipse can be used to build the jar from the project, or it can be assembled manually. Once this jar is added to your engine's class path, Flux will be able to load and use the custom classes.

NOTE: All custom action class dependencies must either be present on the engine's class path as well, or included on the JAR's class path via the manifest file.

The custom action's bean class plays a large role in communicating to the Web-based Designer what needs to be displayed and where. Which category
the custom action is displayed under in the actions menu, which icons to use, which properties to display and in which order, and descriptions for the custom action and all its properties are some of the features the custom action's bean class controls. View the "AddEventActionImplBeanInfo" class, within the "GoogleCalendarAction.zip" file, for a closer look at how this works.

Double clicking the custom action displays its action properties. Notice that each action property specified in the custom action's bean class is
provided in the menu, along with the option for displaying the other generic action properties. These action properties are easily added to the property list using the custom action's bean class, adding the returned properties from the super.getPropertyDescriptors() call.

Notice, on the below image, that some of the custom action's properties have a red asterisk behind each of them, meaning it is a required property.
These asterisks are displayed by simply setting a required flag to true when creating your property, inside the custom action's bean class.

Some properties have editors for them, shown below, such as the "Event Start Time" and "Event End Time". These editors, such as the date and text
editors, are available for any action property that requires a Date object, and is used automatically with little to no configuration on your part. The date editor automatically detects when your property requires a java.util.Date object, where the Flux text editor class, "fluximpl.StringBeanEditor" must be specified as the editor argument.

Running and Modifying this Example

As stated above, the Eclipse and IntelliJ IDEA project files are included in the downloadable zip file, attached to this document. For simply running this example, add the "AddEventAction.jar" file to your Flux engine's class path, and restart the engine.

For this example you will need access to a Google account. If you have access to an account, fill in the "Email", "Password", and "Calendar URL" properties with that account information. The "Calendar URL" property is most likely in the following format:
"http://www.google.com/calendar/feeds/<my_email_address>/private/full"
where "<my_email_address>" is the account holder's email address. The remaining "Add Event Action" properties are the event's details that will be posted to the specified Google calendar.

Attachments:

 
 
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.