/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.liferay.content.targeting.tracking.action.@tracking.action.java.package.name@; import com.liferay.content.targeting.api.model.BaseTrackingAction; import com.liferay.content.targeting.api.model.TrackingAction; import com.liferay.content.targeting.model.TrackingActionInstance; import com.liferay.portal.kernel.language.LanguageUtil; import com.liferay.portal.kernel.util.ListUtil; import java.util.List; import java.util.Locale; import java.util.Map; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Deactivate; /** * @author Brian Chan */ @Component(immediate = true, service = TrackingAction.class) public class @tracking.action.java.class.name@TrackingAction extends BaseTrackingAction { @Activate @Override public void activate() { super.activate(); } @Deactivate @Override public void deActivate() { super.deActivate(); } @Override public List<String> getEventTypes() { return ListUtil.fromArray(_EVENT_TYPES); } @Override public String getIcon() { return "icon-puzzle"; } @Override public String getSummary( TrackingActionInstance trackingActionInstance, Locale locale) { return LanguageUtil.get( locale, trackingActionInstance.getTypeSettings()); } @Override protected void populateContext( TrackingActionInstance trackingActionInstance, Map<String, Object> context, Map<String, String> values) { } private static final String[] _EVENT_TYPES = {"view"}; }