/**
* 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.asset.publisher.web.internal.exportimport.data.handler;
import com.liferay.asset.publisher.web.constants.AssetPublisherPortletKeys;
import com.liferay.exportimport.kernel.lar.DataLevel;
import com.liferay.exportimport.kernel.lar.DefaultConfigurationPortletDataHandler;
import com.liferay.exportimport.kernel.lar.PortletDataHandler;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
/**
* Provides the implementation of <code>PortletDataHandler</code> (in
* <code>com.liferay.portal.kernel</code>) for the Asset Publisher portlet. This
* class defines specific behavior when exporting and importing Liferay data to
* LAR files when layouts with the Asset Publisher are exported or imported.
*
* @author Julio Camarero
*/
@Component(
immediate = true,
property = {
"javax.portlet.name=" + AssetPublisherPortletKeys.ASSET_PUBLISHER
},
service = PortletDataHandler.class
)
public class AssetPublisherPortletDataHandler
extends DefaultConfigurationPortletDataHandler {
public static final String SCHEMA_VERSION = "1.0.0";
@Override
public String getSchemaVersion() {
return SCHEMA_VERSION;
}
@Activate
protected void activate() {
setDataLevel(DataLevel.PORTLET_INSTANCE);
setPublishToLiveByDefault(true);
}
}