051C2176838A4326AA6B39CE26B86EB6
  • Internet
  • 25.01.2018
  • DE/EN

jRQL: 12 Plug-Ins - WSMS Aufgaben elegant automatisieren

Letzte Woche habe ich einen älteren Artikel von Frank Leja zum Thema jRQL, unter dem Titel Java API for Management Server - easier RQL - faster results , hier nochmals geposted. Es ging um das jRQL Framework, welches einem ermöglicht direkt von JAVA mit dem OpenText™ Web Site Management (RedDot CMS) Server (über den RQL WebService) zu sprechen.

Dieses Framework bietet noch ganz andere Aspekte und dies in Form von 12 Plug-Ins, mit dem sich viele Aufgaben elegant automatisieren lassen.

Dies wurde auch auf der 22. Anwendertagung in München persönlich von Frank Leja vorgestellt.

Hier nun der Original-Artikel von Frank Leja, vom 26. Juni 2009 ...


Intro by Paul Smith

Following the German RDUG day this year, we were contacted by Frank Leja from Hapag-Lloyd. Frank had found the site useful, so wanted to contribute something back to the community; it’s a very generous offer too. Frank has spent the last few years building an RQL library, plus a large number of plugins, which we are now very fortunate to be hosting.

Frank’s work is Java/JSP based so to use it you will need to install and configure Tomcat. Thankfully he thought of this and has provided a pre-configured installation of Tomcat and full setup instructions which we have included in the download along with all the plugins and documentation.

There are a few things to mention before you go running off to install it all:

  1. This needs Tomcat and a JAVA JDK installed on your system
  2. It has been designed for an English interface/data format
  3. It has only been tested against RedDot 7.5.2.16 and JDK 1.5. Please leave a note if you test it against another version and let us know how it gets on.
  4. As it is Java based and we (Paul, Frederic, Markus and Adrian) are not all that familiar with what the code is up to and we’ve not had the chance to run through these ourselves yet, so they are supplied as-is with no guarantees.
  5. None of us accept any responsibility for anything that may go askew when installing or running the library or it’s plugins. It’s up to you to test them somewhere safe first!

Even the plugins use JAVA technology, which, while you may be unfamiliar with, you can still use it! All the required software is Open Source and the step-by-step installation instructions will guide you. To make it as easy as possible for you I provide a pre-configured Tomcat package, which is needed to run these plugins.

Here is a description of all the provided plugins.
 

Plugin cancelWaitingJobs

 cancels all waiting publishing jobs in a project to get the publishing queue free for an important page needs to be published.
 

Plugin collectUserAddresses

can be used to inform authors via normal Outlook e-mail over server outages or changes in project.
You can select one or more projects. The plugin

  • Builds a Set of all users linked to these projects
  • shows all e-mail address from User profile separated by ; (ready for use in MS Outlook)
     

Plugin deleteJobReports

clears old Job Reports you don’t need anymore. If you have hundreds of job reports it take very long to open it in Smart Tree. Use this plugin to delete them before! It lets you choose a number of days, you want to keep the reports.
 

Plugin findTemplateElement

scans all content classes in all folders for a given content class element type and element name. Often the same template code has to be repeated in several content classes. If a change is needed in such an area, you could use this plugin to find all content classes you have to adjust by an element used in this repeated template code.
It ends up with a table with columns:

  • Content class folder name
  • Content class name
  • Content class element type
  • Content class element name

 

Plugin resetAllDraftPages

helps you and authors as well to get rid of all your pages saved as draft. Reason for creation was, that authors often create pages again and again. From my experience they have often many pages in state draft which are not needed anymore.

Newly created pages will be deleted and for changed pages an undo is triggered. After end of plugin your list of draft pages would be empty.

I offer this plugin for authors by patching the Tasks dialog and inserted a link beside “12 pages in draft”.
 

Plugin showChildDetails

gives you an details overview of all pages linked on a List or Container.
It comes up with a table for all pages linked on selected List or Container with the following columns:

  • Page Id
  • Page headline
  • Content class name
  • Created by user name
  • Created on date
  • Last changed by user
  • Last changed on date
  • State (draft, released)
  • Released on date

 

Plugin showPageByGuid

shows you basic information (page ID, headline and content class name) for an entered page GUID. Helpful for RQL developers sometimes.
 

Plugin showTemplateElementsUsage

help to identify unused elements in a content class for deletion. Gives an overview which element is used in which Template Variant source code.

It shows a table of all elements by name and type and checks every Template Variant source code of content class if the element is used (element value itself of red dot for this element).
The  interpretation is up to the admin. Even an element is not used in any Template Variant, it may be could not be deleted.

 

Plugin showTemplateGuids

is useful for RQL developers who needs to refer to a content class in a program by GUID of content class.
 

Plugin showTemplateLanguageVariantDependency

helps to decide if a page of a content class will appear in the translation editor’s list of pages needing translation.  It gives an overview of the checkbox “language-variant independent” of all content elements of selected content class.

It shows a table with following columns:

  • Element name
  • Element type
  • One value for all LVs
  • Different values per LV

It marks elements green, if a red dot in Smart Edit is included in the Template Variant of project’s display Project Varant.

And it marks elements in red, where no red dot is found. This is often wrong, because a translator will get this page for translation, but cannot do it.

 

Plugin showTemplatePreassignmentReference

offers the backward functionality of Preassign Content class on a List or Container. For the selected content class it shows, where it is preassigned. It helps to make the preassignment definitions consistent in a project.

It searches all content classes in all folders per default, but let you choose one Template Folder to speed up search too. It goes through all content classes and checks on all Lists and Containers the preassignment definition. Displays all template elements the selected content class is preassigned in a table with these columns:

  • Content class folder name
  • Content class name
  • Element name

 

Plugin showUsersInGroup

helps to analyses authorization setup directly in Smart Tree. Authorisation is often done via User Groups. This PlugIn displays all Users of a group directly, without the need to to switch to Server Manager.

  • It shows a table with following user properties:
  • User name
  • User full name
  • User e-mail address (linked for easy contact)
  • Description

If you find some of these plugins interesting,

Download the 12 Plugins and the RQL API

and open the installation.txt for further instructions. If you have questions or need help, drop me a line I will try to answer.


About the RQL API, interesting for JAVA developers

All plugins use functions implemented in the RQL API. It hides the XML handling from the plugins and make it more handy to request actions within CMS.

The classes are provided without source code, but still can be used for own programs.

In addition it implements more functionality from the following areas:

  • creation of pages and receiving and changing of  StandardField*-, Text-, Image- and Media-Elements
  • navigating through project structure (page – MultiLink – page) as you need
  • configuring and  starting of publishing jobs
  • retrieving and assigning of authorization packages
  • creating publication structure in sync with export packages published pages setting

Here is an example Java code snippet showing how to find a template element in all content classes of a project and the check, if it will be shown in Edit form dialog or not. It looks like this:

String loginGuid = "your current login guid";
String sessionKey = "your current session key";
String elementName = "element name to check";
 
// open project
CmsClient client = new CmsClient(logonGuid);
Project project = client.getProject(sessionKey);
 
for (TemplateFolder folder : project.getAllTemplateFolders()) {
  for (Template template : folder.getTemplates()) {
 
    // skip template without this elem
    if (!template.contains(elemName)) {
      continue;
    }
 
    // change elem
    TemplateElement element = template.getTemplateElementByName(elemName);
    System.out.println(template.getName() + " " + element.isUsedInForm());
  }
}

If you are interested you can find further details on the API in another blog.


Source: 12 Java Plugins using RQL API

© copyright 2009 by Frank Leja

       

Downloads

 

QuickLinks

 

Channel