org.eclipse.tigerstripe.profile
Interface IWorkbenchProfile


public interface IWorkbenchProfile

Top-level interface for a Workbench Profile A Workbench profile defines the configuration of a Workbench runtime. It defines a set of elements that will condition how workbench behaves. For example, - which artifacts are available and usable - Are built-in plugins visible (until they disappear as built-in plugins) - Which stereotypes are defined - which primitive type are defined, etc... Profiles are versioned and can be installed on any Workbench install. They are saved in .wbp files which are in fact XML files that have been encrypted. Profiles can be defined by the Workbench Profile Editor/Wizard provided the license includes the proper role (@see IWorkbenchRole for more details) Upon start, Workbench looks for a default.wbp file in the install directory. If not found, a built-in profile is used instead and a warning message is issued. The default.wbp profile can be replaced by any valid Workbench profile. A re-start of Eclipse is required for it to be taken into account.

Since:
1.2
Author:
Eric Dillon

Field Summary
static java.lang.String DEFAULT_PROFILE_FILE
           
static java.lang.String FACTORY_PROFILE_FILE
           
static java.lang.String FILE_EXTENSION
           
static java.lang.String XML_COMPATIBILITY_LEVEL_ATTR
           
static java.lang.String XML_DESCRIPTION
           
static java.lang.String XML_NAME
           
static java.lang.String XML_ROOT_ELEMENT
           
static java.lang.String XML_VERSION
           
 
Method Summary
 void addPrimitiveTypeDef(IPrimitiveTypeDef stereotype)
           
 void addStereotype(IStereotype stereotype)
           
 java.lang.String asText()
          Returns the XML content corresponding to this IWorkbenchProfile It is ready to be encrypted and saved.
 IStereotype[] getAvailableStereotypeForCapable(IStereotypeCapable component)
          Returns an array of stereotype for a given scope
 IStereotype[] getAvailableStereotypeForComponent(IModelComponent component)
          Returns an array of stereotype for a given scope
 IPrimitiveTypeDef getDefaultPrimitiveType()
           
 java.lang.String getDefaultPrimitiveTypeString()
           
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 IPrimitiveTypeDef[] getPrimitiveTypeDefs(boolean includeReservedTypes)
           
 org.eclipse.tigerstripe.internal.api.profile.IWorkbenchProfileProperty getProperty(java.lang.String propertyName)
          Returns the value of the property identified by its name
 IStereotype getStereotypeByName(java.lang.String name)
          Returns the stereotype for the given name.
 IStereotype[] getStereotypes()
           
 java.lang.String getVersion()
           
 void parse(java.io.Reader reader)
          Parses the content into this IWorkbenchProfile.
 void removePrimitiveTypeDef(IPrimitiveTypeDef stereotype)
           
 void removePrimitiveTypeDefs(IPrimitiveTypeDef[] stereotype)
           
 void removeStereotype(IStereotype stereotype)
           
 void removeStereotypes(IStereotype[] stereotype)
           
 void setDefaultPrimitiveType(IPrimitiveTypeDef stereotype)
           
 void setDescription(java.lang.String description)
           
 void setName(java.lang.String name)
           
 void setPrimitiveTypeDefs(IPrimitiveTypeDef[] primitiveTypeDefs)
           
 void setProperty(java.lang.String propertyName, org.eclipse.tigerstripe.internal.api.profile.IWorkbenchProfileProperty property)
          Sets property propertyName to the given value
 void setStereotypes(IStereotype[] stereotypes)
           
 void setVersion(java.lang.String version)
           
 

Field Detail

FILE_EXTENSION

static final java.lang.String FILE_EXTENSION
See Also:
Constant Field Values

DEFAULT_PROFILE_FILE

static final java.lang.String DEFAULT_PROFILE_FILE
See Also:
Constant Field Values

FACTORY_PROFILE_FILE

static final java.lang.String FACTORY_PROFILE_FILE
See Also:
Constant Field Values

XML_COMPATIBILITY_LEVEL_ATTR

static final java.lang.String XML_COMPATIBILITY_LEVEL_ATTR
See Also:
Constant Field Values

XML_ROOT_ELEMENT

static final java.lang.String XML_ROOT_ELEMENT
See Also:
Constant Field Values

XML_NAME

static final java.lang.String XML_NAME
See Also:
Constant Field Values

XML_VERSION

static final java.lang.String XML_VERSION
See Also:
Constant Field Values

XML_DESCRIPTION

static final java.lang.String XML_DESCRIPTION
See Also:
Constant Field Values
Method Detail

setName

void setName(java.lang.String name)

getName

java.lang.String getName()

setVersion

void setVersion(java.lang.String version)

getVersion

java.lang.String getVersion()

setDescription

void setDescription(java.lang.String description)

getDescription

java.lang.String getDescription()

getStereotypes

IStereotype[] getStereotypes()

setStereotypes

void setStereotypes(IStereotype[] stereotypes)
                    throws TigerstripeException
Throws:
TigerstripeException

addStereotype

void addStereotype(IStereotype stereotype)
                   throws TigerstripeException
Throws:
TigerstripeException

removeStereotype

void removeStereotype(IStereotype stereotype)
                      throws TigerstripeException
Throws:
TigerstripeException

removeStereotypes

void removeStereotypes(IStereotype[] stereotype)
                       throws TigerstripeException
Throws:
TigerstripeException

getPrimitiveTypeDefs

IPrimitiveTypeDef[] getPrimitiveTypeDefs(boolean includeReservedTypes)

setPrimitiveTypeDefs

void setPrimitiveTypeDefs(IPrimitiveTypeDef[] primitiveTypeDefs)
                          throws TigerstripeException
Throws:
TigerstripeException

addPrimitiveTypeDef

void addPrimitiveTypeDef(IPrimitiveTypeDef stereotype)
                         throws TigerstripeException
Throws:
TigerstripeException

removePrimitiveTypeDef

void removePrimitiveTypeDef(IPrimitiveTypeDef stereotype)
                            throws TigerstripeException
Throws:
TigerstripeException

removePrimitiveTypeDefs

void removePrimitiveTypeDefs(IPrimitiveTypeDef[] stereotype)
                             throws TigerstripeException
Throws:
TigerstripeException

setDefaultPrimitiveType

void setDefaultPrimitiveType(IPrimitiveTypeDef stereotype)
                             throws TigerstripeException
Throws:
TigerstripeException

getDefaultPrimitiveType

IPrimitiveTypeDef getDefaultPrimitiveType()

getDefaultPrimitiveTypeString

java.lang.String getDefaultPrimitiveTypeString()

asText

java.lang.String asText()
Returns the XML content corresponding to this IWorkbenchProfile It is ready to be encrypted and saved.

Returns:

parse

void parse(java.io.Reader reader)
           throws TigerstripeException
Parses the content into this IWorkbenchProfile. The content of this is overwritten with the content acquired from the reader.

Parameters:
reader -
Throws:
TigerstripeException

getStereotypeByName

IStereotype getStereotypeByName(java.lang.String name)
Returns the stereotype for the given name. If no stereotype exists in that profile for the given name, null is returned.

Parameters:
-
Returns:

getAvailableStereotypeForComponent

IStereotype[] getAvailableStereotypeForComponent(IModelComponent component)
Returns an array of stereotype for a given scope

Parameters:
scope -
Returns:

getAvailableStereotypeForCapable

IStereotype[] getAvailableStereotypeForCapable(IStereotypeCapable component)
Returns an array of stereotype for a given scope

Parameters:
scope -
Returns:

getProperty

org.eclipse.tigerstripe.internal.api.profile.IWorkbenchProfileProperty getProperty(java.lang.String propertyName)
Returns the value of the property identified by its name

Parameters:
propertyName -
Returns:
the property value or null if the property cannot be found

setProperty

void setProperty(java.lang.String propertyName,
                 org.eclipse.tigerstripe.internal.api.profile.IWorkbenchProfileProperty property)
Sets property propertyName to the given value

Parameters:
propertyName -
property -