buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/MetaDataInput.java
changeset 628 7c4a911dc066
parent 587 85df38eb4012
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
     9  * Initial Contributors:
     9  * Initial Contributors:
    10  * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11  *
    11  *
    12  * Contributors:
    12  * Contributors:
    13  *
    13  *
    14  * Description:
    14  * Description:  
    15  *
    15  *
    16  */
    16  */
    17 
       
    18 package com.nokia.helium.metadata;
    17 package com.nokia.helium.metadata;
    19 
    18 
    20 import java.util.Iterator;
    19 import javax.persistence.EntityManagerFactory;
    21 import com.nokia.helium.jpa.entity.metadata.Metadata;
       
    22 
    20 
    23 
    21 import org.apache.tools.ant.Task;
    24 
    22 
    25 /**
    23 /**
    26  * Interface to add any plugins to write the database. Two ways to get
    24  * Interface used by the MetadataRecordTask to extract information and
    27  * the data, either the entire data could written by calling getEntries() method
    25  * get them injected into the databased. 
    28  * or using Iterator for large amount of entries to be written to the database. 
    26  *
    29  */
    27  */
    30 public interface MetaDataInput {
    28 public interface MetaDataInput {
    31     
    29 
    32     /**
    30     /**
    33      * 
    31      * This methods is run for each MetadataInput nested into the MetadataRecordTask
    34      *  @param fileSet fileset to be added
    32      * to extract data from log file for example. The factory is the entry point to
    35      * 
    33      * the database.
       
    34      * @param task an ant task running the plugging, mainly used to implement logging.
       
    35      * @param factory the factory representing the access to the database.
       
    36      * @throws MetadataException
    36      */
    37      */
    37     Iterator<Metadata.LogEntry> iterator();
    38     void extract(Task task, EntityManagerFactory factory) throws MetadataException;
    38     
       
    39 }
    39 }