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

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

public class ProcessedActionUnmarshaller
extends java.lang.Object
implements Unmarshaller<ProcessedAction>

Unmarshals and marshals a ProcessedAction from/into an Element.

Author:
sanjin

Nested Class Summary
static class ProcessedActionUnmarshaller.Builder
          Builder of ProcessedActionUnmarshaller.
 
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 PROCESSOR_ELEMENT
          The local name of child Element that holds marshaled name of ContextProcessor that processed marshaled ProcessedAction .
static java.lang.String PROCESSOR_NAME_ATTRIBUTE
          The name of attribute that holds marshaled name of ContextProcessor that processed marshaled ProcessedAction .
static java.lang.String PROCESSORS_ELEMENT
          The local name of child Element that holds marshaled names of ContextProcessors that processed marshaled ProcessedAction.
 
Constructor Summary
ProcessedActionUnmarshaller(org.w3c.dom.Element element)
          Creates instance of ProcessedAction 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<ProcessedAction> getListBuilder()
          Creates instance of ListUnmarshaller.Builder for ProcessedActions.
 void marshal(ProcessedAction action)
          Marshals specified ProcessedAction into the Element.
 void remove()
          Removes any marshaled ProcessedAction from the Element.
 ProcessedAction unmarshal()
          Unmarshals a ProcessedAction from the Element.
 java.lang.String unmarshalName()
          Unmarshals name of ProcessedAction from the Element.
 java.lang.String[] unmarshalProcessedBy()
          Unmarshals names of ContextProcessors that processed marshaled ProcessedAction
 
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

PROCESSORS_ELEMENT

public static final java.lang.String PROCESSORS_ELEMENT
The local name of child Element that holds marshaled names of ContextProcessors that processed marshaled ProcessedAction.

See Also:
Constant Field Values

PROCESSOR_ELEMENT

public static final java.lang.String PROCESSOR_ELEMENT
The local name of child Element that holds marshaled name of ContextProcessor that processed marshaled ProcessedAction .

See Also:
Constant Field Values

PROCESSOR_NAME_ATTRIBUTE

public static final java.lang.String PROCESSOR_NAME_ATTRIBUTE
The name of attribute that holds marshaled name of ContextProcessor that processed marshaled ProcessedAction .

See Also:
Constant Field Values
Constructor Detail

ProcessedActionUnmarshaller

public ProcessedActionUnmarshaller(org.w3c.dom.Element element)
Creates instance of ProcessedAction 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 ProcessedAction unmarshal()
                          throws FailedUnmarshallingException
Unmarshals a ProcessedAction from the Element.

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

unmarshalName

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

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

unmarshalProcessedBy

public java.lang.String[] unmarshalProcessedBy()
                                        throws FailedUnmarshallingException
Unmarshals names of ContextProcessors that processed marshaled ProcessedAction

Returns:
the names of ContextProcessors that processed marshaled ProcessedAction.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

marshal

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

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

remove

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

Specified by:
remove in interface Marshaller<ProcessedAction>

getListBuilder

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

Returns:
the ListUnmarshaller.Builder for ProcessedAction s.


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