private static void writeElement(XMLExtendedStreamWriter writer, ModelNode model, Attribute attribute) throws XMLStreamException { attribute.getDefinition().getMarshaller().marshallAsElement(attribute.getDefinition(), model, true, writer); }
private static void writeElement(XMLExtendedStreamWriter writer, ModelNode model, Attribute attribute) throws XMLStreamException { attribute.getDefinition().getMarshaller().marshallAsElement(attribute.getDefinition(), model, false, writer); } }
private static void writeElement(XMLExtendedStreamWriter writer, ModelNode model, Attribute attribute) throws XMLStreamException { attribute.getDefinition().getMarshaller().marshallAsElement(attribute.getDefinition(), model, true, writer); } }
@Override public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException { assert attribute instanceof ObjectListAttributeDefinition; ObjectListAttributeDefinition list = ((ObjectListAttributeDefinition) attribute); ObjectTypeAttributeDefinition objectType = (ObjectTypeAttributeDefinition) CustomMarshaller.getValueType(list, ObjectListAttributeDefinition.class); AttributeDefinition[] valueTypes = CustomMarshaller.getValueTypes(list, ObjectTypeAttributeDefinition.class); if (resourceModel.hasDefined(attribute.getName())) { writer.writeStartElement(attribute.getXmlName()); for (ModelNode element: resourceModel.get(attribute.getName()).asList()) { writer.writeStartElement(objectType.getXmlName()); for (AttributeDefinition valueType : valueTypes) { valueType.getAttributeMarshaller().marshallAsElement(valueType, element, false, writer); } writer.writeEndElement(); } writer.writeEndElement(); } } }
@Override public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException { assert attribute instanceof ObjectListAttributeDefinition; ObjectListAttributeDefinition list = ((ObjectListAttributeDefinition) attribute); ObjectTypeAttributeDefinition objectType = (ObjectTypeAttributeDefinition) CustomMarshaller.getValueType(list, ObjectListAttributeDefinition.class); AttributeDefinition[] valueTypes = CustomMarshaller.getValueTypes(list, ObjectTypeAttributeDefinition.class); if (resourceModel.hasDefined(attribute.getName())) { writer.writeStartElement(attribute.getXmlName()); for (ModelNode element: resourceModel.get(attribute.getName()).asList()) { writer.writeStartElement(objectType.getXmlName()); for (AttributeDefinition valueType : valueTypes) { valueType.getAttributeMarshaller().marshallAsElement(valueType, element, false, writer); } writer.writeEndElement(); } writer.writeEndElement(); } } }
@Override public void marshallAsElement(AttributeDefinition attribute, ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException { assert attribute instanceof ObjectListAttributeDefinition; ObjectListAttributeDefinition list = ((ObjectListAttributeDefinition) attribute); ObjectTypeAttributeDefinition objectType = (ObjectTypeAttributeDefinition) CustomMarshaller.getValueType(list, ObjectListAttributeDefinition.class); AttributeDefinition[] valueTypes = CustomMarshaller.getValueTypes(list, ObjectTypeAttributeDefinition.class); if (resourceModel.hasDefined(attribute.getName())) { writer.writeStartElement(attribute.getXmlName()); for (ModelNode element: resourceModel.get(attribute.getName()).asList()) { writer.writeStartElement(objectType.getXmlName()); for (AttributeDefinition valueType : valueTypes) { valueType.getAttributeMarshaller().marshallAsElement(valueType, element, false, writer); } writer.writeEndElement(); } writer.writeEndElement(); } } }
/** * {@inheritDoc} * * This implementation marshalls the attribute value as text content of the element. */ public void marshallAsElement(final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException { attributeMarshaller.marshallAsElement(this,resourceModel,marshallDefault,writer); }
/** * {@inheritDoc} * * This implementation marshalls the attribute value as text content of the element. */ public void marshallAsElement(final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException { attributeMarshaller.marshallAsElement(this,resourceModel,marshallDefault,writer); }
/** * {@inheritDoc} * * This implementation marshalls the attribute value as text content of the element. * @param marshallDefault * @throws javax.xml.stream.XMLStreamException */ @Deprecated @Override public void marshallAsElement(final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException { getMarshaller().marshallAsElement(this, resourceModel, marshallDefault, writer); }
private static void writeElement(XMLExtendedStreamWriter writer, ModelNode model, AttributeDefinition attribute) throws XMLStreamException { attribute.getAttributeMarshaller().marshallAsElement(attribute, model, true, writer); } }
@Override public void marshallAsElement(ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException { if (attributeMarshaller.isMarshallable(this,resourceModel,marshallDefault)){ attributeMarshaller.marshallAsElement(this, resourceModel, marshallDefault, writer); } }
@Override public void marshallAsElement(ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException { if (attributeMarshaller.isMarshallable(this,resourceModel,marshallDefault)){ attributeMarshaller.marshallAsElement(this, resourceModel, marshallDefault, writer); } }
/** * {@inheritDoc} * * This implementation marshalls the attribute value as text content of the element. * @param marshallDefault * @throws javax.xml.stream.XMLStreamException */ @Deprecated @Override public void marshallAsElement(final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException { getMarshaller().marshallAsElement(this, resourceModel, marshallDefault, writer); }
public void marshall(final AttributeDefinition attribute,final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException { if (isMarshallableAsElement()){ marshallAsElement(attribute,resourceModel, marshallDefault, writer); }else{ marshallAsAttribute(attribute, resourceModel, marshallDefault, writer); } }
public void marshall(final AttributeDefinition attribute,final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException { if (isMarshallableAsElement()){ marshallAsElement(attribute,resourceModel, marshallDefault, writer); }else{ marshallAsAttribute(attribute, resourceModel, marshallDefault, writer); } }
@Override public void marshallAsElement(ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException { if (getMarshaller().isMarshallable(this,resourceModel,marshallDefault)){ getMarshaller().marshallAsElement(this, resourceModel, marshallDefault, writer); } }
@Override public void marshallAsElement(final ModelNode resourceModel, final boolean marshalDefault, final XMLStreamWriter writer) throws XMLStreamException { if (resourceModel.hasDefined(getName())) { writer.writeStartElement(getXmlName()); for (ModelNode handler : resourceModel.get(getName()).asList()) { valueType.getMarshaller().marshallAsElement(this, handler, true, writer); } writer.writeEndElement(); } }
private static void writeElement(XMLExtendedStreamWriter writer, ModelNode model, Attribute attribute) throws XMLStreamException { attribute.getDefinition().getMarshaller().marshallAsElement(attribute.getDefinition(), model, false, writer); } }
@Override public void marshallAsElement(final ModelNode resourceModel, final boolean marshalDefault, final XMLStreamWriter writer) throws XMLStreamException { if (resourceModel.hasDefined(getName())) { writer.writeStartElement(getXmlName()); for (ModelNode handler : resourceModel.get(getName()).asList()) { valueType.getMarshaller().marshallAsElement(this, handler, true, writer); } writer.writeEndElement(); } }
@Override public void marshallAsElement(ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException { if (getMarshaller().isMarshallable(this,resourceModel,marshallDefault)){ getMarshaller().marshallAsElement(this, resourceModel, marshallDefault, writer); } }