Development Component.yml

From Cloudrexx Development Wiki
Jump to: navigation, search
This is a not yet approved proposal!

The component.yml file is part of every component. It contains meta information about and static option values for the component.

Meta section

The meta section contains the following information:

Index Possible values Description
name Component name The component's name. Must be unique within the Contrexx/Cloudrexx universe: Register a component name
type application, system, core, template, library, other The component's type. See Component type descriptions
description Array Array with one entry per language, array index is the language ID
publisher String Name of the publisher
dependencies Array List of dependencies, see dependency format
releases Array List of releses, see releases format
versionsDeprecated Array Alias for releases
rating float Rating for this component, not yet used, value will be autogenerated
downloads int Number of downloads for this component, not yet used, value will be autogenerated
price float Price of this component, not yet used, value will be autogenerated
pricePer int 0 for one time price, higher values for payment over time periods (in hours), not yet used, value will be autogenerated
additionalFiles Array List of files that are part of this component but are located outside the component's directory
renderingDeprecated Object See Webdesign Template Meta-Data

Dependency format

For each dependency, the following information is needed:

Index Possible values Description
name Component name Name of the component it depends on
type application, system, core, template, library, other The component's type. See Component type descriptions
minimumVersionNumber Version number (incl. hotfix) Required minimum version number of the dependency
maximumVersionNumber Version number (incl. hotfix) Required maximum version number of the dependency (todo: define what should be done if this number is unknown)

This information is just written in an associative array (see example).

Releases format

The first listed release is the one this component.yml is for. The rest of the releases can be listed in any order.

For each available release, the following information is needed:

Index Possible values Description
state beta, stable, old beta: not yet supported, stable: supported, old: no longer supported
number Version number (incl. hotfix) Version number of this release
releaseDate Date, as specified by RFC 3339 Date this version was released

This information is just written in an associative array (see example).

Options section

The options section has an entry for each component, that uses the component.yml to store static values. Examples so far are:

The component's name is the index of an associative array, that the particular component has full control of.

Example

Here's a sample how such a component.yml could look like:

ComponentInfo:
  meta:
    name: 'Standard Template 3.2'
    type: template
    description:
      1: 'Deutsche Beschreibung'
      2: 'English description'
    publisher: 'Comvation AG'
    releases: [{ state: stable, number: 1.0.0, releaseDate:  }]
    dependencies: [{ name: jquery, type: lib, minimumVersionNumber: 1.7.3, maximumVersionNumber: 1.7.3 }, { name: twitter-bootstrap, type: lib, minimumVersionNumber: 2.3.2, maximumVersionNumber: 2.3.2 }]
    rating: 0
    downloads: 0
    price: 0
    pricePer: 0
    additionalFiles: {  }
  options:
    Wysiwyg:
      bodyClass: content
      bodyId: main_content
      css: ckeditor.css
    View:
      channels: [app, pdf, print]
      options:
        -
          name: 
          specific:
            textvalue: 
            regex: '/^[a-z]+$/i'
            regexError:
              1: 'Darf nur Buchstaben enthalten.'
              2: 'Only letters are allowed'
            html: true
            color: 
            choice: 
            active: true
            url: 
            urls: {}
          type: Cx\...
          translation:
            1: 
            2: