pandora
Class UpdateImpl

java.lang.Object
  |
  +--pandora.UpdateImpl
All Implemented Interfaces:
java.rmi.Remote, javax.xml.rpc.server.ServiceLifecycle, UpdateIF

public class UpdateImpl
extends java.lang.Object
implements UpdateIF, javax.xml.rpc.server.ServiceLifecycle

Implementation of the Pandora central server.

alexis.grandemange@pagebox.net

Copyright (c) 2002-2003 Alexis Grandemange

This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public License
 as published by the Free Software Foundation; version 2.1 of the
 License.
 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU Lesser General Public License for more details.
 A copy of the GNU Lesser General Public License lesser.txt should be
 included in the distribution.

Version:
0, 0, 2
Author:
Alexis Grandemange

Nested Class Summary
(package private)  class UpdateImpl.Art
          Objects stored in the arts HashMap.
 
Nested classes inherited from class pandora.UpdateIF
UpdateIF.Article, UpdateIF.Command, UpdateIF.Item
 
Field Summary
(package private)  PageBoxAPI API
          Installation API instance
(package private)  javax.servlet.ServletContext ctx
          Unique to the Web application
(package private)  PageBoxLib.LogIF log
          Logging object
private  QueryIF qi
          Web service interface
(package private)  java.lang.String workDir
          Directory where InstallAPI.txt is defined
 
Constructor Summary
UpdateImpl()
           
 
Method Summary
 void destroy()
          ServiceLifeCycle method.
 void init(java.lang.Object context)
          ServiceLifeCycle method.
 UpdateIF.Article[] update(UpdateIF.Command[] orders)
          Update the central server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

API

PageBoxAPI API
Installation API instance


ctx

javax.servlet.ServletContext ctx
Unique to the Web application


workDir

java.lang.String workDir
Directory where InstallAPI.txt is defined


log

PageBoxLib.LogIF log
Logging object


qi

private QueryIF qi
Web service interface

Constructor Detail

UpdateImpl

public UpdateImpl()
Method Detail

init

public void init(java.lang.Object context)
          throws javax.xml.rpc.ServiceException
ServiceLifeCycle method.

Called at initialization.

Specified by:
init in interface javax.xml.rpc.server.ServiceLifecycle
Parameters:
context - ServletEndpoint Context
javax.xml.rpc.ServiceException

destroy

public void destroy()
ServiceLifeCycle method. Called at destruction.

Specified by:
destroy in interface javax.xml.rpc.server.ServiceLifecycle

update

public UpdateIF.Article[] update(UpdateIF.Command[] orders)
Update the central server.
  1. Update of the command, item and article tables. Essentially the same sql as in CommandCtrl.commit.
  2. Read the article table to set up the response map. Same code as in CommandCtrl.createCb.

Specified by:
update in interface UpdateIF
Returns:
article list (key: article ID, value: Article object) or null in case of error