Properties Handled By Plugins
One of the reasons why openBIS is easily extensible and adjustable is the concept of generic entities like samples, experiments, materials and data sets. By adding domain-specific properties to these objects, the instance administrator creates a data model specific to a given field of study. Values of configured properties will be defined by the user upon creation or update of the entities (samples 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 the instance admin defining a property that should be handled by a script written in Jython or a pre-deployed Plugin written in Java.
Types of Plugins
There are two types of plugins that can be used for handling properties, and one type to perform validations on entities:
- Dynamic Property Evaluator (for properties referred to as Dynamic Properties)
- for properties that can't be modified by users
- the 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
- 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
- Entity Validation
- performed after each update or creation of a given entity type
- the user provided script performs a validation, which can cancel the operation if the validation fails
To create a property that should be handled by a script perform the following steps.
- Define a script that will handle the property (Admin->Plugins) or deploy a Java plugin. For details and examples of usage go to pages:
- Create a property that will be managed by a script (Admin -> Types -> Browse Property Types -> Add Property Type)
- Assign the property to a sample (Admin -> Types -> Sample Types). Select the sample type you want or create a new one and then click Add in the Assigned Property Types section. You can also create new properties from here.
4. The validation scripts are assigned to the type in the "Edit Type" section. (e.g Admin->Types->Samples. Select sample and click edit.)