Chapter 1. Portal Management
The portal management component is used to manage portal's resources over common interfaces such as REST, CLI, and portlets or gadgets. This chapter discusses these interfaces and makes you familiar with general portal management concepts and terms. The chapter also covers specific management extensions included in the portal.
1.1. Important Terms used in Portal Management
Table 1.1. Important Terms
| Term | Description |
|---|---|
| Management Extension | An extension to the management system which defines a managed component. |
| Managed Component | A managed component, which has been registered via an extension, serves as the root managed resource for a component. |
| Managed Resource | A managed resource is a uniquely identified self-describing 'resource' which can have operations and sub-resources registered to it. |
| Sub-resource | A managed resource whose parent is also a managed resource. |
| Address | A management address is the path of the managed resource with syntax similar to a file on a file system, such as: /foo/bar |
| Operation | An action that can be performed on a managed resource. |
| Attributes | Custom input parameters available to operations. |
1.2. Goals for Portal Management
The goal of management component is to provide a foundation for managing portal side components. The management component allows management extensions to register resources and operations over a set of APIs. These APIs allows developers to expose management extensions over common interfaces such as REST and CLI. This approach makes management extensions independent of their interfaces and allows adding other interfaces without changing the extensions. The usage of APIs to obtain managed resources results in building consistent interfaces. Management of the same component becomes similar irrespective of the interface.
1.3. Operations for Management Extensions
The table lists the commonly used management extensions.
Table 1.2. Operations
| Operation Name | Description |
|---|---|
| read-resource | The read-resource operation is responsible for reading the managed resource. It describes itself and lists any operations or sub-resources it may contain. This is the primary operation to obtain information about a managed component and its managed resources. |
| remove-resource | The remove-resource operation is responsible for removing or deleting an existing managed resource. |
| update-resource | The update-resource operation is responsible for updating an existing managed resource's state. |
| read-config-as-xml | The read-config-as-xml operation is responsible for representing the current managed resource as an XML configuration. |
| export-resource | The export-resource operation is responsible for exporting a managed resource in a format that is acceptable and used in an import. The export-resource has a built-in functionality to recursively traverse managed resources until it finds a resource that supports an export-resource operation. So, you can register an export-resource operation on a sub-resource and it will be executed even by calling export-resource on any of its ancestors. |
| import-resource | The import-resource operation is responsible for importing managed resources that are exported through an export-resource operation. |
Note
The read-resource operation is the only global operation supported in the core framework. All other operations need to be implemented by the extensions, since they are extension-specific.
1.4. Content Type for Portal Management
Content type defines the format of management requests and responses. The supported content types include JSON, XML, and Zip.
Restriction
Since
read-config-as-xml (XML), export-resource (Zip), and import-resource (Zip) are content type specific operations, the response must be in the same format.
Aside from this restriction, it is up to the extension as to which content type is supported for each operation.
1.5. Path Templates used by Management Extensions
Path templates are used by management extensions to define dynamic content while registering resources. These path template variables are used during an export-resource operation to filter these managed resources. By specifying the
filter attribute of an export-resource operation, managed resources can be explicitly included or excluded during export.
Example 1.1. Filter attribute syntax
[path-var]:(!)?[name],...[name];...[path-var]:(!)?[name],...[name]
where,
path-var is the path template variable name is the name of a managed-resource and '!' char, which is optional, is to exclude that resource rather than include it.
Examples that use the path template variable
foo:
Example 1.6. Multiple path template variables (foo and baz) separated by the ';' char
foo:bar,foo-bar;baz:blah
Note
For more information on the usage of path templates specific to a management extension, see chapter Management Extensions.