Repository
Class SubscriberHandler

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byRepository.SubscriberHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

class SubscriberHandler
extends org.xml.sax.helpers.DefaultHandler

SAX handler for subscribers.xml and asubscribers.xml.

Changes:

alexis.grandemange@pagebox.net

Copyright (c) 2002-2004 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, 11
Author:
Alexis Grandemange

Field Summary
(package private)  java.lang.StringBuffer data
          Element data
(package private)  java.lang.String date
          Date of the archive on the PageBox.
(package private)  java.lang.String downloadURL
          Saved URL of RepoQuery
(package private)  long maybeExpire
          Time when the maybe status should expire and the deployment be retried or -1 if the status is not maybe
(package private)  java.lang.String name
          Archive name
(package private)  java.lang.String oldStatus
          Previous status: installed, pending, archive err, PageBox err, pending remove, maybe or null when update not ongoing
(package private)  java.lang.String status
          Deployment status of the archive
(package private)  Subscriber sub
          Current subscriber
(package private)  java.util.TreeMap subscribers
          Subscriber map. Key: Subscriber URL Value: Subscriber object
(package private)  java.lang.String url
          Subscriber URL
(package private)  java.lang.String user
          Subscriber user name
 
Constructor Summary
(package private) SubscriberHandler()
           
 
Method Summary
 void characters(char[] buf, int offset, int len)
          Method called to handle characters in elements.
 void endElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName)
          Method called at the end of an element.
(package private)  java.lang.String getDownloadURL()
           
(package private)  java.util.TreeMap getSubscribers()
           
 void startElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName, org.xml.sax.Attributes attrs)
          Method called at the beginning of an element.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

java.lang.StringBuffer data
Element data


subscribers

java.util.TreeMap subscribers
Subscriber map.


sub

Subscriber sub
Current subscriber


url

java.lang.String url
Subscriber URL


name

java.lang.String name
Archive name


status

java.lang.String status
Deployment status of the archive


oldStatus

java.lang.String oldStatus
Previous status: installed, pending, archive err, PageBox err, pending remove, maybe or null when update not ongoing


maybeExpire

long maybeExpire
Time when the maybe status should expire and the deployment be retried or -1 if the status is not maybe


date

java.lang.String date
Date of the archive on the PageBox. null up to the time the archive is installed or PageBox err or archive err.


user

java.lang.String user
Subscriber user name


downloadURL

java.lang.String downloadURL
Saved URL of RepoQuery

Constructor Detail

SubscriberHandler

SubscriberHandler()
Method Detail

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String sName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
Method called at the beginning of an element.

Parameters:
namespaceURI - name space
sName - simple name
qName - qualified name
attrs - attributes
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String sName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Method called at the end of an element.

Parameters:
namespaceURI - name space
sName - simple name
qName - qualified name
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] buf,
                       int offset,
                       int len)
                throws org.xml.sax.SAXException
Method called to handle characters in elements. Fills data.

Parameters:
buf - char buffer
offset - first char offset in buf
len - number of chars
Throws:
org.xml.sax.SAXException

getSubscribers

java.util.TreeMap getSubscribers()
Returns:
subscriber map

getDownloadURL

java.lang.String getDownloadURL()
Returns:
URL of RepoQuery