FirstSpirit Object Service - Administration and Configuration
e-Spirit AG
FirstSpirit Version 5.x
2017-10-06
FirstSpirit enables customer-specific projects, which are subject to a huge variety of different requirements, to be realized. One of these requirements is often to transfer the content maintained in the content management system (CMS) to a portal server and then use it there.
With its open and expandable system architecture, FirstSpirit provides the optimum conditions for integrating editorial content into various portal servers.
Particular benefits can be achieved by combining a portal server with the FirstSpirit CMS, as this sees the individual technical characteristics of a pure portal-server solution, such as sophisticated navigation adaptations, complemented by the functional strengths of the FirstSpirit system and transferred into a successful complete system.
Portal integration with FirstSpirit always consists of two parts:
-
Components on the FirstSpirit side
These components are used to determine and prepare the necessary editorial data, and to transfer it to the portal server. They are usually generic, i.e., independent of the specific portal server to which the data is being transferred.
-
Components on the portal side
These components are used to process the editorial content and transfer it from the CMS into a specific portal server; therefore, they are always particular to a certain portal server.
The portal interface presented in this document relates exclusively to the components on the FirstSpirit side, which are identical for all portal integrations and, as such, independent of the specific portal server. The components on the portal side are described in separate documentation.
|
In the context of portals, a project's configuration is portal-specific.
For this reason, the portal manufacturer's configuration instructions may differ from the description contained in this document.
Therefore, an alignment must be performed in each case in order to prevent work steps being duplicated and avoid irritation.
|
|
This document is aimed at technical project managers and FirstSpirit developers. It is not a handbook for editors.
As a prerequisite, the reader must be confident in using FirstSpirit 5.x and already be familiar with UX-Bridge.
|
1.1. Functional comparison
The redeveloped portal interface offers significant advantages compared to the old version. The comparison below shows this too:
Table 1. Feature comparison matrix
Feature | Old portal interface | New portal interface (FOS) |
---|
Update complete sub(trees) |
|
|
Increment update for navigation and content |
|
|
Support for all FirstSpirit elements |
|
|
Expandability of the interface in the project |
|
|
Inheritance of metadata and permissions |
|
|
Editor permissions are available |
|
|
1.2. Topics covered in this documentation
This document describes the interface for connecting portals to FirstSpirit and covers the components required to do this, as well as how to install and configure them.
Chapter 2: The components required for connecting a portal are summarized and described in this chapter.
Chapter 3: This chapter explains how the components used are installed and configured.
Chapter 4: An SSL configuration which may be required is described in this chapter.
Chapter 5: All the adaptations which are necessary in the FirstSpirit project are described in this chapter.
Chapter 6: This chapter presents the FirstSpirit Object Service Admin Interface
.
Chapter 7: A comparison of the previous and new interface for integrating a portal can be found in this chapter.
Chapter 8: Certain specific terms used in this document are listed and explained in this chapter.
Chapter 9: This chapter contains e-Spirit AG's legal notices relating to the module described in this documentation.
Various components are needed for the portal connection:
The individual components are presented in detail in the following sections.
The portal-specific Portal Plugin, which deals with importing the content into the portal, is also found within the portal server. This component is described in separate documentation made available by the respective portal provider.
The individual components always interact in accordance with the following schema:
-
Editorial changes made in FirstSpirit are transferred to the FirstSpirit Object Service (FOS) via the UX-Bus during a generation operation. The FOS then refreshes its internal data model (see step 1 & 2 in figure Architecture).
-
The FOS determines the changes made and informs the Portal Plugin by means of an event message (see step 3 & 4 in figure Architecture).
-
If the information contained in the event message is not sufficient to refresh the data in the portal, the Portal Plugin requests all the data necessary for a refresh operation via the REST interface of the FOS.
The UX-Bridge, together with its associated UX-Bus, forms the central element for transferring FirstSpirit content into a portal (see figure Architecture).
The communication required to exchange data between the components which are only coupled to one another loosely is realized via the UX-Bus, which collects all messages into a "central" location and makes them available to the components. The components then retrieve the information which is relevant to them from the UX-Bus and process them further accordingly.
The fundamental advantage of the UX-Bus is the ability to decouple the FirstSpirit Server from the portal server from a technical point of view. This creates a robust and stable infrastructure. A temporary non-availability, caused by maintenance work, for example, is reliably smoothed out by this structure.
Furthermore, decoupling allows more than just one FOS or portal server to be connected. The data managed in FirstSpirit can therefore be distributed across multiple live or test systems, whereby the respective data inventories of the various systems can be distinguished from one another, since every component only ever responds to and processes the messages intended for it.
More information is contained in the UX-Bridge documentation.
2.2. FirstSpirit Object Service module
The FOS module is the component that needs to be installed on the FirstSpirit Server (see figure Architecture).
The functions made available via the module on the FirstSpirit Server can be used to create messages and forward them to the UX-Bridge. These messages are produced by means of a generation operation performed on the FirstSpirit Server and are made available to the FOS on the UX-Bus. They contain all relevant information on the modified data of the FirstSpirit project being used and, as such, inform the FOS of the changes which have been made.
The FOS module represents the starting point of the communication chain between the individual components, in that it collects the relevant information, compiles it, and forwards it to the next component by using the UX-Bus.
2.3. FirstSpirit Object Service (FOS)
The FOS is the link between FirstSpirit and the portal server (see figure Architecture).
It accepts the messages made available via the UX-Bridge on the UX-Bus and refreshes the data inventory stored in its internal persistence layer. In so doing, it uses data matching on the messages received in order to determine which data has been changed exactly. The FOS passes this information on to the Portal Plugin of the connected portal via the UX-Bus in the form of an event message (see chapter UX-Bridge/UX-Bus).
The Portal Plugin of a portal server receives this event message and triggers a refresh operation of the data's live state within the portal. Depending on the portal, the information contained within the event message may not be sufficient for the refresh operation. In this case, the Portal Plugin requests the required data from the FOS in advance, via its REST interface. This may only be a modified element or a subtree, depending on the implementation of the Portal Plugin.
|
The Portal Plugin is made available by the respective portal provider.
|
3. Installing and configuring components
Various steps need to be taken before using the new interface:
|
The FOS can only be used in conjunction with release projects. Therefore, use of the release function must have been activated in the project properties.
|
Installation of the components required to use the UX-Bridge is divided into two steps: installation of the UX-Bridge module on the FirstSpirit Server and installation of the UX-Bus.
|
It is absolutely essential that the UX-Bridge module version 1.4 or higher is used. Otherwise, the functionality of the FirstSpirit Object Service is not guaranteed.
The UX-Bus requires at least Java 6 to be installed; respectively Java 7 since version 1.6.6.. Furthermore, the JAVA_HOME environment variable must be set and JAVA_HOME/bin added to the path variable.
|
Since the UX-Bridge module is installed in the same way as the FOS module, this chapter only deals with the installation of the UX-Bus. The configuration of the UX-Bridge module is described in the next section.
The UX-Bus can be installed as a module on the FirstSpirit Server or used in standalone operation; we recommend the latter.
To install the UX-Bus in standalone operation, simply unzip the distribution (UX-Bus_<version number>.zip
) delivered with the UX-Bridge module into any appropriate folder. This distribution makes an initial configuration found in the conf
folder available, where the required routes have already been defined. This configuration should be adapted to the project-specific requirements.
More information on configuring the UX-Bus is available in the UX-Bridge Installation Manual.
The installation is completed by starting the UX-Bus. To do this, the activemq
start script found in the bin
folder must be started using the command below.
./bin/activemq console
bin/activemq
The UX-Bus start is logged in the console accordingly:
INFO ActiveMQ JMS Message Broker (ID:apple-s-Computer.local-51222-1140729837569-0:0) has started
The bus configuration and its accessibility can be tested by means of the netstat
tool via port 61616
specified in the initial configuration using the command below:
netstat -an|grep 61616
netstat -an|find 61616
More information on installing the UX-Bridge and UX-Bus can be found in the UX-Bridge documentation.
3.1.1. Configuring the UX-Bridge module
Once the module has been successfully installed, the folder UX-Bridge
is added to the list of modules installed on the FirstSpirit Server in the server properties. After selecting this folder, click Configure and check the All permissions
box in the dialog which appears. After confirming with OK, the UX-Bridge folder is identified by a padlock icon.
Then expand the folder and select the UXBService
service before clicking Configure once more. Go to the Options
tab in the dialog which appears and enable the sending of status and project information messages
there (see figure Configuring the UXBService).
Information on these messages is available in the Documentation for Developers.
|
A service has to be stopped and restarted after making a change to it.
|
3.2. FirstSpirit Object Service module
The module needs to be added to the FirstSpirit Server using the fos-fsm-<version number>.fsm
file that was supplied. To install the module, open the Server and Project Configuration
and select →
.
The main panel contains a list of modules installed on the server. After clicking Install, select the supplied fos-fsm-<version number>.fsm
file and click Open to confirm your selection. After successful installation, a FirstSpirit Object Service
folder is added to the list (see figure List of the modules installed on the FirstSpirit Server). Close the server properties by clicking OK.
More information about installing modules is available in the FirstSpirit Documentation for Administrators.
|
After any module installation or update, the FirstSpirit Server needs to be restarted.
|
3.3. FirstSpirit Object Service (FOS)
Technically speaking, the FOS is a web application (web app), which needs to be installed on a Java web application server (such as Tomcat).
|
A servlet engine is required, which implements the version 2.5 (or higher) servlet API.
|
Any web application server which meets the stated prerequisite may be used, but the description here is of how to integrate the web application on a Tomcat server, by way of example:
Open the webapps
subfolder within your Tomcat directory and save the fos-service-<version number>.war
file there.
Alternatively, you could upload the fos-service-<version number>.war
file via the Tomcat Web Application Manager, which can be accessed via address localhost:8080/manager/html
as standard once Tomcat has been started.
The added application is usually recognized by the web server automatically, integrated on it, and started directly. In the Tomcat Web Application Manager this is indicated by the new entry in the list of applications available on the server (see figure Integrated web application).
Figure 5. Integrated web application
|
The FOS actively supports only Tomcat 7 and 8 as the runtime environment at this time. The tests are performed with Tomcat 8. Use of other web servers has not been tested and is therefore not guaranteed to work.
|
For more information on integrating a web application on a different web application server, please refer to the documentation from the relevant provider.
|
The FOS contains an integrated persistence layer (see figure Architecture). It is included in the web application supplied and is made available by this same application. Thus there is no need to provide a separate persistence layer.
|
|
After integrating the web application, it may be necessary to restart the web application server.
|
|
The FirstSpirit Object Service Admin Interface does not require authentication as standard and is therefore not protected against unauthorized access. For this reason, we recommend protecting the web application using standard servlet container mechanisms such as HTTP Basic Authentication.
|
3.3.1. Changing the end point
Messages for the Portal Plugin are sent as standard to:
activemq:topic:PORTAL-EVENTS
This end point is defined in the applicationContext.xml
of the FOS:
<endpoint id="PORTAL-EVENTS" uri="acticemq:topic:PORTAL-EVENTS"> </endpoint>
A new end point can be configured by changing this entry.
|
Only the URI may be changed. It is essential that the ID remains in its given form.
|
The applicationContext.xml
is found within the WEB-INF
folder in the fos-service-<version number>.war
file.
The FOS requires the following settings:
-
Path of the settings file
-
Path for saving the project data
-
Path of the API Keys file
-
Host & port of the UX bus
If the settings have not yet been defined or are incomplete, they are queried when the FirstSpirit Object Service Admin Interface is called.
The settings are stored in a Java properties file. They must be specified the first time the FOS is used because they depend on the local incidents of the user system. An absolute path ending in <file name>.properties
is expected to generate the file.
The FOS is the link between FirstSpirit and the portal server. It determines all changes to the data inventory based on the messages transferred to it and forwards this information to the Portal Plugin. The FOS stores this data inventory in a folder which must be shared with it via an absolute path. The messages are called via a connection which the FOS establishes to the UX-Bus. To do this, it requires the host and port of the UX-Bus.
The REST interface of the FOS expects an http header named apikey
each time it is called. Its value must be a UUID
, which is known to the FOS as an API Key. Otherwise a request will end with the state 401 Unauthorized. The various keys are used to define access permissions for projects via the REST interface. To store the API Keys, the FOS uses a bin file, which it creates when the first API Key is generated and which must be shared with it via an absolute path.
|
When the FOS is installed, a master key is generated, which has all permissions for all projects. One of the things it is used for is generating new API Keys. It also ensures that there is always at least one API Key with project access rights.
|
|
The paths to the settings file and the API Keys file must already exist. Otherwise an exception occurs.
|
Once the settings file has been generated, the web application must be introduced to it. There are three methods of achieving this:
-
Creating an environment variable
FOS_SETTINGS_FILE
-
Expanding the
web.xml
-
Expanding the
context.xml
The web.xml
can be expanded by adding a context parameter or an environment entry:
<context-param>
<param-name>FOS_SETTINGS_FILE</param-name>
<param-value>PATH OF THE SETTINGS FILE</param-value>
</context-param>
or:
<env-entry>
<env-entry-name>FOS_SETTINGS_FILE</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>PATH OF THE SETTINGS FILE</env-entry-value>
</env-entry>
These can also be added to the context.xml
. The steps required are explained in the following link:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Context_Parameters
|
The application server must then be restarted.
|
3.3.3. Adjusting the logging feature
When delivered, the logging feature of the web application is set to INFO
. If further details are required, in file log4j.properties
(found in the web application folder under →
), the line log4j.rootLogger=INFO, file
must be changed to the expression log4j.rootLogger=DEBUG, file
.
Information on runtimes is backed up alongside general logging data. This information is stored as standard in a separate file named metrics.log
in the logging directory of the web application server. Furthermore, the information is also made available via jmx
.
Changes to the runtime measurement can be made in file applicationContext.xml
(found in the web application folder under WEB-INF). To modify the frequency of the measurements, for example, the value period
must be altered in the following section.
<metrics:reporter type="slf4j" metric-registry="metrics" period="1m" logger="com.espirit.moddev.fos.logger.metrics/>
1m,
, indicating one measurement per minute, is the default setting here.
If more information is required on runtime measurements, you can find it at the following links:
https://github.com/ryantenney/metrics-spring
https://dropwizard.github.io/metrics/3.1.0/manual/core/
3.3.4. Operating multiple instances of FOS
Multiple instances of FOS can be operated in parallel on a web application server without problems. To do this, simply copy the application initially integrated onto the server (see chapter FirstSpirit Object Service (FOS)) as many times as the number of instances you wish to run.
|
Please note that each instance of the web application is given a unique name (e.g., fos1 , fos2 , fos3 , etc.).
|
Each of the instances which then exist requires its own context.xml
, which should be stored at a global location on the web application server and have the same name as the associated FOS instance. For a Tomcat server, the storage location of the context.xml
files would correspond to a path like the following one, for example:
<Tomcat-directory>/conf/Catalina/<HOST>/<FOS-INSTANCE>.xml
The files are used to specify the path of the settings file for the FirstSpirit Object Service Admin Interface
and therefore require the following content:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Parameter name="FOS_SETTINGS_FILE"
value="PFAD ZUR EINSTELLUNGSDATEI" override="true" />
</Context>
|
If the FOS instances access the same UX-Bus, it is important to adapt the consumer in the applicationContext.xml so that it is not identical.
(<from uri="activemq:Consumer.INDIVIDUELLER NAME.VirtualTopic.BUS_OUT" /> ).
|
Should it be necessary to update the FOS to a new version due to new features or bug fixes, certain steps must be taken, as described below.
First check whether the FOS update is dependent on other updates already having been performed. For example, a new version of the UX-Bus or UX-Bridge may be required. However, this is not usually the case and will be announced in the Release Notes.
To update the UX-Bus, first save the configuration of the routes ( →
) and delete the existing UX-Bus files, before installing the new files as described in chapter UX-Bridge/UX-Bus. The route configuration needs to be restored once the installation is complete.
The UX-Bridge can be updated in the same way as it is installed. If the UX-Service settings have been adapted, they also need to be saved prior to the update, then imported again following successful installation.
The procedure for updating the FOS Service module
is the same as that for installing it. It is only necessary to uninstall the module prior to the update if this has been specified in the Release Notes.
We recommend that you save certain settings before updating the FOS web application. The precise settings which this applies to will depend on the type of configuration in question. Therefore, check where the path to the required properties file
has been configured. Also check whether the routes correspond to the standard configuration or whether adaptations have been made. Once all changes have been saved, the war file
can be installed as described in chapter FirstSpirit Object Service (FOS).
Technically speaking, the FOS is a web application (web app), which can generally be installed on any web application server. The FOS is made available here without encryption as standard. If encryption is desired, the server being used must be configured accordingly.
This chapter outlines such a configuration, using a Tomcat server as an example.
Since only certificates which have been signed by an official certificate authority (CA) are viewed as trustworthy, a certificate signing request (CSR) must be created.
To do this, first the keytool
program contained in every JDK is used to generate a local keystore
by executing the following call in the console:
keytool -genkey -alias tomcat -keyalg RSA -keystore <KS_FILENAME>
This can then be used as a basis to create the required CSR:
keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr -keystore <KS_FILENAME>
This call creates the certreq.csr
file, which must be transferred to any CA that can be selected as desired (e.g., http://thawte.com
). In return, you will receive a signed certificate, which must be imported into the keystore
.
However, a chain
or root certificate
for the selected CA page (e.g., http://www.thawte.com/certs/trustmap.html
) has to be downloaded and added to the keystore
before the returned certificate. Otherwise the keytool
program will generate the error message Failed to establish chain from reply
.
The chain certificate
is imported into the keystore via the following call:
keytool -import -alias root -keystore <KS_FILENAME> -trustcacerts -file <CHAIN_CERTIFICATE_FILENAME>
The signed certificate can then be added too:
keytool -import -alias tomcat -keystore <KS_FILENAME> -file <SIGNED_CERTIFICATE_FILENAME>
Finally, the Tomcat server must receive a connector
for future https connections. The server.xml
of the server already has such a connector, but it is commented out as standard:
<Connector
protocol="HTTP/1.1"
port="8443" maxThreads="150"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="/opt/bamboo/.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS"
/>
|
We strongly recommend adapting this standard connector to the specific requirements in question.
|
|
If changes are made to the server.xml , the server must be restarted.
|
If the configuration has been performed without errors, the familiar Tomcat start page should be accessed via the following URL once the server has been restarted (see figure Encrypted Tomcat start page):
https://<server name>:8443
Detailed information on configuring a Tomcat server is available in the Tomcat documentation:
http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Configuration
For information on configuring a different web application server, please refer to the documentation from the relevant provider.
5. Adaptations in the FirstSpirit project
In order to summarize the data of a FirstSpirit project in such a way that it can be converted into messages which can be used by the UX-Bus, certain adaptations need to be made within the FirstSpirit project:
|
This chapter describes the general basic prerequisites, which absolutely must be met if a portal integration is to take place. They can, therefore, differ from the portal-specific information provided by the portal manufacturer.
|
5.1. Presentation channel
An additional XML channel, which must be created manually, is required as well as the presentation channels that already exist for a project.
Open the Server and Project Configuration
and select →
. Clicking Add opens a dialog which must be completed as follows:
Then confirm the dialog with OK to finish adding the presentation channel.
The new presentation channel is now added to the list of available template sets. It has been activated automatically and is thus available in the project immediately.
The newly created XML presentation channel can be used within the project to add more attributes and media to the nodes created during the generation.
|
The presentation channel is edited within the project being used by a FirstSpirit developer; the relevant process is therefore described in the Documentation for Developers.
|
|
Only the presentation channel described has to be added to the project, irrespective of the number of connected portals. It is not necessary to add a separate presentation channel for each portal!
|
5.2. Generation schedule (full generation)
The process of creating messages which are forwarded to the FOS via the UX-Bus, fill in the FOS with initial values, and inform it of subsequent changes made in the FirstSpirit project requires a schedule, which contains at least the actions described in the sections below (see also figure Actions for the full-deployment schedule).
Open the Server and Project Configuration
for the required schedule and go to →
.
Add a new standard schedule here or edit one which already exists.
For more information on creating the schedule, refer also to the UX-Bridge Developer Documentation.
5.2.1. Initialize FosGeneration
An initialization first has to be performed within the schedule. This requires a MessageGenerator
, which generates the messages transferred from the FirstSpirit Server to the UX-Bus.
The script call below is used to add the standard MessageGenerator
made available by the FOS module in the schedule's first action:
Initialize FOSGeneration.
#! executable-class
com.espirit.moddev.fos.util.FosScheduleInitializer
If a user-defined MessageGenerator
is to be used, it can be added as the MessageGenerator
parameter in the script properties.
For more information on the MessageGenerator
, refer to the UX-Bridge Developer Documentation.
5.2.2. Activate Generation
As the second action in the schedule, add another script, which contains the following call:
Activate Generation.
#! executable-class
com.espirit.moddev.uxbridge.inline.UxbInlineUtil
This call activates the generation to be performed in the next step; without this activation, no generation can take place. Therefore, the call is absolutely essential for a successful generation operation.
The generation activated in the previous action is performed by the Generate
action.
Specify a name of your choice in the generation's Properties
and select the Clear generation directory beforehand
option (see figure Generation - Properties). The Generate only if necessary
option must not be activated, however.
On the Extended
tab, the presentation channel created previously must be selected for one of the languages of the project (see figure Generation - Extended).
The Result Handler
action is an error detection function. It enables errors to be identified while delivering the generated messages and event messages.
Create another script for this and add the following script call to it:
Result Handler.
#! executable-class
com.espirit.moddev.uxbridge.inline.UxbResultHandler
Then open the Properties
of the script and create the following parameters via Add (see figure Script properties):
- messageTimeout
-
The service waits for the time span defined in seconds, until the adapters' answers are evaluated. The time span can be set to any value. If the service does not receive an answer within the defined time frame, the delivery of the message is incorrect.
- errorThreshold/disableMaintenanceWithErrors
-
During a full generation operation, the corresponding project is set to a maintenance mode in the FOS, whose activation is controlled automatically. If errors or warnings occur during a generation of this type, the maintenance mode will usually not then be exited again. This prevents incorrect data being transferred to the live state.
The errorThreshold
and disableMaintenanceWithErrors
parameters enable the maintenance mode to be terminated again even if errors or warnings occur. They must always be used together, as they only provide the required functionality in conjunction with one another.
The errorThreshold
parameter defines the threshold value for the permissible number of errors and warnings. Only if the threshold value is not exceeded can the maintenance mode be terminated.
However, for this to happen, the disableMaintenanceWithErrors
parameter must have the value true
at the same time. If the value false
has been assigned to it instead, the maintenance mode always remains activated in the event of errors.
So, the maintenance mode is only exited in the event of an error if precisely these conditions are met: a full generation operation has been performed, the disableMaintenanceWithErrors
parameter has the value true
, and the number of errors and warnings which have occurred does not exceed the threshold defined via the errorThreshold
parameter.
5.3. Generation schedule (FOS delta generation)
The process of creating messages which are forwarded to the FOS via the UX-Bus and inform it of changes made since the last generation requires a second schedule. This must contain the following actions in addition to the actions described in the previous chapters (see also figure Actions for the FOS delta-deployment schedule):
The actions Activate HTML Generation
, Generate HTML
, DeltaEventCollector
, and DeltaEventGenerator
are only required if the Portal Plugin is also to be informed of potential changes to content. If this is the case, all four actions must be added to the schedule. Otherwise, they can be omitted.
|
If no changes have been made to the project between the current and last execution of the delta generation, the schedule will run without generating any pages or sending a message to the FOS (with the exception of status messages).
|
5.3.1. Activate HTML Generation
Only if the Portal Plugin is also to be informed of potential changes to content must the following script be added to the schedule as the first action. Otherwise, it can be ignored.
Activate HTML Generation.
import de.espirit.firstspirit.access.schedule.DeploymentUtil;
deltaGeneration = DeploymentUtil.createDeltaGeneration(context);
deltaGeneration.levelRule(0, 0).levelRule(1,1).levelRule(2,2);
changeSet = deltaGeneration.calculateChangeSet();
changeSet.configureGenerateTask();
The script determines the changes which have been made to the content and activates the HTML generation to be performed in the next step. Without this activation, the generation cannot be carried out successfully. Therefore, it is absolutely essential (based on the prerequisite already stated).
|
The level rules defined in the above script must be adapted on a project-specific basis, as otherwise the delta deployment could take a very long time.
|
The generation to be performed with this action is only required if the Portal Plugin is also to be informed of potential changes to content. It must first be activated and it is essential that it follows the previous Activate HTML Generation
action.
On the Extended
tab, the HTML channel must be selected for all project languages (see figure Advanced Generate HTML settings).
Specify a name of your choice in the generation's Properties
and select the Clear generation directory beforehand
option (see figure Generate HTML properties).
5.3.3. DeltaEventCollector
The DeltaEventCollector
action must follow Generate HTML, as it records the content generated by that previous action. This is done by means of the following script call:
DeltaEventCollector.
#! executable-class
com.espirit.moddev.fos.util.FosDeltaEventCollector
The EventCollector
is only required if the Portal Plugin is also to be informed of potential changes to content. Otherwise, this action can be omitted.
The Calculate Changes
action determines the changes made within the FirstSpirit project being used since the last generation. It also configures the next generation action such that only a minimum number of messages is sent to the FOS in order to refresh it. If no changes have been identified, the schedule is canceled at this point.
Therefore, it is absolutely essential that the action is performed after the initialization and before the generation.
The changes made are determined and the necessary information is transferred to the generation action via the following lines, which must be inserted in a script:
Calculate Changes.
import com.espirit.moddev.fos.generation.*;
deltaGeneration = DeploymentUtil.createFosDeltaGeneration(context);
FosDeltaGeneration.ChangeSet changeSet = deltaGeneration.calculateChangeSet();
generateTaskConfigurator = GenerateTaskConfigurator.getInstance(context, changeSet);
generateTaskConfigurator.configureGenerateTask(true);
The boolean value transferred to the configureGenerateTask
call controls whether, once changes have been made to templates, a generation of the pages based on those templates is to be triggered. If this is not required, the value must be changed from true
to false
.
5.3.5. Remove Deleted Nodes
The Remove Deleted Nodes
action informs the FirstSpirit Object Service of the elements deleted in FirstSpirit. This is done by means of the following script call:
Remove Deleted Nodes.
import com.espirit.moddev.fos.generation.DeploymentUtil;
DeploymentUtil.removeDeletedNodes(context);
5.3.6. DeltaEventGenerator
The DeltaEventGenerator
action is only required if the Portal Plugin is also to be informed of potential changes to content. Otherwise, this action can be omitted.
The EventGenerator
sends messages relating to changes to content to the FOS. To do this, it uses the information determined by the EventCollector
. This is done by means of the following script call:
Event Generator.
#! executable-class
com.espirit.moddev.fos.util.FosDeltaEventGenerator
The generation of messages by the EventGenerator
must be positioned between the FOS generation and before the ResultHandler, so the FOS is able to process the information without errors.
5.3.7. Finalize DeltaGeneration
The Finalize DeltaGeneration
action completes the delta generation:
Finalize DelteGeneration.
#! executable-class
com.espirit.moddev.fos.util.FosDeltaFinalizer
6. FirstSpirit Object Service Admin Interface
The FirstSpirit Object Service Admin Interface is found within the FOS, which is the link between FirstSpirit and the portal server being used (see figure Architecture). Therefore, the Admin Interface is one segment of this link.
Its position within this architecture enables the FirstSpirit Object Service Admin Interface to determine all the FirstSpirit projects which connect a portal. It provides a web interface (see figure Admin Interface) for managing these projects; the web interface can be accessed via the following URL:
http://<server name>:<port>/<web app name>/ui/admin
The web interface is divided into the following areas:
These areas are described in detail in the sections that follow.
|
The FirstSpirit Object Service Admin Interface does not require authentication as standard and is therefore not protected against unauthorized access. For this reason, we recommend protecting the web application using standard servlet container mechanisms such as HTTP Basic Authentication.
|
The information entered the first time the Admin Interface is called is displayed in the Settings
area and can be configured here.
This area is also displayed if the FOS_SETTINGS_FILE
parameter has been defined but the settings file cannot be found under the specified path or the settings file is invalid. In this case, only the Settings
area of the Admin Interface can be accessed and the other areas are hidden.
|
The application server must be restarted each time the settings are changed.
|
A list of all projects determined by the FirstSpirit Object Service Admin Interface is made available in the Projects
area. Next to the name of each project in the list is a slider and three buttons (see figure Admin Interface - Projects).
|
The name of the project is an identifier: This point is particularly important if several FirstSpirit Servers are used. If all are using the same FOS, unique project names are essential.
|
|
If a project is renamed in FirstSpirit, this creates a new project in the FOS. This also affects the configuration of the project.
|
The Maintenance Mode
slider is used to manually activate or deactivate a project's maintenance mode and therefore has the states ON
and OFF
. The maintenance mode is deactivated as standard and the slider is set to the OFF
state.
If a project is in the maintenance mode, the FOS does not send any event messages and all requests from the Portal Plugin to the REST interface of the FOS are answered with a Retry later
message for this project. So no data for this project is supplied from the FOS to the Portal Plugin during this time. The project data saved inside the persistence layer of the FOS cannot be accessed again until the maintenance mode has been deactivated.
The maintenance mode can also be changed automatically by means of a generation operation. A distinction must be made between a partial and a full generation here.
- Partial generation
-
A partial generation usually modifies just a little data, so the maintenance mode state will remain unchanged. The Admin Interface continues to work without restrictions if the maintenance mode has not been activated manually.
- Full generation
-
Since a full generation is potentially associated with a great deal of modified project data, these changes would generate a large number of event messages. The project is therefore set to maintenance mode automatically before the full generation is performed, provided that this mode has not already been activated manually.
|
If the maintenance mode had been deactivated previously, it will once again be deactivated automatically after the full generation has been carried out. Otherwise it will remain activated.
|
Manually deactivating the maintenance mode if it has been automatically activated by FirstSpirit will generate a warning with a confirmation prompt (see figure Warning). This prompt gives the administrator the option to either actually deactivate the maintenance mode or cancel the process.
|
Deactivating the maintenance mode does not cancel the generation, which continues without interruption.
|
When the maintenance mode is deactivated, the FOS starts sending event messages again for the remainder of that generation operation. The REST interface is also available for requests from the Portal Plugin once more. Therefore, the information transferred to the Portal Plugin may be incomplete or in a version still being modified by the ongoing generation. This can lead to inconsistencies.
For more information on the maintenance mode, refer to the Documentation for Developers.
Clicking the Clear Cache button deletes all project-related data contained in the FOS. The project and all settings are retained.
Clicking the Delete Cache button removes the corresponding entry from the list of projects. Furthermore, all data relating to that project is deleted from the FirstSpirit Object Service Admin Interface and cannot be recovered. The project can then only be transferred to the persistence layer of the FOS again by means of a full generation operation.
|
The Clear Cache and Delete Cache buttons only relate to the FirstSpirit Object Service Admin Interface and do not affect the FirstSpirit Server which contains the project. The project still exists on the FirstSpirit Server.
|
|
It is not possible to simply restore the data deleted via the Clear Cache or Delete Cache button in the FirstSpirit Object Service Admin Interface.
There is just the option to transfer the project to the persistence layer of the FOS again by means of a full generation operation, making the data available once more in this way.
|
It makes sense to use this functionality if the corresponding project will no longer be used in future and will no longer exist on the FirstSpirit Server either. This applies to test projects, for example.
API Keys can be defined for every project in the portal service; these keys provide read and, if applicable, write (administrative) access to the project via the REST interface. A project's API can only be accessed with an API Key, for which the appropriate permissions have been set. This means that a project cannot be accessed via the REST interface without an API Key. One exception, however, is the Admin Interface, which uses the master key described in chapter Settings that has all permissions for all projects. This ensures that administrators at the very least always have access to a project and makes it impossible to completely exclude everyone from a project.
API Keys are managed in the Admin Interface area of the same name (see figure API Keys).
An overview of all API Keys and their permissions is found here. This list is divided into three columns: API-KEY
, PROJECT
, and ADMIN RIGHTS
.
- API-KEY
-
The
API-KEY
column contains the technical key (a UUID
), which is used to obtain access to the API of the project. Underneath that is the functional description of the API Key. There is also a button to the left of the key which can be used to delete the API Key.
- PROJECT
-
The
PROJECT
column contains a list of all projects for which the API Key has permissions. At the bottom of this project list is a button, which can be used to grant the API Key permissions for another project. To the left of each project is another button, which can be used to remove all permissions for this project from the API Key.
- ADMIN RIGHTS
-
The
ADMIN RIGHTS
column uses a slider next to each project to show whether the API Key has administrative permissions for the respective project. At the same time, the slider is used to set or remove these permissions.
These and other functions are described in detail in the sections below.
6.3.1. Filtering the displayed API Keys
If there is a large number of API Keys and projects, it may be that not all API Keys or projects are of interest and simply make the overview unnecessarily complex. Therefore, two input components named Filter Projects
and Show empty API-Keys
can be found above the list and serve to filter the overview of API Keys.
If a project is selected in Filter Projects
, API Keys with permissions for this project are displayed in the overview. Otherwise, the corresponding API Keys are hidden.
All projects are selected in Filter Projects
as standard, so the overview contains all API Keys which have permissions for at least one project. At the same time, this means that API Keys with permissions for no project are not displayed as standard. This is why the Show empty API-Keys
button is provided, so exactly these keys can be shown and hidden.
6.3.2. Creating a new API Key
A special dialog is provided for creating a new API Key (see figure Dialog for creating a new API Key), which is opened by clicking the + Add API-Key
button.
In the upper part of the form, a description of the new API Key must be entered in the Description
field in order to give it a functional reference.
Initial project permissions for the new API Key are granted in the lower part of the form. An overview of all the projects in the portal service can be found here in table format. If a check box in the left-hand column of this list is selected, the API Key receives read permissions for the corresponding project. The key receives administrative permissions when the slider in the right-hand column is also set to ON
.
Clicking Save stores the data on the form and generates a new API Key. Clicking Cancel, by contrast, discards all the entries.
Since a newly created API Key is sorted into the overview automatically, once it has been successfully generated, another dialog opens, which tells the user the name of the new key (see figure Confirmation dialog once an API Key has been created).
6.3.3. Editing the description of an API Key
The description of an API Key can be edited in the overview. All that has to be done is click on the description in order to edit it in the input component which appears (see figure Editing the description of an API Key).
Once the description has been revised, it can be accepted by clicking on the button with a check mark on a blue background. Since the description is a mandatory field, however, the save operation will be rejected as long as the text field is empty. To reject the changes, simply click the second button.
6.3.4. Editing project permissions
Adding another project
If an API Key is to obtain permissions for another project, said project can be selected in a corresponding dialog (see figure Adding another project). This dialog is opened by clicking the + Add Project
button under the project list of the corresponding API Key.
The dialog contains two input components: First there is a selection list containing all the projects for which the API Key has no permissions. The API Key receives permissions for the project selected in this list. The dialog also contains a slider, which can be used to set administrative permissions for the selected project. If this slider is set to ON
, the API Key has administrative permissions, otherwise it only has read permissions.
As soon as a project has been selected in the selection list, the process can be continued by clicking Add and the permissions of the API Key are supplemented as per the selection in the dialog. Clicking Cancel closes the dialog and no changes are made to the API Key.
Setting or removing administrative permissions for a project
Once permissions for a project have been added to an API Key, administrative permissions can be set or removed for this project at any time subsequently. It is enough to simply toggle the slider in the ADMIN RIGHTS
column for the project concerned in the overview of all the API Keys. If the slider is set to ON
, administrative permissions are set, otherwise they are not.
Removing all permissions for a project
A button labeled with an X can be found to the left of every project in the project list of every API Key. A click on this button removes all permissions for the project from the respective API Key. However, this must first be confirmed in the dialog which appears automatically after clicking the button (see figure Removing all permissions for a project).
Clicking OK removes the permissions from the API Key. They have to be set again manually in order to restore them. Clicking Cancel closes the dialog and the API Key retains its permissions.
6.3.5. Deleting an API Key
An API Key can be deleted irrevocably by clicking the button with the gray X to its left. However, first a dialog appears in which the user is requested to confirm the API Key should be deleted (see figure Deleting an API Key).
The deletion process is confirmed by clicking the OK button. The API Key is then permanently lost and removed from the overview. Clicking Cancel aborts the process instead and the API Key is not deleted.
7. Previous portal integration
The portal integration presented in this document is a further development of the existing "old" portal integration.
With the old portal integration it is already possible to transfer FirstSpirit content into a portal. However, since this solution is technically outdated and so no longer meets current demands, a new portal interface has been developed for FirstSpirit, which offers considerable advantages over the existing version.
An important feature of the new portal interface is the usage of the FOS and the UX-Bridge, via whose associated UX-Bus the individual components communicate with one another.
The new architecture is designed to help meet the objective of switching from complete deployments, which were common in the portal environment in the past, to an incremental approach, in order to be able to transfer changes made within the FirstSpirit project to the portal's live system faster.
The UX-Bridge enables the dynamic content delivery required by such an approach. Changes can be transferred by sending individual pages, depending on the implementation of the Portal Plugin. From a purely technical point of view, it is no longer necessary to deploy what could be very comprehensive subtrees.
The FirstSpirit Object Service module is a product of e-Spirit AG, Dortmund, Germany.
Only a license agreed upon with e-Spirit AG is valid with respect to the user for using the module.
Details regarding any third-party software products in use but not created by e-Spirit AG, as well as the third-party licenses and, if applicable, update information can be found in the file THIRD-PARTY.txt
included with the module.
This document is provided for information purposes only. e-Spirit may change the contents hereof without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. e-Spirit specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. The technologies, functionality, services, and processes described herein are subject to change without notice.