EGF Engine
Release 0.1.0

org.eclipse.egf.pde.pattern.reader
Class PlatformPatternExtensionReader

java.lang.Object
  extended by org.eclipse.egf.pde.pattern.reader.PlatformPatternExtensionReader
All Implemented Interfaces:
IPatternExtensionReader

public class PlatformPatternExtensionReader
extends Object
implements IPatternExtensionReader

Read for pattern extensions coming from deployed plug-ins.


Constructor Summary
PlatformPatternExtensionReader()
           
 
Method Summary
protected  List<GenericDescriptor> createDescriptors(IConfigurationElement[] elements_p)
          Create and fill descriptors for given array of configuration elements.
protected  IConfigurationElement extractFactoryComponentConfigurationElement(String pluginId_p)
          Extract factory component configuration element for given plug-in ID.
protected  void fillDescriptor(GenericDescriptor descriptor_p, IConfigurationElement element_p)
          Fill descriptor with given configuration element content.
protected  IDescriptor getDescriptors(IConfigurationElement[] elements_p)
          Get descriptors for given configuration elements.
 IDescriptor getPatternLibraries()
          Get all root library descriptors.
 IDescriptor getPatternLibraries(String fcId_p)
          Get all root library descriptors for given factory component id.
 IDescriptor getPatternLibrary(String libraryFullId_p)
          Get library descriptor from its full id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformPatternExtensionReader

public PlatformPatternExtensionReader()
Method Detail

getPatternLibrary

public IDescriptor getPatternLibrary(String libraryFullId_p)
Description copied from interface: IPatternExtensionReader
Get library descriptor from its full id.
Must be a root library, that is not one contained in another one.
So as to get such libraries, user should be giving the root containing library id and then parse resulting descriptor to reach expected one.
If so, the use of PatternSeeker from pattern plug-in is always recommended.

Specified by:
getPatternLibrary in interface IPatternExtensionReader
Parameters:
libraryFullId_p - Can't be null.
Returns:
Null if no root library with given id could be found.
See Also:
IPatternExtensionReader.getPatternLibrary(java.lang.String)

getDescriptors

protected IDescriptor getDescriptors(IConfigurationElement[] elements_p)
Get descriptors for given configuration elements.

Parameters:
elements_p -
Returns:

getPatternLibraries

public IDescriptor getPatternLibraries()
Description copied from interface: IPatternExtensionReader
Get all root library descriptors.
See IPatternExtensionReader.getPatternLibrary(String) for description of a root library.

Specified by:
getPatternLibraries in interface IPatternExtensionReader
Returns:
A descriptor that contains an arbitrary number of container descriptors before reaching root library descriptors.
So as to use this result properly, users should test the descriptor type by calling IDescriptor.getValue(String) with parameter IPatternConstants.PATTERN_EXTENSION_POINT_CHILD_TYPE.
If returned value is different from IPatternConstants.PATTERN_EXTENSION_POINT_CHILD_LIBRARY then a library descriptor is not reached yet.
The first descriptor that returns a correct type is indeed a root library descriptor.
It does not have any children, if none could be found.
See Also:
IPatternExtensionReader.getPatternLibraries()

getPatternLibraries

public IDescriptor getPatternLibraries(String fcId_p)
Description copied from interface: IPatternExtensionReader
Get all root library descriptors for given factory component id.
See IPatternExtensionReader.getPatternLibrary(String) for description of a root library.

Specified by:
getPatternLibraries in interface IPatternExtensionReader
Parameters:
fcId_p - The factory component id.
Returns:
A descriptor that contains an arbitrary number of container descriptors before reaching root library descriptors.
So as to use this result properly, users should test the descriptor type by calling IDescriptor.getValue(String) with parameter IPatternConstants.PATTERN_EXTENSION_POINT_CHILD_TYPE.
If returned value is different from IPatternConstants.PATTERN_EXTENSION_POINT_CHILD_LIBRARY then a library descriptor is not reached yet.
The first descriptor that returns a correct type is indeed a root library descriptor.
It does not have any children, if none could be found.
See Also:
IPatternExtensionReader.getPatternLibraries(java.lang.String)

createDescriptors

protected List<GenericDescriptor> createDescriptors(IConfigurationElement[] elements_p)
Create and fill descriptors for given array of configuration elements.

Parameters:
elements_p -
Returns:

extractFactoryComponentConfigurationElement

protected IConfigurationElement extractFactoryComponentConfigurationElement(String pluginId_p)
Extract factory component configuration element for given plug-in ID.

Parameters:
pluginId_p -
Returns:
null if it could not be found. Either the plug-in does not exist, or it is not a factory component.

fillDescriptor

protected void fillDescriptor(GenericDescriptor descriptor_p,
                              IConfigurationElement element_p)
Fill descriptor with given configuration element content.

Parameters:
descriptor_p -
element_p -

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.