Page tree
Skip to end of metadata
Go to start of metadata

Properties Handled By Scripts

Introduction

One of the reasons why openBIS is easily extensible and adjustible is the concept of generic entities like objects, collections, materials and data sets. By adding domain specific properties to the mentioned etnities, instance administrator creates a data model specific to given field of study. Values of configured properties will be defined by the user upon creation or update of the entities (objects etc.).

In most cases values of properties must be provided directly by the user. The default way of handling a property in openBIS can be changed by instance admin defining a property that should be handled by a script written in Jython or predeployed Plugin written in Java. Jython plugins use Jython version configured by the service.properties property jython-version which can be either 2.5 or 2.7.

Types of Plugins

There are two types of plugins that can be used for handling properties, and one plugin type to perform validations on entities:

  1. Dynamic Property Evaluator (for properties referred to as Dynamic Properties)
    • for properties that can't be modified by users,
    • values of such properties will be evaluated automatically using metadata already stored in openBIS (e.g. values of other properties of the same entity or connected entities),
    • the script defines an expression or a function that returns a value for a Dynamic Property specified in the script
  2. Managed Property Handler (for properties referred to as Managed Properties)
    • for properties that will be indirectly modified by users,
    • the script alters default handling of a property by openBIS by defining functions that specify e.g.:
      • how the property should be displayed in entity detail view (e.g. as a table),
      • input fields for modifying the property,
      • translation and/or validation of user input.
  1. Entity Validation
    1. performed after each update or creation of a given entity type.
    2. the user provided script performs a validation, which can cancel the operation if the validation fails

Defining properties

To create a property that should be handled by a plugin, perform the following steps.

  1. Define a script that will handle the property (Administration->Plugins) or deploy a Java plugin. For details and examples of usage go to pages:
  2. When adding a property to an entity: 
    • select "Handled By Plugin" checkbox,
    • select the appropriate Plugin Type
    • choose the Plugin

 

 

 

The validation plugins are assigned to the type in the "Edit Type" section. (e.g Admin->Types->Objects. Select Object and click edit.)

 

 

  • No labels