Skip to main content

Metadata

Description

The Metadata functionality allows expanding the Soffid objects, its attributes and its data types.

By default, there is a list of built-in objects, but it is possible to create new custom objects and add new custom attributes to each of them.

It is usual to add custom attributes in the User built-in object to hold additional information.

Each attribute has a data type, it may be a basic type as a String (simple text), integer value, date, or something more complex as a reference to a custom object, or a popup to select a manager. In this way, one can build relationships between objects.

Screen overview

Related objects

Basically, there are two types of metadata objects. The built-in objects that are part of the Soffid core, and the custom objects as new objects.

built-in objects

The built-in objects are the objects that are part of the Soffid core. It can not be removed, but more custom attributes can be added.

The following objects are Soffid well-known objects that can be customized by means of this screen. All of them are tagged as Built-in objects.

  1. Accounts
  2. Application
  3. Group
  4. Host
  5. Mail List
  6. Role
  7. User

Custom objects

The custom objects are the objects created by the administrator to extend the Soffid underlying data model. All of them are marked as  Built-in type No.

Each custom object type created by the administrator is displayed at the custom objects menu options. Unfortunately, all custom object types share the same icon.

Custom objects have two mandatory attributes: name and description. They are mandatory but can be customized.

Standard attributes

  • Code: short name used by scripts and connectors to access the underlying information. It is suggested to use short names without blanks or special characters to make it easier to use.
  • Label: text displayed just beside the attribute value. It is advised to use short descriptions in order to keep the screen cleaner.
  • Data type: The attributes can have different data types
    • Basics
        • String
        • Numeric
        • Password: a text that will be stored encrypted in the database. This field will never be displayed to the end user.
        • Binary: raw information, probably images or documents.
        • Boolean
        • Photo: an image that is displayed as a small image.
        • Date: a date with a calendar popup.
        • Date and time: a date and time with a calendar popup.
        • E-mail: a text with email format.
        • HTML: rich text.
        • Separator: a separator is a label to group attributes according to some criteria
        • SSO HTML input: used primarily for the web SSO engine includes an input field and a value.
    • Extensible built-in objects
        • User
        • Account
        • Role
        • Group
        • Information System
        • Host
    • Other built-in objects 
        • Group Type
        • User Type
        • Network
        • Mail domain
        • Mail list
        • Operating system
    • Custom objects: any other custom object created by the administrator.
  • Required: enabling this box will enforce the user to enter a value for this attribute at any object. Set no to allow objects without value. 
  • Include in quick search: the system will find any object that contains all the words included in the text search at any of the most relevant attributes. For instance, a quick search of "John Joe" will find users named "Joe Johnson" or "Johnathan Joel" as the first and last marked to be included in the quick search. If you enable the quick search for any new attribute, the same query will find a user named "Joe Williams" whose new attribute value is "John".
  • Prevent duplicated values: mark this field as a unique key for the object type. There is no chance of two objects with the same attribute value. Soffid smart engine will avoid the creation of duplicated objects.
  • Multiple values: some attributes can contain multiple values for the same object. For instance, an attribute containing the languages a user can speak can be multi-valued, as a user can speak multiple languages.
  • Maximum number of rows to display: when an attribute is multivalued, the screen size can grow a lot. To prevent such a big form, the system will only display a maximum number of values, and a scroll bar will appear to browse through the attribute values.
  • Size: primarily for string attributes, specify the maximum length in characters of the attribute value.
  • Values: primarily for string attributes, you can specify the allowed values for the attribute. Then, the text box that the user has to fill in the data will be replaced by a drop-down list.
  • Administrator visibility: sets the maximum visibility level for administrators. If the visibility level is set to read-only, the administrator will not be allowed to modify it. If the visibility is set to hidden, the administrator will not be able to query it. A user is considered as administrator when has the role SOFFID_ADMIN.

    This field is only used in the user object.

  • Operator visibility: sets the maximum visibility level for operators. If the visibility level is set to read-only, the operator will not be allowed to modify it. If the visibility is set to hidden, the operator will not be able to query it. A user is considered as an operator when has permission to open the users management page but lacks the role SOFFID_ADMIN.

    This field is only used in the user object.

  • User visibility: sets the maximum visibility level for end-users. If the visibility level is set to read-only, the user will not be allowed to modify it. If the visibility is set to hidden, the user will not be able to query it. Mind that even an administrator is considered to be a user rather than an administrator or operator when accessing their own identity.

    This field is only used in the user object.

  • Visibility expression: write an optional BeanShell expression to check if the field should be displayed or not. The expression should return true or false. The following variables are exposed to the expression:
    • ownerObject: current object owning the attribute.

    • value: current attribute value.

    • requentContext: tip about the screen using the attribute.

    • inputField: the ZK input object.object (ZK Framework). 

    • inputFields: a map to get access to any other ZK input object.object (ZK Framework).

    • serviceLocator: locator to use any Soffid engine microservice.

// Sample to enable company name attribute only when the user is of type E (external)
return "E".equals(ownerObject.userType);
  • Validation expression: write an optional BeanShell expression to check if the field value is acceptable or not. The expression should return true if the value is acceptable. If the expression returns false or any other object, a warning message will be displayed. When the expression returns a string value, the return value will be considered the warning message to present to the end-user.  

    The following variables are exposed to the expression:

    • ownerObject: current object owning the attribute
    • value: current value to evaluate.
    • requentContext: tip about the screen using the attribute
    • inputField: the ZK input object.object (ZK Framework).
    • inputFields: a map to get access to any other ZK input object.object (ZK Framework).
    • serviceLocator: locator to use any Soffid engine microservice.

     

// Sample for checking birthDate is greater than 18 years old
c = java.util.Calendar.getInstance();
c.add(-18, c.YEAR);
if (birthDate == null || birthDate.before(c.getTime()) return true;
else return "Birth date should be before "+ new java.text.SimpleDateFormat().format(c.getTime());
  • onLoad trigger:  write an optional BeanShell expression that will be executed just after preparing the user interface. The script can modify in any way the inputField object before it is displayed, but cannot modify other input fields.

    The following variables are exposed to the expression:

    • ownerObject: current object owning the attribute
    • value: current value to evaluate.
    • requentContext: tip about the screen using the attribute
    • inputField: the ZK input object.object (ZK Framework).
    • inputFields: a map to get access to any other ZK input object.object (ZK Framework).
    • serviceLocator: locator to use any Soffid engine microservice.
// Sample to set contract number attribute to read only if the attribute company is empty
// Place as an on-load trigger in the contract number field
if (ownerObject.attributes.get("company") == null || ownerObject.attributes.get("company").trim().isEmpty())
  inputField.setReadonly(true);
else
  inputField.setReadonly(false);
  • onChange trigger: write an optional BeanShell expression that will be executed just after the user has changed the object value. The script can modify in any way the inputField object or any other input fields.

    The following variables are exposed to the expression:

    • ownerObject: current object owning the attribute.
    • value: current value to evaluate.
    • requentContext: tip about the screen using the attribute.
    • inputField: the ZK input object.object (ZK Framework).
    • inputFields: a map to get access to any other ZK input object.object (ZK Framework).
    • serviceLocator: locator to use any Soffid engine microservice.
// Sample trigger to set contract number attribute to read only when the company attribute gets empty
// Place as an on-change trigger in the contract field
contractField = inputFields.get("contractNumber");
if (value == null || value.trim().isEmpty())
  contractField.setReadonly(true);
else
  contractField.setReadonly(false);
contractField.invalidate(); // Redraw contract number field
  • You can add a SCIM expression: exclusive for Soffid objects (users, groups, roles...). Write an optional SCIM query using the SCIM standard to filter valid results for a specific field.

You can access to SCIM Chapter for more information

Actions

Metadata query

Add new

Allows you to add a new metadata object in the system. To add a new it is necessary to fill in the required fields. By default, it will has have two mandatory attributes, name and description.

Delete

Allows you to remove one or more records.

Download CSV file

Allows you to download a csv file with the basic information of all metadata. 

Metadata object detail

Delete

Allows you to remove a metadata object.

Set to default

Allows you to set the factory setting. Sometimes, usually after an upgrade, it is advisable to reset the built-in attributes of a built-in object. In that case, the properties of the attribute will be changed to the factory setting ones.

Import

Allows you to upload a csv file with the object metadata list to add, update or delete 

Download CSV file

Allows you to download a csv file with the basic information of the metadata object.