Overriding plugin behaviour in SonarQube 4.0 - sonarqube

I'm trying to modify the behaviour of the NewIssuesEmailTemplate in SonarQube 4.0. I want to put richer information into the generated emails. It looks as if everything I need is put in the Notification by IssueNotifications.
What I want to know is if it's possible to override the fact that NewIssuesEmailTemplate is the handler for Notifications of type "new-issues".
I'm going to hazard that this can be done by creating a new plugin that overrides the specific behaviour of CorePlugin, and making sure that this gets loaded first, but I don't really know how to go about it.
Has anyone done anything like this before? I don't seem to be able to find any hints to get me started.

You cannot change the fact that NewIssuesEmailTemplate is the handler for notifications of type "new-issues".
All you can do is to add new channels or dispatchers using the extensions available in the notification API. You can check how this is done by the Core Email plugin.

Related

Xamarin Forms - calling a shared code method from the platform project

I have read the two other questions on SO regarding this and I wanted to know if there is a good solution for that now / best practice.
Long story short, we use an SDK which is written natively and we've wrapped it so that it works on Xamarin.Android and Xamarin.iOS. It has asynchronous callback methods. I need to call a method in the shared code when a callback is received in the Android project for instance.
There's a lot of info for doing the opposite - using DependencyService. How about in my scenario? Does anyone have experience with an app like this and what's the best approach to keep code clean and do this using MVVM?
The options I know are:
Using a static App instance - this is what we currently do.
MessagingCenter
Anything else?
Actually I've never seen anyone recommend usage of MessagingCenter for anything else than communication between ViewModels so I am not sure it is recommended here. Also, I need to know the sender object type so I need a reference to the class in the platform specific project.
I would recommend you to use messagingCenter to pass data or call method between shared project and platform project. You can just send a new object instead of the class in the platform specific project.
Also, have a look at using eventhandler as I mentioned in this answer may help someone who want to call from the shared project into the platform specific one.
BTW, I mean you can even pass an object as TSender if it is not necessary to use:
MessagingCenter.Send<Object>(new object(), "Hi");
MessagingCenter.Subscribe<Object>(new object(), "Hi", (sender) =>
{
// Do something whenever the "Hi" message is received
});

Liferay Hook for liferay-multi-vm-clustered.xml

I am trying to override the default liferay-multi-vm-clustered.xml for application level caching using a liferay hook. Any instruction or links? Already spent much time googling but didn't find anything useful.
Thanks in advance.
PS: Already know i can override it via manual deployment and portal.properties.
PPS: Sorry for the format new to stackoverflow.
I'm assuming that you're referring to Liferay 6.x
I'm not aware of any hook that can override this file. Specifically because hooks are only deployed after Liferay has fully been set up and started, it'd be changing the setup after the fact.
You can introduce a new file and reference it in portal-ext.properties. If you want to package this in a plugin, I'm afraid it'll be an ext-plugin. Even though I don't like to suggest using ext, in this case it's a well maintainable ext, so it does not bring the same maintenance-danger as code-containing ext plugins.

Restrict or Obscure data sent to Application Insights

we have just added Application Insights to our WebAPI 2.2 application and it looks like a winner.
However, we have some controllers that receive sensitive information that we cannot store due to compliance regulations, even in Application Insights. We want to capture information level trace events on some of our controllers, but we need to not capture or obscure the information when sent through other controllers. Can anyone suggest a way that we can achieve that?
Since you're using the Microsoft.ApplicationInsights.TraceListener package, I don't think there's any way to directly filter the data. If you can add something special to the Trace.WriteXxx() call, then one option might be to implement a TraceFilter and register it through your configuration for the ApplicationInsights Trace Writer.
Then in your TraceFilter.ShouldTrace(), you could check for that special value (maybe it's the event ID, maybe some prefix in the trace message, or something like that) and simply return false to cause it to be skipped.
I asked the same question on the Azure MS website and got a reply that works well.
Anyone looking here for an answer should look there.
https://azure.microsoft.com/en-us/documentation/articles/app-insights-get-started/#comment-2309233065

Getting parameters from applicationManager

I am basically executing the following luna-send command and trying to get those parameters from applicationManager:
luna-send -n 1 palm://com.palm.power/timeout/set '{"wakeup":true, "key":"myKey",
"uri":"palm://com.palm.applicationManager/launch","params":{"id":"com.my.app",
"params":{"test":true,"test1:true}},"in":"00:00:15"}'
After executing this command, my app gets launched by applicationManager, but I don't know how to get those params in my app. I am using enyo 2.0. I was trying to use onWindowsParamsChange handler, but ApplicationEvents is deprecated for 2.0. Can anyone help me with this?
Thanks
Under Enyo 1.0 it was enyo.windowParams. Under Enyo 2.0 I believe this functionality is gone. These parameters may be available through Cordova, but I'm not positive right now as I don't have the source handy. In any case, this was loaded from PalmSystem.launchParams so you should be able to access that.
If you're handling relaunch then you'll have a little more work to do. I think you'll need to define a Mojo.relaunch on the window object to detect when the launch parameters change.

CRM 2011 Plugin for Create Email not triggering on Pre-validation

I'm relatively new to the CRM SDK, and I'm trying to write a plugin to alter From/CC fields of an email on Create. It seems when this is registered in Pre-operation, the ActivityParty collection cannot be modified(though things like subject and body can be modified), and this post recommended setting the pipeline stage to Pre-validation.
When I do this the plugin no longer gets triggered. I know this because when remote debugging, breakpoints are only hit when pre-operation is selected. Also, when not remote debugging, none of the other changes get implemented in the plugin code.
Does anyone know what might be preventing this plugin from executing?
When you register plugin on Create message fields To, CC, BCC will be empty. Try register on DeliverIncoming / DeliverPromote messages

Resources