icon

Web Content Importer

icon
Key-Biz S.r.l.
Data Modeling & Business Logic
Description
This application allows a liferay user administrator to import journal articles and ddm structures using a generic defined Xml.

The import processment will show a report with details about imported data.

-> Why using it?

It can be beneficial when an insert of many journal articles or structures is required or for migration purpose getting web content data from whatever source.

In this last scenario tools might be created to generate the given Xml.

It can be in general used as an alternative to the "add new web content/ddm structure" offered by liferay (Web Content section).

-> How to use it?

Once installed a portlet will be accessible from "configuration" item of control panel with name "Web Content Importer", therefore allowed to be viewed/used by an Administrator role.
When it is opened the app will let you import whenever the Xml to upload and the liferay site (site in which the web content is saved) are selected.

-> Creating the Xml

In order to create the Xml please refer to the xsd file residing in the service module: webcontent-importer-service under "resources" folder at the path "\it\keybiz\liferay\globalimp\service\webcontent\xml\impl" with name webcontent.xsd

When uploading the file xml is parsed and validated against the xsd,in case displaying an error message describing which element is defined incorrectly.

ps: beware of the order of the element and the number minimum occurrences (almost all attributes element are optional) as they are main source of validation issues.


-> Defining DDM Structure, xml element example


```
<ddmstructure>
<name>Example</name>
<structurekey>ExampleKey</structurekey>
<dateformfield>
<label>date</label>
<tip></tip>
<showlabel>true</showlabel>
</dateformfield>
</ddmstructure>
```


-> Defining Journal Article, xml element example


```
<journalarticle>
<title>Example</title>
<description>Example</description>
<defaultlocale>it_IT</defaultlocale>
<ddmstructurekey>ExampleKey</ddmstructurekey>
<dateformfield>
<data>2016-03-02</data>
</dateformfield>
</journalarticle>
```

The xml above will create a ddmstructure and than a journal article associated to it (see ddmstructurekey equals to the structurekey of the ddmstructure element).

Mandatory form field elements like dateformfield or checkboxformfield in the journalarticle element let you insert content data.

p.s: To check required or not elements please refer to the webcontent.xsd file.

-> What About DDM Template of a structure ?

The template associated with the structure can't be defined at this stage of development.

At the moment a default one is created with a default freemarker script which will display data of structure form fields,in display mode.

-> What if I don't define a structure Key for the journal article ?

the journal article will be created with the Liferay default DDM Structure/template (BASIC WEB CONTENT)

-> Which format in the input xml for formfields element of a journalarticles ?

the <data> element should be filled respecting the following format,
respectively for each field:

1. radioformfield should be one of the possible value defined in the related formfield of the ddmstructure
-> for options: value1,value2,value3 for instance could be value1
-> for the default ddmstructure (value 1,2,3 are the default)
2. separatorformfield: it is just a graphic separator filling data element is useless
3. selectformfield should be one of the possible value defined in the related formfield of the ddmstructure
-> for options: value1,value2,value3 for instance could be value1
-> for the default ddmstructure (value 1,2,3 are the default)
4. journalarticleformfield
must be a json object like -> {"className":"com.liferay.journal.model.JournalArticle","classPK":"116602"}
5. imageformfield and documentlibraryformfield
must be a url referencing a resource image or document -> /documents/20147/0/Chrysanthemum.jpg/9fff10be-dc64-d8fa-bbcd-25be3555bb94?t=1475668603495
6. dataformfield -> 2016-10-30 = YYYY-mm-dd
7. htmlformfield -> must be wrapped in a CDDATA -> <![CDATA[<h1>test444</h1><div>ciaooone</div><script>alert("ciao");</script>]]>
8. textformfield whatever string representing a text
9. textareaformfield -> see 8

All of the above are validated during import, in case data is in the incorrect format(date in the wrong format) content won't be created for that formfield.

Later feature will contemplate a failed import and error messages to be displayed in the report table.

-> Report Result table

After processement a table with import result will be presented:

* it will contain details of each web content (can be type ddm structure or journal article) import operation.
* in case an insert operation goes wrong error a message will be displayed in the error message column.
* the title column can be clicked to access the detail page of the imported journal article (at the moment this is not enabled for a ddm structure)
* the id and structure key gives you an insight of the entites created in the database
Liferay is trademark of Liferay, Inc., Liferay International Limited and/or Liferay Affiliate, registered in the United States and/or other countries.
Release Summary and Release Notes
Version Change Log Supported Framework Versions Date Added
1.0
Liferay CE Portal 7.0 GA3+
2016-12-05
Profile
Key-Biz is an Open Source Company with expertise, experience and solutions java based. We realize enterprise portals, intranet sites and business functionality with Social, Collaboration & Knowledge Management, Content & Documental Management, BPM and Workflow. We rely on complete platforms based on Java standards. Business solutions for realize applications and websites, also in social and collaborative key, robust, secure and not tied to specific vendor technologies (open source). Key-Biz is Partner Bonita Soft (scope BPM, Business Process Management), Mongo DB (big data), Liferay (enterprise portal) eXo Platform (Social & Collaboration). Accademy Proven network of relationships with some of the most prestigious universities and italian research centers that share research and exchange educational and scientific activities. Research & Development Identification of innovative technologies and processes that can be implemented in the short and medium time, to increase the company's competence and economic performance of the core business activities. Evaluate in advance the business scenarios in the future function of technological development expected. Mob.Lab Working group for young talented in mobile for living a work-esperience innovative and rewarding.
DEVELOPER
Key-Biz S.r.l.
Published Date
Version
1.0
Supported Versions
7.0
Edition
CE
Price
Free
Help & Support
Terms & Conditions
SHARE LINK

Installation Instructions

This is a Legacy App that is no longer available in the new App Marketplace. You are able to acquire it from your installed DXP or CE instance and install it by following the instructions below.

Acquiring this App through the legacy Liferay Portal Store

  1. Review app documentation for any specific installation instructions.
  2. Login to your Liferay Portal instance with administrative permissions.
  3. Navigate to the Control Panel, Marketplace (or Apps for 7.3 and prior), then Store.
  4. If needed, login to your Liferay.com account by choosing Sign In.
  5. Search for the app name in the Search dialog.
  6. Once the app is found, click on the app in the search results.
  7. On the app details page, choose to acquire the app by selecting the Free, Buy, or Trial button.
  8. Follow the instructions on the screen to complete the acquisition.

Installing this App through legacy Liferay Portal Purchased Apps

  1. After acquiring the app, login to your Liferay Portal instance with administrative permissions.
  2. Navigate to the Control Panel, Marketplace (or Apps for 7.3 and prior), then Purchased.
  3. If needed, login to your Liferay.com account by choosing Sign In.
  4. Click the Install button to install your app on your Liferay Portal instance.

See the legacy App Marketplace help documentation for more information.