| org.eclipse.pde.build.IFetchFactory
All known Subclasses: org.eclipse.pde.internal.build.fetch.GETFetchFactory, org.eclipse.pde.internal.build.fetch.CVSFetchTaskFactory, org.eclipse.pde.internal.build.fetch.COPYFetchTasksFactory,
IFetchFactory | public interface IFetchFactory (Code) | | Interface to be implemented by clients of the org.eclipse.pde.build.fetchFactories extension-point.
The factories are being used at various points in the execution of the PDE Buildeclipse.fetch Ant task.
Based on a map file entry, they are responsible for generating segments of an ant script whose execution will fetch
plug-ins, fragments, bundles and features or individual files contained in one of those elements.
The format of a map file entry is:
<elementType>@<elementName> = <repositoryTag>, <repositoryDetails>
The format of elementType and elementName is fixed.
The factories specify the value of repositoryTag and the format of the repositoryDetails .
repositoryTag and repositoryDetails becomes defacto APIs.
repositoryTag should match the factory id used when declaring the factory extension. For example, for the CVS the value is "CVS".
repositoryDetails should contains enough details to allow the factory to generate a fetch script retrieving the element.
The fetch factories are being contributed through the org.eclipse.pde.build.fetchFactories
extension-points.
since: 3.2 |
Method Summary | |
public void | addTargets(IAntScript script) This methods give opportunities to the factory to generate target declaration or other Ant top level constructs in the script. | public void | generateRetrieveElementCall(Map entryInfos, IPath destination, IAntScript script) Generates a segment of ant script whose execution will fetch the element (bundle, plug-in, fragment, feature) indicated in the entryInfos arguments.
Parameters: entryInfos - the map that has been built in the IFetchFactory.parseMapFileEntry(String,Properties,Map) method.This map contains the name and the type of the element (resp. | public void | generateRetrieveFilesCall(Map entryInfos, IPath destination, String[] files, IAntScript script) Generates a segment of ant script whose execution will fetch the specified file from the given element.
Parameters: entryInfos - the map that has been built in the IFetchFactory.parseMapFileEntry(String,Properties,Map) method.This map contains the name and the type of the element (resp. | public void | parseMapFileEntry(String rawEntry, Properties overrideTags, Map entryInfos) This method should parse / validate a mapfile entry and derive a corresponding
key / value pair structure containing the relevant information.
The arguments specified in the map file are provided. |
KEY_ELEMENT_NAME | final public static String KEY_ELEMENT_NAME(Code) | | Key used to store the value of the element name.
|
KEY_ELEMENT_TAG | final public static String KEY_ELEMENT_TAG(Code) | | Key used to store the value of the tag that will be used to fetch the element.
The grammar of the expected value is limited to:
value::= (alpha|digit|'_'|'-')+
digit ::= [0..9]
alpha ::= [a..zA..Z]
|
KEY_ELEMENT_TYPE | final public static String KEY_ELEMENT_TYPE(Code) | | Key used to store the value of the element type
|
generateRetrieveElementCall | public void generateRetrieveElementCall(Map entryInfos, IPath destination, IAntScript script)(Code) | | Generates a segment of ant script whose execution will fetch the element (bundle, plug-in, fragment, feature) indicated in the entryInfos arguments.
Parameters: entryInfos - the map that has been built in the IFetchFactory.parseMapFileEntry(String,Properties,Map) method.This map contains the name and the type of the element (resp. IFetchFactory.KEY_ELEMENT_NAME and IFetchFactory.KEY_ELEMENT_TYPE) to put in the destination. Parameters: destination - the destination where the element should be fetched to. For example, for a plug-in the plugin.xml file is expectedto be in destination/plugin.xml . Parameters: script - the script in which to generate the segments of ant script. It is not authorized to generate target declaration during this call. |
generateRetrieveFilesCall | public void generateRetrieveFilesCall(Map entryInfos, IPath destination, String[] files, IAntScript script)(Code) | | Generates a segment of ant script whose execution will fetch the specified file from the given element.
Parameters: entryInfos - the map that has been built in the IFetchFactory.parseMapFileEntry(String,Properties,Map) method.This map contains the name and the type of the element (resp. IFetchFactory.KEY_ELEMENT_NAME and IFetchFactory.KEY_ELEMENT_TYPE) to put in the destination. Parameters: destination - the destination where the element should be fetched to. For example, for a plug-in the plugin.xml file is expectedto be in destination/plugin.xml . Parameters: files - the files to obtained for the specified element. Parameters: script - the script in which to generate the segments of ant script. It is not authorized to generate target declaration during this call. |
parseMapFileEntry | public void parseMapFileEntry(String rawEntry, Properties overrideTags, Map entryInfos) throws CoreException(Code) | | This method should parse / validate a mapfile entry and derive a corresponding
key / value pair structure containing the relevant information.
The arguments specified in the map file are provided. The map with entry
infos should be filled with provider specific information that is
required in later processing to sucessfully generate the fetch script.
Parameters: rawEntry - the arguments as specified in the map file (may not be null ). Parameters: overrideTags - a key / value containing all the override tags specified for all the repository (maybe null or empty). The values of this map of this are read from the fetchTag property (see file scripts/templates/headless-build/build.properties). Parameters: entryInfos - the map to store repository specific information derived from the rawEntry.This object is being passed as arguments to the other methods of the factory. The factories are also expected to set IFetchFactory.KEY_ELEMENT_TAG to indicate the tag that will be used to fetch the element. This value is for example used to generate the "qualifier" value of a version number. Note that IFetchFactory.KEY_ELEMENT_NAME and IFetchFactory.KEY_ELEMENT_TYPE are reserved entries whose values respectively refer to the name of the element being fetched and its type. throws: CoreException - if the rawEntry is incorrect. |
|
|