001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.metadata;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.lar.PortletDataContext;
020    import com.liferay.portal.kernel.repository.model.FileEntry;
021    import com.liferay.portal.kernel.xml.Element;
022    import com.liferay.portlet.dynamicdatamapping.storage.Fields;
023    
024    import java.io.File;
025    import java.io.InputStream;
026    
027    import java.lang.reflect.Field;
028    
029    import java.util.Map;
030    
031    /**
032     * @author Miguel Pastor
033     */
034    public interface RawMetadataProcessor {
035    
036            public void exportGeneratedFiles(
037                            PortletDataContext portletDataContext, FileEntry fileEntry,
038                            Element fileEntryElement)
039                    throws Exception;
040    
041            public Map<String, Field[]> getFields();
042    
043            public Map<String, Fields> getRawMetadataMap(
044                            String extension, String mimeType, File file)
045                    throws PortalException, SystemException;
046    
047            public Map<String, Fields> getRawMetadataMap(
048                            String extension, String mimeType, InputStream inputStream)
049                    throws PortalException, SystemException;
050    
051            public void importGeneratedFiles(
052                            PortletDataContext portletDataContext, FileEntry fileEntry,
053                            FileEntry importedFileEntry, Element fileEntryElement)
054                    throws Exception;
055    
056    }