IProjectInfo Interface

com.bea.ide.workspace.project
IProjectInfo Interface

public interface IProjectInfo

This interface represents a project type within the IDE. It is built primarly from a 'project-type' element in 'urn:com-bea-ide:project' extension xml. It also provides access to project templates defined in template xml.

The extension xml for project types is as follows: <project-type class="{class}"
id="{id}" label="{label}" icon="{image-resource}"
openfoldericon="{image-resource}" closedfoldericon="{image-resource}">
<attribute name="{attr-name}" value="{attr-value}"/>*
<driver type="{driver-type}" class="{driver-class}"/>*
</project-type>

Items in [] are optional.
Items followed by * indicate 0 or more may be present
Items in {} are values as defined below:

  • id - String uniquely identifying the project type, e.g 'urn:com-bea-ide:project.type:WebApp'.
  • label - A string that gives a descriptive name to the project type
  • image-resource - Path to an image resource to be used for the icon
  • attr-name - The name of the project attribute that must be present
  • attr-value - The default value the project attribute
  • driver-type - The fully qualified class name of an interface extending IProjectDriver
  • driver-class - The fully qualified class name of a class implementing the driver type interface

    For more information on project templates see IProjectTemplate

    Field Summary

    public static final String
    SUPPORTS_CONTROL
    Attribute constants
     

    Method Summary

    public Object
    getAttribute(String name)
    Get the project attribute for this project.
    public Icon
    getClosedFolderIcon()
    Closed folder icon to use in the application tree for the project directory.
    public Icon
    getIcon()
    An icon representing this project type.
    public String
    getLabel()
    Display label for this project type.
    public Icon
    getOpenFolderIcon()
    Open folder icon to use in the application tree for the project directory.
    public IProjectTemplate
    getTemplate(String sTemplateId)
    Returns the template corresponding to the given template id.
    public IProjectTemplate[]
    getTemplates()
    The set of all project templates available for this project type.
    public String
    getTypeId()
    String identifying the project type this project info represents.
    public boolean
    hasAttribute(String name)
    Check whether this project type has the given attribute.
    public boolean
    hasAttribute(String name, String value)
    Check whether this project type has the given attribute name value pair.
    public String
    invalidNameCheck(String sName)
    Checks whether the given name is valid for this project type.

    Field Detail

    SUPPORTS_CONTROL

    public static final String SUPPORTS_CONTROL
    
    Attribute constants

     

    Method Detail

    getAttribute(String) Method

    DEPRECATED use hasAttribute

    public Object getAttribute(String name)
    
    Get the project attribute for this project. This is essentially a set of name value pairs that may be used to identify the features this project has. In particular this is used by the document service to determine whether a document type may be used within a specific project.


    getClosedFolderIcon() Method

    public Icon getClosedFolderIcon()
    
    Closed folder icon to use in the application tree for the project directory.

    Returns

    Icon

    getIcon() Method

    public Icon getIcon()
    
    An icon representing this project type.

    Returns

    Icon

    getLabel() Method

    public String getLabel()
    
    Display label for this project type.

    Returns

    String

    getOpenFolderIcon() Method

    public Icon getOpenFolderIcon()
    
    Open folder icon to use in the application tree for the project directory.

    Returns

    Icon

    getTemplate(String) Method

    public IProjectTemplate getTemplate(String sTemplateId)
    
    Returns the template corresponding to the given template id.

    Parameters

    sTemplateId
    id string.

    Returns

    IProjectTemplate object, or null if the id is not recognized.

    Related Topics

    IProjectTemplate


    getTemplates() Method

    public IProjectTemplate[] getTemplates()
    
    The set of all project templates available for this project type. Individual templates may intended for display in the New Project dialog, Import Project dialog, or project Install context menu.

    Returns

    Array of IProjectTemplate objects available for this project type

    Related Topics

    IProjectTemplate


    getTypeId() Method

    public String getTypeId()
    
    String identifying the project type this project info represents. The id uniquely identifies the project info and handler, and can be safely used to determine if two projects are of the same type. Use this id to get this info object or its handler from WorkspaceSvc.

    Returns

    String id of this project type.

    hasAttribute(String) Method

    public boolean hasAttribute(String name)
    
    Check whether this project type has the given attribute.

    Parameters

    name
    String attribute name

    Returns

    true the project type supports this attribute.

    hasAttribute(String, String) Method

    public boolean hasAttribute(String name, 
                                String value)
    
    Check whether this project type has the given attribute name value pair.

    Parameters

    name
    String attribute name
    value
    String attribute value.

    Returns

    true the project type supports this attribute and it is set to the given value.

    invalidNameCheck(String) Method

    public String invalidNameCheck(String sName)
    
    Checks whether the given name is valid for this project type.

    Parameters

    sName
    the project name that should be checked for validity.

    Returns

    String value indicating the error message that should be shown to the user. The return value null means that the name is valid.