01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package mx4j.tools.remote.soap.axis.ser;
10:
11: import java.util.ArrayList;
12: import java.util.List;
13: import javax.management.relation.Role;
14:
15: import org.apache.axis.Constants;
16: import org.xml.sax.SAXException;
17:
18: /**
19: * @version $Revision: 1.3 $
20: */
21: public class RoleDeser extends AxisDeserializer {
22: String roleName;
23: List roleValue = new ArrayList();
24:
25: public void onSetChildValue(Object value, Object hint)
26: throws SAXException {
27: if (RoleSer.ROLE_NAME.equals(hint))
28: roleName = (String) value;
29: if (Constants.QNAME_LITERAL_ITEM.getLocalPart().equals(hint))
30: roleValue.add(value);
31: }
32:
33: protected Object createObject() throws SAXException {
34: return new Role(roleName, roleValue);
35: }
36: }
|