MDWorkbench Service

Identifier:
com.sodius.mdw.platform.services.service

Since:
MDWorkbench 3.0

Description:
This extension is used to add new services. A service provides a piece of functionnality that the user can execute, usually based on model or model element arguments. An example of service is the export of HTML pages based on a model.

Configuration Markup:

<!ELEMENT extension (category* , service* , helpService* , ruleService* , operationService*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT category EMPTY>

<!ATTLIST category

id       CDATA #REQUIRED

name     CDATA #REQUIRED

parentId CDATA #IMPLIED>


<!ELEMENT service (description? , property*)>

<!ATTLIST service

id            CDATA #REQUIRED

name          CDATA #REQUIRED

icon          CDATA #IMPLIED

category      IDREF #IMPLIED

launcher      CDATA #REQUIRED

helpContextId CDATA #IMPLIED>

SODIUS internal usage



<!ELEMENT helpService (description? , property*)>

<!ATTLIST helpService

id            CDATA #REQUIRED

name          CDATA #REQUIRED

icon          CDATA #IMPLIED

category      IDREF #IMPLIED

href          CDATA #REQUIRED

helpContextId CDATA #IMPLIED>

a service aimed to open a specific help page



<!ELEMENT ruleService (description? , property* , editableTemplate* , (rule? | template?))>

<!ATTLIST ruleService

id            CDATA #REQUIRED

name          CDATA #REQUIRED

icon          CDATA #IMPLIED

category      IDREF #IMPLIED

launcher      CDATA #IMPLIED

helpContextId CDATA #IMPLIED>

a service used to launch a generation or a transformation, based on a ruleset execution



<!ELEMENT operationService (description? , property*)>

<!ATTLIST operationService

id            CDATA #REQUIRED

name          CDATA #REQUIRED

icon          CDATA #IMPLIED

category      IDREF #IMPLIED

wizard        CDATA #IMPLIED

factory       CDATA #REQUIRED

helpContextId CDATA #IMPLIED>

a service used to execute a com.sodius.mdw.core.operations.Operation. @since 3.6.0



<!ELEMENT property EMPTY>

<!ATTLIST property

name  CDATA #REQUIRED

value CDATA #REQUIRED>

defines a property to customize the service launcher



<!ELEMENT description (#PCDATA)>

a description of the purpose of this service, presented to the user in the service selection wizard.



<!ELEMENT rule (stringParameter* , metamodelParameter* , instanceParameter* , modelParameter* , fileParameter* , directoryParameter*)>

<!ATTLIST rule

ruleSet          CDATA #REQUIRED

rule             CDATA #REQUIRED

evalDirSelection (none|directory) >

the main rule to launch



<!ELEMENT template (stringParameter* , metamodelParameter* , instanceParameter* , modelParameter* , fileParameter* , directoryParameter*)>

<!ATTLIST template

template         CDATA #REQUIRED

evalDirSelection (none|directory) >

the main template to launch



<!ELEMENT stringParameter EMPTY>

<!ATTLIST stringParameter

value             CDATA #IMPLIED

fixed             (true | false)

wizardTitle       CDATA #IMPLIED

wizardDescription CDATA #IMPLIED

helpContextId     CDATA #IMPLIED>

a parameter for any String value. The String will be converted as required to match a rule parameter of type number or boolean.



<!ELEMENT metamodelParameter EMPTY>

<!ATTLIST metamodelParameter

wizardTitle       CDATA #IMPLIED

wizardDescription CDATA #IMPLIED

helpContextId     CDATA #IMPLIED>

a parameter for a metamodel. If the rule parameter is a String, this parameter will set the unique ID of the selected metamodel.



<!ELEMENT instanceParameter (viewerFilter*)>

<!ATTLIST instanceParameter

modelId             CDATA #REQUIRED

typeName            CDATA #REQUIRED

selection           (single|multiList|multiBag|multiChecked)

allowEmptySelection (true | false)

wizardTitle         CDATA #IMPLIED

wizardDescription   CDATA #IMPLIED

helpContextId       CDATA #IMPLIED>

a parameter for model elements



<!ELEMENT modelParameter EMPTY>

<!ATTLIST modelParameter

direction         (in|out|inout)

modelId           CDATA #IMPLIED

metamodel         CDATA #IMPLIED

wizardTitle       CDATA #IMPLIED

wizardDescription CDATA #IMPLIED

helpContextId     CDATA #IMPLIED

restriction       (none|editedModel) >

a parameter for Models



<!ELEMENT fileParameter (fileExtension*)>

<!ATTLIST fileParameter

mode              (open|save)

value             CDATA #IMPLIED

selectAndReveal   (true | false)

activate          (true | false)

wizardTitle       CDATA #IMPLIED

wizardDescription CDATA #IMPLIED

helpContextId     CDATA #IMPLIED>

a parameter for Files (not directories).



<!ELEMENT directoryParameter EMPTY>

<!ATTLIST directoryParameter

mode              (open|save)

value             CDATA #IMPLIED

selectAndReveal   (true | false)

wizardTitle       CDATA #IMPLIED

wizardDescription CDATA #IMPLIED

helpContextId     CDATA #IMPLIED>

a parameter for directory selection.



<!ELEMENT editableTemplate (description?)>

<!ATTLIST editableTemplate

name CDATA #REQUIRED

path CDATA #REQUIRED

kind (docTemplate|textTemplate) >

defines a template part of the plugin that the user must be able to edit and modify. The user can edit such template starting from the Properties dialog on the service. Note that the plugin must be deployed as a directory, not as a jar.



<!ELEMENT viewerFilter EMPTY>

<!ATTLIST viewerFilter

class CDATA #REQUIRED>

a filter used to restrict instances the user can select



<!ELEMENT fileExtension EMPTY>

<!ATTLIST fileExtension

description CDATA #REQUIRED

extension   CDATA #REQUIRED

default     (true | false) >

a file extension to add filters on file selection dialog



Examples:
Following is an example of a Rule Service extension:


  <extension
        point="com.sodius.mdw.platform.services.service">
      <ruleService
            id="com.sodius.mdw.services.generate.java"
            name="Java Generation">
         <description>
            Generates a Java class for each Class of a UML 2.1 model
         </description>
         <rule
               evalDirSelection="directory"
               rule="main"
               ruleSet="com.sodius.mdw.samples.java.JavaGeneration">
            <modelParameter
                  direction="in"
                  metamodel="uml21"
                  modelId="model"/>
         </rule>
      </ruleService>
  </extension>
</extension>

Following is an example of a Help Service extension:


  <extension
        point="com.sodius.mdw.platform.services.service">
      <helpService
            href="/com.sodius.mdw.platform.rdt.doc/gettingStarted/overview.html"
            id="com.tests.overviewHelp"
            name="MDWorkbench Overview">
         <description>
            Open MDWorkbench Overview help
         </description>
      </helpService>
  </extension>
</extension>


SODIUS