diff --git a/demo/PushNotifications-Example.mpr b/demo/PushNotifications-Example.mpr index 2e9267c..bb30c06 100644 Binary files a/demo/PushNotifications-Example.mpr and b/demo/PushNotifications-Example.mpr differ diff --git a/demo/javasource/pushnotifications/actions/SendMessageToUser.java b/demo/javasource/pushnotifications/actions/SendMessageToUser.java new file mode 100644 index 0000000..73a1626 --- /dev/null +++ b/demo/javasource/pushnotifications/actions/SendMessageToUser.java @@ -0,0 +1,71 @@ +// This file was generated by Mendix Modeler. +// +// WARNING: Only the following code will be retained when actions are regenerated: +// - the import list +// - the code between BEGIN USER CODE and END USER CODE +// - the code between BEGIN EXTRA CODE and END EXTRA CODE +// Other code you write will be lost the next time you deploy the project. +// Special characters, e.g., é, ö, à, etc. are supported in comments. + +package pushnotifications.actions; + +import com.mendix.systemwideinterfaces.core.IContext; +import com.mendix.webui.CustomJavaAction; +import com.mendix.systemwideinterfaces.core.IMendixObject; +import static pushnotifications.proxies.microflows.Microflows.createAndSendMessageToUser; + +/** + * Java action to send a message directly to all devices of a user + * Parameters: + * Device: Android or iOS + * MessageText: the contents of the message + * Title: The title of the message + * Badge: a number that appears on the app icon (iOS) + * LaunchImage: file name of the launch image (iOS) + * Sound: name of system sound to play (iOS) + * + */ +public class SendMessageToUser extends CustomJavaAction +{ + private IMendixObject __UserParameter1; + private system.proxies.User UserParameter1; + private String MessageText; + private String Title; + private Long Badge; + private String LaunchImage; + private String Sound; + + public SendMessageToUser(IContext context, IMendixObject UserParameter1, String MessageText, String Title, Long Badge, String LaunchImage, String Sound) + { + super(context); + this.__UserParameter1 = UserParameter1; + this.MessageText = MessageText; + this.Title = Title; + this.Badge = Badge; + this.LaunchImage = LaunchImage; + this.Sound = Sound; + } + + @Override + public Boolean executeAction() throws Exception + { + this.UserParameter1 = __UserParameter1 == null ? null : system.proxies.User.initialize(getContext(), __UserParameter1); + + // BEGIN USER CODE + createAndSendMessageToUser(getContext(), UserParameter1, MessageText, Title, Badge, LaunchImage, Sound); + return true; + // END USER CODE + } + + /** + * Returns a string representation of this action + */ + @Override + public String toString() + { + return "SendMessageToUser"; + } + + // BEGIN EXTRA CODE + // END EXTRA CODE +} diff --git a/demo/javasource/system/UserActionsRegistrar.java b/demo/javasource/system/UserActionsRegistrar.java index 6d7adac..a9d1eab 100644 --- a/demo/javasource/system/UserActionsRegistrar.java +++ b/demo/javasource/system/UserActionsRegistrar.java @@ -138,6 +138,7 @@ public void handleEvent(Event event) component.actionRegistry().registerUserAction(pushnotifications.actions.SendGoogleMessages.class); component.actionRegistry().registerUserAction(pushnotifications.actions.SendMessage.class); component.actionRegistry().registerUserAction(pushnotifications.actions.SendMessagesInBackground.class); + component.actionRegistry().registerUserAction(pushnotifications.actions.SendMessageToUser.class); component.actionRegistry().registerUserAction(pushnotifications.actions.StartAPN.class); component.actionRegistry().registerUserAction(pushnotifications.actions.StartGCM.class); component.actionRegistry().registerUserAction(pushnotifications.actions.StopAPN.class); diff --git a/demo/resources/communitycommons/antisamy/Developer Guide.pdf b/demo/resources/communitycommons/antisamy/Developer Guide.pdf deleted file mode 100644 index 5a39f9e..0000000 Binary files a/demo/resources/communitycommons/antisamy/Developer Guide.pdf and /dev/null differ diff --git a/demo/resources/communitycommons/antisamy/antisamy-anythinggoes-1.4.4.xml b/demo/resources/communitycommons/antisamy/antisamy-anythinggoes-1.4.4.xml deleted file mode 100644 index ae5e28b..0000000 --- a/demo/resources/communitycommons/antisamy/antisamy-anythinggoes-1.4.4.xml +++ /dev/null @@ -1,2632 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g - grin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demo/resources/communitycommons/antisamy/antisamy-bootstraprte-1.4.4.xml b/demo/resources/communitycommons/antisamy/antisamy-bootstraprte-1.4.4.xml deleted file mode 100644 index 0e68383..0000000 --- a/demo/resources/communitycommons/antisamy/antisamy-bootstraprte-1.4.4.xml +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g - grin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/demo/resources/communitycommons/antisamy/antisamy-bootstraprte_nolink-1.4.4.xml b/demo/resources/communitycommons/antisamy/antisamy-bootstraprte_nolink-1.4.4.xml deleted file mode 100644 index 72a1f60..0000000 --- a/demo/resources/communitycommons/antisamy/antisamy-bootstraprte_nolink-1.4.4.xml +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g - grin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/demo/resources/communitycommons/antisamy/antisamy-ebay-1.4.4.xml b/demo/resources/communitycommons/antisamy/antisamy-ebay-1.4.4.xml deleted file mode 100644 index 0f7bf53..0000000 --- a/demo/resources/communitycommons/antisamy/antisamy-ebay-1.4.4.xml +++ /dev/null @@ -1,2445 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g - grin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demo/resources/communitycommons/antisamy/antisamy-myspace-1.4.4.xml b/demo/resources/communitycommons/antisamy/antisamy-myspace-1.4.4.xml deleted file mode 100644 index f1f9876..0000000 --- a/demo/resources/communitycommons/antisamy/antisamy-myspace-1.4.4.xml +++ /dev/null @@ -1,2602 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g - grin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demo/resources/communitycommons/antisamy/antisamy-slashdot-1.4.4.xml b/demo/resources/communitycommons/antisamy/antisamy-slashdot-1.4.4.xml deleted file mode 100644 index 1a644a7..0000000 --- a/demo/resources/communitycommons/antisamy/antisamy-slashdot-1.4.4.xml +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g - grin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demo/resources/communitycommons/antisamy/antisamy-tinymce-1.4.4.xml b/demo/resources/communitycommons/antisamy/antisamy-tinymce-1.4.4.xml deleted file mode 100644 index 042c099..0000000 --- a/demo/resources/communitycommons/antisamy/antisamy-tinymce-1.4.4.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g - grin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/demo/widgets/MxPushNotifications.mpk b/demo/widgets/MxPushNotifications.mpk index 6b7e2ca..4ddbfa9 100644 Binary files a/demo/widgets/MxPushNotifications.mpk and b/demo/widgets/MxPushNotifications.mpk differ diff --git a/package.json b/package.json index fcba3fd..d736fe8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "MxPushNotifications", - "version": "1.0.0", + "version": "2.0.0", "description": "Phonegap widget for notifications", "license": "Apache 2.0", "author": "Mendix Technology B.V.", diff --git a/src/package.xml b/src/package.xml index 2518092..643c9e0 100644 --- a/src/package.xml +++ b/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/test/PushNotifications.mpr b/test/PushNotifications.mpr index b07f753..f2e5ed1 100755 Binary files a/test/PushNotifications.mpr and b/test/PushNotifications.mpr differ diff --git a/test/javasource/profileservice/proxies/GetDisplayNameResponse.java b/test/javasource/profileservice/proxies/GetDisplayNameResponse.java deleted file mode 100644 index 4332c39..0000000 --- a/test/javasource/profileservice/proxies/GetDisplayNameResponse.java +++ /dev/null @@ -1,202 +0,0 @@ -// This file was generated by Mendix Business Modeler. -// -// WARNING: Code you write here will be lost the next time you deploy the project. - -package profileservice.proxies; - -/** - * - */ -public class GetDisplayNameResponse -{ - private final com.mendix.systemwideinterfaces.core.IMendixObject getDisplayNameResponseMendixObject; - - private final com.mendix.systemwideinterfaces.core.IContext context; - - /** - * Internal name of this entity - */ - public static final java.lang.String entityName = "ProfileService.GetDisplayNameResponse"; - - /** - * Enum describing members of this entity - */ - public enum MemberNames - { - Result("Result"); - - private java.lang.String metaName; - - MemberNames(java.lang.String s) - { - metaName = s; - } - - @Override - public java.lang.String toString() - { - return metaName; - } - } - - public GetDisplayNameResponse(com.mendix.systemwideinterfaces.core.IContext context) - { - this(context, com.mendix.core.Core.instantiate(context, "ProfileService.GetDisplayNameResponse")); - } - - protected GetDisplayNameResponse(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject getDisplayNameResponseMendixObject) - { - if (getDisplayNameResponseMendixObject == null) - throw new java.lang.IllegalArgumentException("The given object cannot be null."); - if (!com.mendix.core.Core.isSubClassOf("ProfileService.GetDisplayNameResponse", getDisplayNameResponseMendixObject.getType())) - throw new java.lang.IllegalArgumentException("The given object is not a ProfileService.GetDisplayNameResponse"); - - this.getDisplayNameResponseMendixObject = getDisplayNameResponseMendixObject; - this.context = context; - } - - /** - * @deprecated Use 'GetDisplayNameResponse.load(IContext, IMendixIdentifier)' instead. - */ - @Deprecated - public static profileservice.proxies.GetDisplayNameResponse initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException - { - return profileservice.proxies.GetDisplayNameResponse.load(context, mendixIdentifier); - } - - /** - * Initialize a proxy using context (recommended). This context will be used for security checking when the get- and set-methods without context parameters are called. - * The get- and set-methods with context parameter should be used when for instance sudo access is necessary (IContext.getSudoContext() can be used to obtain sudo access). - */ - public static profileservice.proxies.GetDisplayNameResponse initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject) - { - return new profileservice.proxies.GetDisplayNameResponse(context, mendixObject); - } - - public static profileservice.proxies.GetDisplayNameResponse load(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException - { - com.mendix.systemwideinterfaces.core.IMendixObject mendixObject = com.mendix.core.Core.retrieveId(context, mendixIdentifier); - return profileservice.proxies.GetDisplayNameResponse.initialize(context, mendixObject); - } - - /** - * Commit the changes made on this proxy object. - */ - public final void commit() throws com.mendix.core.CoreException - { - com.mendix.core.Core.commit(context, getMendixObject()); - } - - /** - * Commit the changes made on this proxy object using the specified context. - */ - public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException - { - com.mendix.core.Core.commit(context, getMendixObject()); - } - - /** - * Delete the object. - */ - public final void delete() - { - com.mendix.core.Core.delete(context, getMendixObject()); - } - - /** - * Delete the object using the specified context. - */ - public final void delete(com.mendix.systemwideinterfaces.core.IContext context) - { - com.mendix.core.Core.delete(context, getMendixObject()); - } - /** - * @return value of Result - */ - public final String getResult() - { - return getResult(getContext()); - } - - /** - * @param context - * @return value of Result - */ - public final String getResult(com.mendix.systemwideinterfaces.core.IContext context) - { - return (String) getMendixObject().getValue(context, MemberNames.Result.toString()); - } - - /** - * Set value of Result - * @param result - */ - public final void setResult(String result) - { - setResult(getContext(), result); - } - - /** - * Set value of Result - * @param context - * @param result - */ - public final void setResult(com.mendix.systemwideinterfaces.core.IContext context, String result) - { - getMendixObject().setValue(context, MemberNames.Result.toString(), result); - } - - /** - * @return the IMendixObject instance of this proxy for use in the Core interface. - */ - public final com.mendix.systemwideinterfaces.core.IMendixObject getMendixObject() - { - return getDisplayNameResponseMendixObject; - } - - /** - * @return the IContext instance of this proxy, or null if no IContext instance was specified at initialization. - */ - public final com.mendix.systemwideinterfaces.core.IContext getContext() - { - return context; - } - - @Override - public boolean equals(Object obj) - { - if (obj == this) - return true; - - if (obj != null && getClass().equals(obj.getClass())) - { - final profileservice.proxies.GetDisplayNameResponse that = (profileservice.proxies.GetDisplayNameResponse) obj; - return getMendixObject().equals(that.getMendixObject()); - } - return false; - } - - @Override - public int hashCode() - { - return getMendixObject().hashCode(); - } - - /** - * @return String name of this class - */ - public static java.lang.String getType() - { - return "ProfileService.GetDisplayNameResponse"; - } - - /** - * @return String GUID from this object, format: ID_0000000000 - * @deprecated Use getMendixObject().getId().toLong() to get a unique identifier for this object. - */ - @Deprecated - public java.lang.String getGUID() - { - return "ID_" + getMendixObject().getId().toLong(); - } -} diff --git a/test/javasource/profileservice/proxies/microflows/Microflows.java b/test/javasource/profileservice/proxies/microflows/Microflows.java deleted file mode 100644 index 0f698ca..0000000 --- a/test/javasource/profileservice/proxies/microflows/Microflows.java +++ /dev/null @@ -1,33 +0,0 @@ -// This file was generated by Mendix Business Modeler 5.0. -// -// WARNING: Code you write here will be lost the next time you deploy the project. - -package profileservice.proxies.microflows; - -import java.util.HashMap; -import java.util.Map; -import com.mendix.core.Core; -import com.mendix.core.CoreException; -import com.mendix.systemwideinterfaces.MendixRuntimeException; -import com.mendix.systemwideinterfaces.core.IContext; - -public class Microflows -{ - // These are the microflows for the ProfileService module - - public static String getDisplayName(IContext context, String _openID, String _environmentPassword, String _environmentUUID) - { - try - { - Map params = new HashMap(); - params.put("OpenID", _openID); - params.put("EnvironmentPassword", _environmentPassword); - params.put("EnvironmentUUID", _environmentUUID); - return (String)Core.execute(context, "ProfileService.GetDisplayName", params); - } - catch (CoreException e) - { - throw new MendixRuntimeException(e); - } - } -} \ No newline at end of file diff --git a/test/javasource/pushnotifications/actions/SendMessageToUser.java b/test/javasource/pushnotifications/actions/SendMessageToUser.java new file mode 100644 index 0000000..73a1626 --- /dev/null +++ b/test/javasource/pushnotifications/actions/SendMessageToUser.java @@ -0,0 +1,71 @@ +// This file was generated by Mendix Modeler. +// +// WARNING: Only the following code will be retained when actions are regenerated: +// - the import list +// - the code between BEGIN USER CODE and END USER CODE +// - the code between BEGIN EXTRA CODE and END EXTRA CODE +// Other code you write will be lost the next time you deploy the project. +// Special characters, e.g., é, ö, à, etc. are supported in comments. + +package pushnotifications.actions; + +import com.mendix.systemwideinterfaces.core.IContext; +import com.mendix.webui.CustomJavaAction; +import com.mendix.systemwideinterfaces.core.IMendixObject; +import static pushnotifications.proxies.microflows.Microflows.createAndSendMessageToUser; + +/** + * Java action to send a message directly to all devices of a user + * Parameters: + * Device: Android or iOS + * MessageText: the contents of the message + * Title: The title of the message + * Badge: a number that appears on the app icon (iOS) + * LaunchImage: file name of the launch image (iOS) + * Sound: name of system sound to play (iOS) + * + */ +public class SendMessageToUser extends CustomJavaAction +{ + private IMendixObject __UserParameter1; + private system.proxies.User UserParameter1; + private String MessageText; + private String Title; + private Long Badge; + private String LaunchImage; + private String Sound; + + public SendMessageToUser(IContext context, IMendixObject UserParameter1, String MessageText, String Title, Long Badge, String LaunchImage, String Sound) + { + super(context); + this.__UserParameter1 = UserParameter1; + this.MessageText = MessageText; + this.Title = Title; + this.Badge = Badge; + this.LaunchImage = LaunchImage; + this.Sound = Sound; + } + + @Override + public Boolean executeAction() throws Exception + { + this.UserParameter1 = __UserParameter1 == null ? null : system.proxies.User.initialize(getContext(), __UserParameter1); + + // BEGIN USER CODE + createAndSendMessageToUser(getContext(), UserParameter1, MessageText, Title, Badge, LaunchImage, Sound); + return true; + // END USER CODE + } + + /** + * Returns a string representation of this action + */ + @Override + public String toString() + { + return "SendMessageToUser"; + } + + // BEGIN EXTRA CODE + // END EXTRA CODE +} diff --git a/test/javasource/system/UserActionsRegistrar.java b/test/javasource/system/UserActionsRegistrar.java index 0f51e23..57df119 100644 --- a/test/javasource/system/UserActionsRegistrar.java +++ b/test/javasource/system/UserActionsRegistrar.java @@ -38,91 +38,9 @@ public void handleEvent(Event event) { component = mxRuntime.getMainComponent(); Core.initialize(component, integration); - component.actionRegistry().registerUserAction(communitycommons.actions.acquireLock.class); - component.actionRegistry().registerUserAction(communitycommons.actions.Base64Decode.class); - component.actionRegistry().registerUserAction(communitycommons.actions.Base64DecodeToFile.class); - component.actionRegistry().registerUserAction(communitycommons.actions.Base64Encode.class); - component.actionRegistry().registerUserAction(communitycommons.actions.Base64EncodeFile.class); - component.actionRegistry().registerUserAction(communitycommons.actions.Clone.class); - component.actionRegistry().registerUserAction(communitycommons.actions.commitInSeparateDatabaseTransaction.class); - component.actionRegistry().registerUserAction(communitycommons.actions.commitWithoutEvents.class); - component.actionRegistry().registerUserAction(communitycommons.actions.copyAttributes.class); - component.actionRegistry().registerUserAction(communitycommons.actions.DateTimeToLong.class); - component.actionRegistry().registerUserAction(communitycommons.actions.DecryptString.class); - component.actionRegistry().registerUserAction(communitycommons.actions.DeepClone.class); - component.actionRegistry().registerUserAction(communitycommons.actions.Delay.class); - component.actionRegistry().registerUserAction(communitycommons.actions.deleteAll.class); - component.actionRegistry().registerUserAction(communitycommons.actions.DuplicateFileDocument.class); - component.actionRegistry().registerUserAction(communitycommons.actions.DuplicateImageDocument.class); - component.actionRegistry().registerUserAction(communitycommons.actions.encryptMemberIfChanged.class); - component.actionRegistry().registerUserAction(communitycommons.actions.EncryptString.class); - component.actionRegistry().registerUserAction(communitycommons.actions.EndTransaction.class); - component.actionRegistry().registerUserAction(communitycommons.actions.EscapeHTML.class); - component.actionRegistry().registerUserAction(communitycommons.actions.executeMicroflowAsUser.class); - component.actionRegistry().registerUserAction(communitycommons.actions.executeMicroflowAsUser_1.class); - component.actionRegistry().registerUserAction(communitycommons.actions.executeMicroflowAsUser_2.class); - component.actionRegistry().registerUserAction(communitycommons.actions.executeMicroflowInBackground.class); - component.actionRegistry().registerUserAction(communitycommons.actions.executeMicroflowInBatches.class); - component.actionRegistry().registerUserAction(communitycommons.actions.FileDocumentFromFile.class); - component.actionRegistry().registerUserAction(communitycommons.actions.FileFromFileDocument.class); - component.actionRegistry().registerUserAction(communitycommons.actions.GenerateHMAC_SHA256_hash.class); - component.actionRegistry().registerUserAction(communitycommons.actions.GetApplicationUrl.class); - component.actionRegistry().registerUserAction(communitycommons.actions.getCreatedByUser.class); - component.actionRegistry().registerUserAction(communitycommons.actions.GetDefaultLanguage.class); - component.actionRegistry().registerUserAction(communitycommons.actions.GetFileContentsFromResource.class); - component.actionRegistry().registerUserAction(communitycommons.actions.getFileSize.class); - component.actionRegistry().registerUserAction(communitycommons.actions.getGUID.class); - component.actionRegistry().registerUserAction(communitycommons.actions.GetIntFromDateTime.class); - component.actionRegistry().registerUserAction(communitycommons.actions.getLastChangedByUser.class); - component.actionRegistry().registerUserAction(communitycommons.actions.getLockOwner.class); - component.actionRegistry().registerUserAction(communitycommons.actions.getOriginalValueAsString.class); - component.actionRegistry().registerUserAction(communitycommons.actions.GetRuntimeVersion.class); - component.actionRegistry().registerUserAction(communitycommons.actions.getTypeAsString.class); - component.actionRegistry().registerUserAction(communitycommons.actions.Hash.class); - component.actionRegistry().registerUserAction(communitycommons.actions.HTMLEncode.class); - component.actionRegistry().registerUserAction(communitycommons.actions.HTMLToPlainText.class); - component.actionRegistry().registerUserAction(communitycommons.actions.IsInDevelopment.class); - component.actionRegistry().registerUserAction(communitycommons.actions.Log.class); - component.actionRegistry().registerUserAction(communitycommons.actions.LongToDateTime.class); - component.actionRegistry().registerUserAction(communitycommons.actions.memberHasChanged.class); - component.actionRegistry().registerUserAction(communitycommons.actions.MergeMultiplePdfs.class); - component.actionRegistry().registerUserAction(communitycommons.actions.objectHasChanged.class); - component.actionRegistry().registerUserAction(communitycommons.actions.objectIsNew.class); - component.actionRegistry().registerUserAction(communitycommons.actions.OverlayPdfDocument.class); - component.actionRegistry().registerUserAction(communitycommons.actions.ParseDateTimeWithTimezone.class); - component.actionRegistry().registerUserAction(communitycommons.actions.RandomHash.class); - component.actionRegistry().registerUserAction(communitycommons.actions.RandomString.class); - component.actionRegistry().registerUserAction(communitycommons.actions.RandomStrongPassword.class); - component.actionRegistry().registerUserAction(communitycommons.actions.recommitInBatches.class); - component.actionRegistry().registerUserAction(communitycommons.actions.refreshClass.class); - component.actionRegistry().registerUserAction(communitycommons.actions.refreshClassByObject.class); - component.actionRegistry().registerUserAction(communitycommons.actions.RegexQuote.class); - component.actionRegistry().registerUserAction(communitycommons.actions.RegexReplaceAll.class); - component.actionRegistry().registerUserAction(communitycommons.actions.RegexTest.class); - component.actionRegistry().registerUserAction(communitycommons.actions.releaseAllInactiveLocks.class); - component.actionRegistry().registerUserAction(communitycommons.actions.releaseLock.class); - component.actionRegistry().registerUserAction(communitycommons.actions.retrieveURL.class); - component.actionRegistry().registerUserAction(communitycommons.actions.RunMicroflowAsyncInQueue.class); - component.actionRegistry().registerUserAction(communitycommons.actions.SimpleLog.class); - component.actionRegistry().registerUserAction(communitycommons.actions.StartTransaction.class); - component.actionRegistry().registerUserAction(communitycommons.actions.storeURLToFileDocument.class); - component.actionRegistry().registerUserAction(communitycommons.actions.StringFromFile.class); - component.actionRegistry().registerUserAction(communitycommons.actions.StringLeftPad.class); - component.actionRegistry().registerUserAction(communitycommons.actions.StringLength.class); - component.actionRegistry().registerUserAction(communitycommons.actions.StringRightPad.class); - component.actionRegistry().registerUserAction(communitycommons.actions.StringToFile.class); - component.actionRegistry().registerUserAction(communitycommons.actions.StringTrim.class); - component.actionRegistry().registerUserAction(communitycommons.actions.SubstituteTemplate.class); - component.actionRegistry().registerUserAction(communitycommons.actions.SubstituteTemplate2.class); - component.actionRegistry().registerUserAction(communitycommons.actions.ThrowException.class); - component.actionRegistry().registerUserAction(communitycommons.actions.ThrowWebserviceException.class); - component.actionRegistry().registerUserAction(communitycommons.actions.TimeMeasureEnd.class); - component.actionRegistry().registerUserAction(communitycommons.actions.TimeMeasureStart.class); - component.actionRegistry().registerUserAction(communitycommons.actions.waitForLock.class); - component.actionRegistry().registerUserAction(communitycommons.actions.XSSSanitize.class); - component.actionRegistry().registerUserAction(communitycommons.actions.YearsBetween.class); component.actionRegistry().registerUserAction(encryption.actions.DecryptString.class); component.actionRegistry().registerUserAction(encryption.actions.EncryptString.class); + component.actionRegistry().registerUserAction(pushnotifications.actions.GetApplicationUrl.class); component.actionRegistry().registerUserAction(pushnotifications.actions.PollFeedbackService.class); component.actionRegistry().registerUserAction(pushnotifications.actions.QueueMessage.class); component.actionRegistry().registerUserAction(pushnotifications.actions.RestartGCM.class); @@ -130,7 +48,6 @@ public void handleEvent(Event event) component.actionRegistry().registerUserAction(pushnotifications.actions.SendGoogleMessages.class); component.actionRegistry().registerUserAction(pushnotifications.actions.SendMessage.class); component.actionRegistry().registerUserAction(pushnotifications.actions.SendMessagesInBackground.class); - component.actionRegistry().registerUserAction(pushnotifications.actions.SendWindowsMessage.class); component.actionRegistry().registerUserAction(pushnotifications.actions.StartAPN.class); component.actionRegistry().registerUserAction(pushnotifications.actions.StartGCM.class); component.actionRegistry().registerUserAction(pushnotifications.actions.StopAPN.class); diff --git a/test/widgets/MxPushNotifications.mpk b/test/widgets/MxPushNotifications.mpk index 6b7e2ca..4ddbfa9 100644 Binary files a/test/widgets/MxPushNotifications.mpk and b/test/widgets/MxPushNotifications.mpk differ