package org.ow2.chameleon.fuchsia.core.declaration;

import org.ow2.chameleon.fuchsia.core.component.DiscoveryService;
import org.ow2.chameleon.fuchsia.core.component.ImporterService;

import java.util.Map;

/**
 * {@link ImportDeclaration} is a data transfer object (DTO pattern) that transit between layers
 * in Fuchsia.
 * They are created by the Fuchsia {@link DiscoveryService}
 *
 * @author Morgan Martinet
 */
public interface ImportDeclaration {

    String IMPORTATION_PROTOCOL = "fuchsia.importation.protocol";
    String IMPORTATION_PROTOCOL_NAME = IMPORTATION_PROTOCOL + ".name";
    String IMPORTATION_PROTOCOL_VERSION = IMPORTATION_PROTOCOL + ".version";

    Map<String, Object> getMetadata();

    Map<String, Object> getExtraMetadata();

    Status getStatus();

    void bind(ImporterService importerService);

    void unbind(ImporterService importerService);

}

@@ -348,16 +348,8 @@
 the 
-Fuchsia 
 %7B@li
@@ -664,162 +664,1418 @@
     
-Map%3CString, Object%3E getMetadata();%0A%0A    Map%3CString, Object%3E getExtraMetadata();%0A%0A    Status getStatus();%0A%0A    void bind(ImporterService importerService);%0A
+/**%0A     * @return the metadata of the ImportDeclaration%0A     */%0A    Map%3CString, Object%3E getMetadata();%0A%0A    /**%0A     * @return the extra-metadata of the ImportDeclaration%0A     */%0A    Map%3CString, Object%3E getExtraMetadata();%0A%0A    /**%0A     * Return the Status of the ImportDeclaration at the moment t of the method call.%0A     * The status contains the bindings which exist between the ImportDeclaration and%0A     * the ImporterServices.%0A     *%0A     * @return the actual (at this moment t) ImportDeclaration status.%0A     */%0A    Status getStatus();%0A%0A    /**%0A     * Bind the given ImporterService to the ImportDeclaration.%0A     * This method stock the ImporterService to remember the binding.%0A     * %3Cp/%3E%0A     * This method should only be called by a Linker.%0A     * The linker must call this method when it give the ImportDeclaration to the ImporterService.%0A     *%0A     * @param importerService the ImporterService the ImportDeclaration is bind to.%0A     */%0A    void bind(ImporterService importerService);%0A%0A    /**%0A     * Unbind the given ImporterService of the ImportDeclaration.%0A     * This method remove the ImporterService to forget the binding.%0A     * %3Cp/%3E%0A     * This method should only be called by a Linker.%0A     * The linker must call this method when it remove the ImportDeclaration of the ImporterService.%0A     *%0A     * @param importerService the ImporterService the ImportDeclaration is unbind to.%0A     */
 %0A   
@@ -2122,10 +2122,11 @@
 vice);%0A%0A
+%0A
 %7D%0A

Add comments in ImportDeclaration interface