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

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

public class AuthorizationUnmarshaller
extends java.lang.Object
implements Unmarshaller<Authorization>

Unmarshals and marshals an Authorization from/into an Element .

Author:
sanjin

Nested Class Summary
static class AuthorizationUnmarshaller.Builder
          Builder of AuthorizationUnmarshaller.
 
Field Summary
static java.lang.String AUTHORIZATION_ELEMENT
          The local name of child Elements used in the ListUnmarshaller.Builder that is returned by the getListBuilder().
static java.lang.String METHOD_ATTRIBUTE
          The name of attribute that holds marshaled name of AuthorizationMethod.
 
Constructor Summary
AuthorizationUnmarshaller(org.w3c.dom.Element element)
          Creates instance of Authorization 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<Authorization> getListBuilder()
          Creates instance of ListUnmarshaller.Builder for Authorizations.
 void marshal(Authorization authorization)
          Marshals specified Authorization into the Element.
 void remove()
          Removes any marshaled Authorization from the Element.
 Authorization unmarshal()
          Unmarshals an Authorization from the Element.
 Attribute[] unmarshalAttributes()
          Unmarshals Authorization Attributes from the Element.
 java.lang.String unmarshalMethod()
          Unmarshals name of AuthorizationMethod from the Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTHORIZATION_ELEMENT

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

See Also:
Constant Field Values

METHOD_ATTRIBUTE

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

See Also:
Constant Field Values
Constructor Detail

AuthorizationUnmarshaller

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

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

unmarshalMethod

public java.lang.String unmarshalMethod()
                                 throws FailedUnmarshallingException
Unmarshals name of AuthorizationMethod from the Element.

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

unmarshalAttributes

public Attribute[] unmarshalAttributes()
                                throws FailedUnmarshallingException
Unmarshals Authorization Attributes from the Element.

Returns:
the marshaled Authorization Attributes.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

marshal

public void marshal(Authorization authorization)
Marshals specified Authorization into the Element.

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

remove

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

Specified by:
remove in interface Marshaller<Authorization>

getListBuilder

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

Returns:
the ListUnmarshaller.Builder for Authorizations.


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