Merge remote-tracking branch 'origin/master' into feature/TMDM-9792
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
package org.talend.core.runtime.repository.build;
|
||||
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.repository.documentation.ExportFileResource;
|
||||
|
||||
/**
|
||||
@@ -24,6 +25,8 @@ public final class BuildExportManager {
|
||||
|
||||
private static final BuildExportRegistryReader reader = new BuildExportRegistryReader();
|
||||
|
||||
private EXPORT_TYPE exportType = EXPORT_TYPE.STANDARD;
|
||||
|
||||
private BuildExportManager() {
|
||||
super();
|
||||
}
|
||||
@@ -44,4 +47,33 @@ public final class BuildExportManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calling this method will set export type to OSGI. The purpose is that any implementation of "Build Export Provider" schema, will
|
||||
* be able to know when the context is OSGI by calling BuildExportManager.getInstance().getCurrentExportType().
|
||||
* @see #getCurrentExportType()
|
||||
* @param resource
|
||||
* @param item
|
||||
*/
|
||||
public void exportOSGIDependencies(ExportFileResource resource, ProcessItem item) {
|
||||
this.exportType = EXPORT_TYPE.OSGI;
|
||||
try {
|
||||
exportDependencies(resource, item);
|
||||
} finally {
|
||||
this.exportType = EXPORT_TYPE.STANDARD;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide the context of the job export (i.e. OSGI or STANDARD export)
|
||||
* @see #exportOSGIDependencies(ExportFileResource, ProcessItem)
|
||||
* @return context of the job export
|
||||
*/
|
||||
public EXPORT_TYPE getCurrentExportType() {
|
||||
return exportType;
|
||||
}
|
||||
|
||||
public static enum EXPORT_TYPE {
|
||||
OSGI,STANDARD;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user