/**
 * 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 sample.bundle.maven;

import javax.portlet.Portlet;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;

/**
 * @author Raymond Augé
 */
public class Activator implements BundleActivator {

	@Override
	public void start(BundleContext bundleContext) throws Exception {
		_serviceRegistration = bundleContext.registerService(
			Portlet.class, new SamplePortletOne(), null);
	}

	@Override
	public void stop(BundleContext bundleContext) throws Exception {
		_serviceRegistration.unregister();
	}

	private ServiceRegistration<Portlet> _serviceRegistration;

}
@@ -615,16 +615,74 @@
 maven;%0A%0A
+import java.util.Dictionary;%0Aimport java.util.Hashtable;%0A%0A
 import j
@@ -703,16 +703,16 @@
 ortlet;%0A
-
 %0Aimport 
@@ -991,32 +991,422 @@
 ows Exception %7B%0A
+%09%09Dictionary%3CString, Object%3E properties = new Hashtable%3CString, Object%3E();%0A%0A%09%09properties.put(%0A%09%09%09%22com.liferay.portlet.display-category%22, %22category.sample%22);%0A%09%09properties.put(%0A%09%09%09%22com.liferay.portlet.instanceable%22, %22true%22);%0A%09%09properties.put(%22javax.portlet.display-name%22, %22My Bundle Portlet%22);%0A%09%09properties.put(%0A%09%09%09%22javax.portlet.security-role-ref%22,%0A%09%09%09new String%5B%5D %7B%22power-user%22, %22user%22%7D);%0A%0A
 %09%09_serviceRegist
@@ -1491,12 +1491,18 @@
 (), 
-null
+properties
 );%0A%09

add portlet configuration via service properties