/**
* 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.portlet;
import com.liferay.portal.kernel.portlet.InvokerFilterContainer;
import com.liferay.portal.kernel.portlet.InvokerPortlet;
import com.liferay.portal.kernel.portlet.InvokerPortletFactory;
import com.liferay.portal.kernel.spring.osgi.OSGiBeanProperties;
import javax.portlet.Portlet;
import javax.portlet.PortletConfig;
import javax.portlet.PortletContext;
import javax.portlet.PortletException;
/**
* @author Shuyang Zhou
*/
@OSGiBeanProperties(property = "service.ranking=1")
public class InvokerPortletFactoryImpl implements InvokerPortletFactory {
@Override
public InvokerPortlet create(
com.liferay.portal.kernel.model.Portlet portletModel,
Portlet portlet, PortletConfig portletConfig,
PortletContext portletContext,
InvokerFilterContainer invokerFilterContainer,
boolean checkAuthToken, boolean facesPortlet, boolean strutsPortlet,
boolean strutsBridgePortlet)
throws PortletException {
try {
return new InvokerPortletImpl(
portletModel, portlet, portletConfig, portletContext,
invokerFilterContainer, checkAuthToken, facesPortlet,
strutsPortlet, strutsBridgePortlet);
}
catch (Exception e) {
throw new PortletException(e);
}
}
@Override
public InvokerPortlet create(
com.liferay.portal.kernel.model.Portlet portletModel,
Portlet portlet, PortletContext portletContext,
InvokerFilterContainer invokerFilterContainer)
throws PortletException {
try {
return new InvokerPortletImpl(
portletModel, portlet, portletContext, invokerFilterContainer);
}
catch (Exception e) {
throw new PortletException(e);
}
}
}