org.eclipse.xtend.util.stdlib
Class PropertiesReader

java.lang.Object
  extended by org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent
      extended by org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2
          extended by org.eclipse.xtend.util.stdlib.PropertiesReader
All Implemented Interfaces:
org.eclipse.emf.mwe.core.WorkflowComponent, org.eclipse.emf.mwe.core.WorkflowComponentWithID, org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent

public class PropertiesReader
extends org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2

Reads a property file and makes it accessible through the org::openarchitectureware::util::stdlib::properties extensions.

Properties

Property Type Mandatory Description
propertiesFile String yes The properties file to read.

Example

Workflow configuration:
 <component class="org.eclipse.xtend.util.stdlib.PropertiesReader">
        <propertiesFile value="src/config1.properties"/>
        <propertiesFile value="src/config2.properties"/>
 </component>
 
Config file config.properties:
 shapes = box,polygon,ellipse,point
 
Usage in an extension file:
 extension org::openarchitectureware::util::stdlib::properties;
 
 cached List[String] SHAPES () : getProperty("shapes").split(",").trim();
 


Constructor Summary
PropertiesReader()
           
 
Method Summary
 void addPropertiesFile(java.lang.String propFile)
          Adds a properties file.
protected  void checkConfigurationInternal(org.eclipse.emf.mwe.core.issues.Issues issues)
           
 java.lang.String getComponentName()
           
protected  void invokeInternal(org.eclipse.emf.mwe.core.WorkflowContext ctx, org.eclipse.emf.mwe.core.monitor.ProgressMonitor monitor, org.eclipse.emf.mwe.core.issues.Issues issues)
           
 
Methods inherited from class org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2
checkConfiguration
 
Methods inherited from class org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent
checkRequiredConfigProperty, getBridge, getContainer, getId, getLocation, getLogMessage, invoke, invoke, postInvoke, preInvoke, setContainer, setId, setLocation, setSkipOnErrors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesReader

public PropertiesReader()
Method Detail

checkConfigurationInternal

protected void checkConfigurationInternal(org.eclipse.emf.mwe.core.issues.Issues issues)
Overrides:
checkConfigurationInternal in class org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2

invokeInternal

protected void invokeInternal(org.eclipse.emf.mwe.core.WorkflowContext ctx,
                              org.eclipse.emf.mwe.core.monitor.ProgressMonitor monitor,
                              org.eclipse.emf.mwe.core.issues.Issues issues)
Specified by:
invokeInternal in class org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent

addPropertiesFile

public final void addPropertiesFile(java.lang.String propFile)
Adds a properties file.

Parameters:
propertiesFile - A properties file

getComponentName

public java.lang.String getComponentName()
Specified by:
getComponentName in interface org.eclipse.emf.mwe.core.WorkflowComponent
Overrides:
getComponentName in class org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent
See Also:
AbstractWorkflowComponent.getComponentName()