at.ac.tuwien.infosys.sm4all.copal.api.event.xml
Class UnprocessedActionUnmarshaller

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.event.xml.UnprocessedActionUnmarshaller
All Implemented Interfaces:
Marshaller<UnprocessedAction>, Unmarshaller<UnprocessedAction>

public class UnprocessedActionUnmarshaller
extends java.lang.Object
implements Unmarshaller<UnprocessedAction>

Unmarshals and marshals an UnprocessedAction from/into an Element.

Author:
sanjin

Nested Class Summary
static class UnprocessedActionUnmarshaller.Builder
          Builder of UnprocessedActionUnmarshaller.
 
Field Summary
static java.lang.String ACTION_ELEMENT
          The local name of child Elements used in the ListUnmarshaller.Builder that is returned by the getListBuilder().
static java.lang.String NAME_ATTRIBUTE
          The name of attribute that holds marshaled name.
static java.lang.String REQUIRED_ATTRIBUTE
          The name of attribute that holds marshaled requirement.
 
Constructor Summary
UnprocessedActionUnmarshaller(org.w3c.dom.Element element)
          Creates instance of UnprocessedAction Unmarshaller which uses specified Element for unmarshalling and/or marshalling.
 
Method Summary
 org.w3c.dom.Element getElement()
          Returns the Element used for unmarshalling and marshalling.
static ListUnmarshaller.Builder<UnprocessedAction> getListBuilder()
          Creates instance of ListUnmarshaller.Builder for UnprocessedActions.
 void marshal(UnprocessedAction action)
          Marshals specified UnprocessedAction into the Element.
 void remove()
          Removes any marshaled UnprocessedAction from the Element .
 UnprocessedAction unmarshal()
          Unmarshals an UnprocessedAction from the Element.
 java.lang.String unmarshalName()
          Unmarshals name of UnprocessedAction from the Element.
 boolean unmarshalRequirement()
          Unmarshals requirement of UnprocessedAction from the Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_ELEMENT

public static final java.lang.String ACTION_ELEMENT
The local name of child Elements used in the ListUnmarshaller.Builder that is returned by the getListBuilder().

See Also:
Constant Field Values

NAME_ATTRIBUTE

public static final java.lang.String NAME_ATTRIBUTE
The name of attribute that holds marshaled name.

See Also:
Constant Field Values

REQUIRED_ATTRIBUTE

public static final java.lang.String REQUIRED_ATTRIBUTE
The name of attribute that holds marshaled requirement.

See Also:
Constant Field Values
Constructor Detail

UnprocessedActionUnmarshaller

public UnprocessedActionUnmarshaller(org.w3c.dom.Element element)
Creates instance of UnprocessedAction Unmarshaller which uses specified Element for unmarshalling and/or marshalling.

Parameters:
element - the Element used for unmarshalling and marshalling.
Throws:
java.lang.NullPointerException - if specified Element is null.
Method Detail

getElement

public org.w3c.dom.Element getElement()
Returns the Element used for unmarshalling and marshalling.

Returns:
the Element used for unmarshalling and marshalling.

unmarshal

public UnprocessedAction unmarshal()
                            throws FailedUnmarshallingException
Unmarshals an UnprocessedAction from the Element.

Specified by:
unmarshal in interface Unmarshaller<UnprocessedAction>
Returns:
the unmarshaled UnprocessedAction.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

unmarshalName

public java.lang.String unmarshalName()
                               throws FailedUnmarshallingException
Unmarshals name of UnprocessedAction from the Element.

Returns:
the name of marshaled UnprocessedAction.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

unmarshalRequirement

public boolean unmarshalRequirement()
                             throws FailedUnmarshallingException
Unmarshals requirement of UnprocessedAction from the Element. If the requirement value is missing then the UnprocessedAction.REQUIREMENT_DEFAULT is returned.

Returns:
the requirement of marshaled UnprocessedAction.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

marshal

public void marshal(UnprocessedAction action)
Marshals specified UnprocessedAction into the Element.

Specified by:
marshal in interface Marshaller<UnprocessedAction>
Parameters:
action - the UnprocessedAction.
Throws:
java.lang.NullPointerException - if specified UnprocessedAction is null.

remove

public void remove()
Removes any marshaled UnprocessedAction from the Element .

Specified by:
remove in interface Marshaller<UnprocessedAction>

getListBuilder

public static ListUnmarshaller.Builder<UnprocessedAction> getListBuilder()
Creates instance of ListUnmarshaller.Builder for UnprocessedActions. The returned ListUnmarshaller.Builder does not have the parent Element set and caller should set it before building the ListUnmarshaller for UnprocessedActions. The name for child Elements is set to ACTION_ELEMENT.

Returns:
the ListUnmarshaller.Builder for UnprocessedActions.


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.