src/main/java/org/edgegallery/appstore/infrastructure/util/AppUtil.java
public void updateRelationalFile(String fileParent, String imageName) {
        String target = IMAGE + File.separator + imageName + ZIP_EXTENSION;
        File mfFile = getFile(fileParent, MF_EXTENSION);
        IAppdFile fileHandlerMf = AppdFileHandlerFactory.createFileHandler(AppdFileHandlerFactory.MF_FILE);
        fileHandlerMf.load(mfFile);
        fileHandlerMf.delContentByTypeAndValue(ManifestFiledataContent.SOURCE, target);
        writeFile(mfFile, fileHandlerMf.toString());
        String toscaMeta = fileParent + "/TOSCA-Metadata/TOSCA.meta";
        File metaFile = new File(toscaMeta);
        IAppdFile fileHandlerTosca = AppdFileHandlerFactory.createFileHandler(AppdFileHandlerFactory.TOSCA_META_FILE);
        fileHandlerTosca.load(metaFile);
        fileHandlerTosca.delContentByTypeAndValue(ToscaSourceContent.NAME, target);
        writeFile(metaFile, fileHandlerTosca.toString());

    }
/**
     * update mf and tosca config file.
     *
     * @param fileParent fileParent folder.
     * @param imageName image Name.
     */
update mf and tosca config file.
@param fileParent fileParent folder.
@param imageName image Name.
update mf and tosca config file . @param fileParent fileParent folder . @param imageName image Name .
public void updateRelationalFile(String fileParent, String imageName) {
        String target = IMAGE + File.separator + imageName + ZIP_EXTENSION;
        File mfFile = getFile(fileParent, MF_EXTENSION);
        IAppdFile fileHandlerMf = AppdFileHandlerFactory.createFileHandler(AppdFileHandlerFactory.MF_FILE);
        fileHandlerMf.load(mfFile);
        fileHandlerMf.delContentByTypeAndValue(ManifestFiledataContent.SOURCE, target);
        writeFile(mfFile, fileHandlerMf.toString());
        String toscaMeta = fileParent + "/TOSCA-Metadata/TOSCA.meta";
        File metaFile = new File(toscaMeta);
        IAppdFile fileHandlerTosca = AppdFileHandlerFactory.createFileHandler(AppdFileHandlerFactory.TOSCA_META_FILE);
        fileHandlerTosca.load(metaFile);
        fileHandlerTosca.delContentByTypeAndValue(ToscaSourceContent.NAME, target);
        writeFile(metaFile, fileHandlerTosca.toString());
    }
public void updateRelationalFile ( String fileParent , String imageName ) { String target = IMAGE + File . separator + imageName + ZIP_EXTENSION ; File mfFile = getFile ( fileParent , MF_EXTENSION ) ; IAppdFile fileHandlerMf = AppdFileHandlerFactory . createFileHandler ( AppdFileHandlerFactory . MF_FILE ) ; fileHandlerMf . load ( mfFile ) ; fileHandlerMf . delContentByTypeAndValue ( ManifestFiledataContent . SOURCE , target ) ; writeFile ( mfFile , fileHandlerMf . toString ( ) ) ; String toscaMeta = fileParent + "/TOSCA-Metadata/TOSCA.meta" ; File metaFile = new File ( toscaMeta ) ; IAppdFile fileHandlerTosca = AppdFileHandlerFactory . createFileHandler ( AppdFileHandlerFactory . TOSCA_META_FILE ) ; fileHandlerTosca . load ( metaFile ) ; fileHandlerTosca . delContentByTypeAndValue ( ToscaSourceContent . NAME , target ) ; writeFile ( metaFile , fileHandlerTosca . toString ( ) ) ; }
update mf and tosca config file.
update mf and tosca config file .