The structure editor

The structure editor allows you to define the structure or blueprints of content instances. In essence the structure of a content instance is defined by three main building blocks:

The smallest building block is represented by property, which defines what data may be assigned to a content instance and who has access to that data. In order to make life easier, a specific set of properties can be grouped together into a group. A group can then be assigned to a different type later on, therefore saving you the trouble of manually assigning every single property to the type all over again. A more detailed explanation can be found in the chapter about structures.

Important

Please note that properties and groups on their own do not "belong to" types and also types do not "consist of" properties. Instead properties and groups need to be assigned to types. In fact the same property can be assigned to multiple types using different property assignments. In theory this means that creating a property and assigning it to a type is a two step process. First you create the property (choose the property name, data type, default value etc.) and secondly the property needs to be assigned to the type using a property assignment. In practice this is automatically handled by the structure editor but it is important to understand that a property is not equal to a property assignment. The property assignment acts as a "link" between the type and the actual property and there are various property settings which can be overridden and fine tuned by the property assignment. Similarly, if you remove a property or group from a type, it means that you really only remove the assignment so that this specific property or group is no longer assigned to the type anymore. Properties and groups that are no longer assigned to another type or another group will be automatically removed from the system.

The structure editor GUI is reachable by clicking the Structure tab (1) in the administration GUI. The GUI is separated into two parts: the structure tree (2) on the left half of the screen and the edit view (3) on the right half.

  • Cut & Paste: Assignments can be cut and pasted in order to

    • change the assignment's position within a type or group by cutting the assignment and pasting it at the desired position.

    • remove a property/group from one type by deleting the according property or group assignment while at the same time assigning the property/group to another type or group.

  • Copy & Paste: Assignments can be copied and pasted in order to

    • assign the selected assignment's property/group to another type or group. I.e. a new property/group assignment for the selected property is created and assigned to the specified type or group at the chosen position. By using copy & paste a property can be used within arbitrary types.

  • Pasting: To facilitate positioning various paste operations are provided:

    • Paste into: This is the default pasting operation for copied assignments. A copy of the selected assignment will be created and pasted into the chosen group or into the chosen type at the first position.

    • Paste into as: Works like "Paste into" but additionally prompts you specify a new alias so you can create a new assignment and paste it into an arbitrary type/group with a different alias.

    • Paste above and paste below: pastes an assignment directly above or below another assignment.

    • Paste above and paste below as: Works like "Paste above" and "Paste below" but additionally prompts you specify a new alias so you can create a new assignment and paste it into an arbitrary type/group with a different alias.

Types are protected by their structure ACL and may additionally be assigned multiple instance ACLs. If the type uses instance permissions it is possible to specify a default instance ACL, which will be used by default whenever a new content instance of this type is created.

By editing the type's permissions you may adapt the permission checks to an arbitrary level of security:

  • Use type permissions: If enabled, the mandatory structure ACL assigned to the type is included in permission checks.

  • Use instance permissions: If enabled, the type also includes its assigned instance ACL(s) when performing permission checks, in addition to its (mandatory) structure ACL.

  • Use property permissions: If enabled, the ACL assigned to the type's properties is also taken into account when a content instance is accessed or modified. Using property permissions it is possible to restrict the access to single properties to arbitrary user groups. (For example imagine a type article with the properties text and comment where only the user group "editors" may change the article text but every user may add a comment).

  • Use step permissions: If enabled, the ACL assigned to the current workflow step of the content instance is included in permission checks.

  • Multiple ACLs per instance: if enabled, multiple instance ACLs can be assigned to an instance of this type.

If you want more information on types and their specific settings please refer to the section called “Type parameters”.

Similar to the group editor, the property editor provides four tabs:

System internal property assignments , together with their properties may not be edited (except by users with the role Supervisor). This is why all input elements are deactivated. It is only allowed to edit their options.

Note

When creating a new property, the "Edit Property Assignment" tab will be hidden (as no property assignment may exist without a property), as well as the options of the property assignment in the "Edit Options" tab. Upon pressing the "Create" button, the property is created and the according property assignment is automatically generated.

Note that property assignments may override specific settings of their property. Whether a specific setting may be overwritten is controlled by the "Override property options" section in the "Edit Property Assignment" tab and by the "Property override options" section in the "Edit Property tab respectively.

If you want more information on properties and their specific settings please refer to the section called “Property parameters”.

Generally speaking an option is just a pair of a key and a value. There are special structure options which trigger a special behavior. If you want more information on built-in options please refer to the section called “Property and group options”. The user may access the options by left clicking the "Edit Options" tab.

Generally assignment options may override property/group options if the overridable flag of the property/group option is enabled. In the image above, the property has four options with the keys "SEARCHABLE", "HTML.EDITOR", "MULTILINE" and "SHOW.OVERVIEW". The "Overridable" checkbox indicates that all options may be overriden by the assignment except HTML.EDITOR.

Options can be added by specifying a key, a value and the overridable flag and clicking the "Add" button which is located in the "Actions" column of the table. An option can be deleted again by selecting the according row and pressing the "Delete" button which is also located in the "Actions" column of the table.

In order to facilitate the editing of options, visual helpers are provided:

  • Option is displayed in green: This is a valid option, for example "SEARCHABLE" in the property and assignment options table.

  • Option displayed with grey background: The assignment tries to override an option which is currently not overridable, i.e "HTML.EDITOR" in the assignment options table.

  • Option displayed in red: This is an invalid option. Either the option has no key, or the option has no value, the key already exists or the assignment tries to override an option with the same value. The key "SHOW.OVERVIEW" exists twice in the assignment options table, therefore making it invalid.

In order to update the visual helpers, the "Validate" button on the bottom left may be clicked.

Type definitions (together with their groups and properties) can be exported as groovy script which contains all necessary instructions to rebuild the exported type definition(s) from scratch. This script can later be run import the structures again. An export as XML structure is also supported. The export and import of type definitions between different [fleXive] distributions enables the export and import of content instances based on these type definitions.

The structure export GUI can be invoked via the context menu by right clicking on a type and choosing "Export Type" in the structure tree.

Per default the "Export Results" tab is active, showing the "Summary of exported Structures" and the "Exported structures as a Groovy script" panels.

The summary panel displays useful information about the structures to be exported and also contains the "Groups" panel showing the type's groups, the "Dependencies" panel, showing dependencies caused by derived assignments and the script assignments panel showing assigned scripts.

The "Exported structures as a Groovy script" panel provides various export options that influence the exported Groovy script together with a preview of the exported script.

The export options include:

  • Add script event assignment code: If toggled, assigned scripts (script code and script assignments) are exported as well.

  • Add package import statements: If toggled needed package import statements are added at the beginning of the export script.

  • Overwrite existing scripts: If toggled exported scripts override the scripts of the target [fleXive] distribution if already present.

  • Add code to delete structures/instances: If toggled code is added to the beginning of the script that deletes the exported structures in the target [fleXive] distribution if they are already existing. This is useful to prevent errors that occur if the script contains structures that may already exist in the target [fleXive] distribution.

  • Export structures using only the default GroovyTypeBuilder options: If not toggled structures are exported using all structure information. This includes for example assignment and type options, labels, acl settings etc. If toggled, the exact structure information is discarded and types, properties assignments and groups are rebuilt using only the default options.

  • Add [fleXive] SYSTEM types: If toggled [fleXive] system internal types/system internal properties (for example the ROOT type together with system internal property dependencies) are exported as well.

  • Add Workflow name: If toggled also exports the assigned workflow name. Note that really only the workflow's name is exported, which means that the workflow must exist on the target flexive distribution.

  • Convert international characters to unicode representation: If toggled international characters are converted to their unicode representation. This is handy for systems which don't use UTF-8 per default.

The "Structure Export Tab" provides the possibility to export arbitrary type definitions as a batch in XML format or as Groovy Script.

The export options to choose from are similar to those described in the section called “Export Results Tab”. If the user chooses to export the selected type definitions as Groovy script the "Export Results" tab is opened and initialized with the specified type definitions. If the user chooses the XML export an XML is file provided for download.