public class OneShotRateModel extends RateModel
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:simpleType name="oneShotName">
<xs:restriction base="xs:string">
<xs:enumeration value="_subscription_event_"/>
<xs:enumeration value="_cancellation_event_"/>
<xs:enumeration value="_early_cancellation_event_"/>
<xs:enumeration value="_suspension_event_"/>
<xs:enumeration value="_resumption_event_"/>
<xs:enumeration value="_any_propagated_event_"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="oneShot">
<xs:complexType>
<xs:sequence>
<xs:element ref="component" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="eventName" type="oneShotName" use="required"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="description" type="xs:string"/>
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static String |
ANY_PROPAGATED_EVENT
Event name for one-time event from a master business
relationship.
|
static String |
CANCELLATION_EVENT
Event name for the cancellation.
|
static String |
EARLY_CANCELLATION_EVENT
Event name for the early cancellation.
|
static String |
RESUMPTION_EVENT
Event name for the resumption.
|
static String |
SUBSCRIPTION_EVENT
Event name for the subscription.
|
static String |
SUSPENSION_EVENT
Event name for the suspension.
|
static String |
TAG_NAME
The value of that constant is the XML tag name of the one shot rate.
|
| Constructor and Description |
|---|
OneShotRateModel() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkValidity()
Returns true if the one shot rate is valid.
|
Vector<String> |
getAvailableEventNames()
Gets available event names.
|
RatingContextDescription |
getContext(ContextualNode child)
Gets the context for the specified child.
|
static Vector<PropertyDescriptionModel> |
getDefaultPropertyDescriptions(String eventName)
Returns the descriptions for the default property according to the
type of the event for one shot rates.
|
String |
getEventName()
Gets the name of the event that this one shot rate
charges.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
marshalChildren(XMLOutputter output)
Gives an XML representation of the child objects of an object.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setEventName(String name)
Sets the name of the event that this one shot rate
charges.
|
addCharacterData, addChild, getDescription, getName, getParent, getRateComponent, inheritedContext, marshalAttributes, remove, setDescription, setName, setParent, setRateComponentpublic static final String SUBSCRIPTION_EVENT
public static final String CANCELLATION_EVENT
public static final String EARLY_CANCELLATION_EVENT
public static final String SUSPENSION_EVENT
public static final String RESUMPTION_EVENT
public static final String ANY_PROPAGATED_EVENT
public static final String TAG_NAME
public String getEventName()
public void setEventName(String name)
name - the name of the event.
Allowed values are :
public boolean checkValidity()
checkValidity in class RateModelpublic RatingContextDescription getContext(ContextualNode child)
child - the child nodepublic Vector<String> getAvailableEventNames()
String containing all available event names.public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallablesetAttributes in class RateModelatts - The XML attributes of the current elementpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface IXMLMarshallablemarshal in interface XMLMarshallablemarshal in class RateModeloutput - The XML output to marshal the object intopublic void marshalChildren(XMLOutputter output)
IXMLMarshallablemarshalChildren in interface IXMLMarshallablemarshalChildren in class RateModeloutput - The XML output to marshal the child objects intopublic static Vector<PropertyDescriptionModel> getDefaultPropertyDescriptions(String eventName)
PropertyDescriptionModel.eventName - the name of the event.property description models.