com.sapportals.wcm.protocol.ice.protocol.response

Class ICESubscription

java.lang.Object
  extended by com.sapportals.wcm.protocol.ice.protocol.response.ICESubscription
All Implemented Interfaces:
IICEElementHandler, IICEElement, IICEResponseElement

public class ICESubscription
extends Object
implements IICEResponseElement, IICEElementHandler

ICESubscription is a representation of an ice-subscription response element. Note that an ICESubscription might be a response in itself or encapsulated in an ICEStatus response. Detailed information about the ICE subscription element could be found in the ICE 1.1 specification Section 4.6.3 or Section 4.4.4 . ice-subscription format

 <!ELEMENT ice-subscription      (ice-offer) >
 <!ATTLIST ice-subscription
           current-state         CDATA           #IMPLIED
           expiration-date       CDATA           #IMPLIED
           expiration-priority   (first | last)  #IMPLIED
           quantity-remaining    CDATA           #IMPLIED
           subscription-id       CDATA           #REQUIRED
 >

See Also:

Copyright 2004 SAP AG


Field Summary
static String TAGNAME
           
 
Constructor Summary
ICESubscription(Attributes attributes)
          Create a new ICESubscription.
ICESubscription(String subscriptionID, String currentState, ICEOffer offer)
          Create a new ICESubscription.
 
Method Summary
 boolean endElement(String name)
          Receive notification of the end of an element.
 String getCurrentState()
          Get the id of the current package state.
 ICEOffer getOffer()
          Get the offer of the subscription.
 String getSubscriptionID()
          Get the id of the subscription.
 IICECharacterHandler startElement(String name, Attributes attributes, PreparsedXML input)
          Receive notification of the beginning of an element.
 void write(ContentHandler handler)
          Write the XML representation of the ICE element to a SAX ContentHandler.
 boolean writeChunk(ContentHandler handler)
          Write a chunk of XML to a SAX ContentHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAGNAME

public static final String TAGNAME
See Also:
Constant Field Values
Constructor Detail

ICESubscription

public ICESubscription(String subscriptionID,
                       String currentState,
                       ICEOffer offer)
Create a new ICESubscription.

Parameters:
subscriptionID - The id of the subscription
currentState - The id of the current package state
offer - The offer of the subscription

ICESubscription

public ICESubscription(Attributes attributes)
Create a new ICESubscription. This constructor is used by ICEInput to decode an ICE catalog response from an ICE payload.

Parameters:
attributes - @todo: Description of the incoming method parameter
Method Detail

getSubscriptionID

public String getSubscriptionID()
Get the id of the subscription.

Returns:
The id of the subscription

getCurrentState

public String getCurrentState()
Get the id of the current package state.

Returns:
The if of the current package state.

getOffer

public ICEOffer getOffer()
Get the offer of the subscription.

Returns:
The offer of the subscription

startElement

public IICECharacterHandler startElement(String name,
                                         Attributes attributes,
                                         PreparsedXML input)
                                  throws SAXException
Receive notification of the beginning of an element. ICEInput invokes this method upon a start element event from the underlying SAX parser.

Specified by:
startElement in interface IICEElementHandler
Parameters:
name - The local name of the XML element (we don't need namespaces at this point)
input - The preparsed XML stream to get the element content
attributes - @todo: Description of the incoming method parameter
Returns:
An IICECharacterHandler to receive the character events from the SAX parser or null if the character events could be ignored
Throws:
SAXException - on error (might wrap another exception)

endElement

public boolean endElement(String name)
                   throws SAXException
Receive notification of the end of an element. ICEInput invokes this method upon an end element event from the underlying SAX parser.

Specified by:
endElement in interface IICEElementHandler
Parameters:
name - The local name of the XML element (we don't need namespaces at this point)
Returns:
true if this handler should still receive SAX element events, false if this handler isn't interested in the following SAX element events
Throws:
SAXException - on error (might wrap another exception)

write

public void write(ContentHandler handler)
           throws SAXException
Write the XML representation of the ICE element to a SAX ContentHandler. This method is used by ICEOutput to create an ICE payload.

Specified by:
write in interface IICEElement
Parameters:
handler - The SAX ContentHandler (usually an XMLSerializer)
Throws:
SAXException - on error (might wrap another exception)

writeChunk

public boolean writeChunk(ContentHandler handler)
                   throws SAXException
Write a chunk of XML to a SAX ContentHandler. This method is used by ICEOutput to write an ICE payload in chunked mode.

Specified by:
writeChunk in interface IICEElement
Parameters:
handler - The SAX ContentHandler (usually a XMLSerializer)
Returns:
true if there are more chunks in the queue
Throws:
SAXException - on error (might wrap another exception)
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2011 SAP AG Complete Copyright Notice