| % |
| % Licensed to the Apache Software Foundation (ASF) under one |
| % or more contributor license agreements. See the NOTICE file |
| % distributed with this work for additional information |
| % regarding copyright ownership. The ASF licenses this file |
| % to you under the Apache License, Version 2.0 (the |
| % "License"); you may not use this file except in compliance |
| % with the License. You may obtain a copy of the License at |
| % |
| % http://www.apache.org/licenses/LICENSE-2.0 |
| % |
| % Unless required by applicable law or agreed to in writing, |
| % software distributed under the License is distributed on an |
| % "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| % KIND, either express or implied. See the License for the |
| % specific language governing permissions and limitations |
| % under the License. |
| % |
| % Create well-known link to this spot for HTML version |
| \ifpdf |
| \else |
| \HCode{<a name='DUCC\_WEB'></a>} |
| \fi |
| \chapter{DUCC Web Server Customization} |
| |
| This chapter describes how to take advantage of DUCC Web Server plug-in |
| capabilities in order to add local modifications. |
| |
| Prerequisites: |
| |
| \begin{enumerate} |
| \item Apache UIMA-DUCC source code |
| \item Ability to install DUCC (e.g. administrator) |
| \end{enumerate} |
| |
| Why would you want to do this? Perhaps you have some related information |
| that your DUCC Web Server could display to the user community. There are |
| considerations for both the server and client sides. |
| |
| The following discussion is related to the downloaded DUCC source code, |
| specifically the project {\em uima-ducc-web}. |
| |
| \section{Server Side} |
| |
| In package {\em org.apache.uima.ducc.ws} you will find |
| {\em DuccPlugins.java} which you can modify or extend. |
| |
| During Web Server boot time, there are hooks to: |
| |
| \begin{enumerate} |
| \item process each Job, Reservation, and Service restored from history |
| \item add additional {\em http} request handlers |
| \end{enumerate} |
| |
| During Web Server run time, there are hooks to: |
| |
| \begin{enumerate} |
| \item process each Orchestrator publication |
| \end{enumerate} |
| |
| \section{Client Side} |
| |
| In folder {\em /src/main/webapp/root/js/} you will find |
| {\em ducc.local.js} which you can modify. |
| |
| During browser page load, there are hooks to: |
| |
| \begin{enumerate} |
| \item perform additional initialization based on page type |
| \end{enumerate} |
| |
| During browser page update, there are hooks to: |
| |
| \begin{enumerate} |
| \item perform additional update based on page type |
| \end{enumerate} |
| |
| \section{Build and Install} |
| |
| Build a new {\em uima-ducc-web-[version].jar} comprising the revised |
| {\em DuccPlugins.class} and any additional dependent classes. |
| Replace the vanilla {\em \$DUCC\_HOME/lib/uima-ducc/uima-ducc-web-[version].jar} |
| with the one containing your modifications. |
| |
| Copy your new ducc.local.js to the installed Web Server's |
| {\em \$DUCC\_HOME/webserver/root/js} directory. |
| |
| Start (or re-start) your Web Server. |
| |
| You may have to flush you browser's cache to pick up the new {\em ducc.local.js}. |
| |
| |
| |
| |
| |