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

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

public class AuthorizationUnmarshaller
extends Object
implements Unmarshaller<Authorization>

Unmarshalls and marshalls an Authorization from/into an Element.

Author:
sanjin

Nested Class Summary
static class AuthorizationUnmarshaller.Builder
          Builder of AuthorizationUnmarshaller.
 
Field Summary
static String AUTHORIZATION_ELEMENT
          The local name of child Elements used in the ListUnmarshaller.Builder that is returned by the getListBuilder().
static String METHOD_ATTRIBUTE
          The name of attribute that holds marshalled name of AuthorizationMethod.
 
Constructor Summary
AuthorizationUnmarshaller(Element element)
          Creates instance of Authorization Unmarshaller which uses specified Element for unmarshalling and/or marshalling.
 
Method Summary
 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)
          Marshalls specified Authorization into the Element.
 void remove()
          Removes any marshalled Authorization from the Element.
 Authorization unmarshal()
          Unmarshalls an Authorization from the Element.
 Attribute[] unmarshalAttributes()
          Unmarshalls Authorization Attributes from the Element.
 String unmarshalMethod()
          Unmarshalls 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 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 String METHOD_ATTRIBUTE
The name of attribute that holds marshalled name of AuthorizationMethod.

See Also:
Constant Field Values
Constructor Detail

AuthorizationUnmarshaller

public AuthorizationUnmarshaller(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:
NullPointerException - if specified Element is null.
Method Detail

getElement

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

Returns:
the Element used for unmarshalling and marshalling.

unmarshal

public Authorization unmarshal()
                        throws FailedUnmarshallingException
Unmarshalls an Authorization from the Element.

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

unmarshalMethod

public String unmarshalMethod()
                       throws FailedUnmarshallingException
Unmarshalls name of AuthorizationMethod from the Element.

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

unmarshalAttributes

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

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

marshal

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

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

remove

public void remove()
Removes any marshalled 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 and the strategy is set to Append.

Returns:
the ListUnmarshaller.Builder for Authorizations.


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