/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * <p> * This is the same as {@code isMarshallable(resourceModel, true)}. * </p> * @param attribute - attribute for which marshaling is being done * @param resourceModel the model, a non-null node of {@link org.jboss.dmr.ModelType#OBJECT}. * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link AttributeDefinition#getName()} () name}. */ public boolean isMarshallable(final AttributeDefinition attribute,final ModelNode resourceModel) { return isMarshallable(attribute,resourceModel, true); }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * <p> * This is the same as {@code isMarshallable(resourceModel, true)}. * </p> * @param attribute - attribute for which marshaling is being done * @param resourceModel the model, a non-null node of {@link org.jboss.dmr.ModelType#OBJECT}. * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link AttributeDefinition#getName()} () name}. */ public boolean isMarshallable(final AttributeDefinition attribute,final ModelNode resourceModel) { return isMarshallable(attribute,resourceModel, true); }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * <p> * This is the same as {@code isMarshallable(resourceModel, true)}. * </p> * @param attribute - attribute for which marshaling is being done * @param resourceModel the model, a non-null node of {@link org.jboss.dmr.ModelType#OBJECT}. * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link AttributeDefinition#getName()} () name}. */ public boolean isMarshallable(final AttributeDefinition attribute,final ModelNode resourceModel) { return isMarshallable(attribute,resourceModel, true); }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * * @param resourceModel the model, a non-null node of {@link ModelType#OBJECT}. * @param marshallDefault {@code true} if the value should be marshalled even if it matches the default value * * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link #getName()} () name} * and {@code marshallDefault} is {@code true} or that value differs from this attribute's {@link #getDefaultValue() default value}. */ public boolean isMarshallable(final ModelNode resourceModel, final boolean marshallDefault) { return attributeMarshaller.isMarshallable(this, resourceModel, marshallDefault); }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * * @param resourceModel the model, a non-null node of {@link ModelType#OBJECT}. * @param marshallDefault {@code true} if the value should be marshalled even if it matches the default value * * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link #getName()} () name} * and {@code marshallDefault} is {@code true} or that value differs from this attribute's {@link #getDefaultValue() default value}. */ public boolean isMarshallable(final ModelNode resourceModel, final boolean marshallDefault) { return attributeMarshaller.isMarshallable(this, resourceModel, marshallDefault); }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * <p> * This is the same as {@code isMarshallable(resourceModel, true)}. * </p> * @param attribute - attribute for which marshaling is being done * @param resourceModel the model, a non-null node of {@link org.jboss.dmr.ModelType#OBJECT}. * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link AttributeDefinition#getName()} () name}. */ public boolean isMarshallable(final AttributeDefinition attribute,final ModelNode resourceModel) { return isMarshallable(attribute,resourceModel, true); }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * <p> * This is the same as {@code isMarshallable(resourceModel, true)}. * </p> * * @param resourceModel the model, a non-null node of {@link ModelType#OBJECT}. * * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link #getName()} () name}. */ public boolean isMarshallable(final ModelNode resourceModel) { return attributeMarshaller.isMarshallable(this, resourceModel, true); }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * <p> * This is the same as {@code isMarshallable(resourceModel, true)}. * </p> * * @param resourceModel the model, a non-null node of {@link ModelType#OBJECT}. * * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link #getName()} () name}. */ public boolean isMarshallable(final ModelNode resourceModel) { return attributeMarshaller.isMarshallable(this, resourceModel, true); }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * * @param resourceModel the model, a non-null node of {@link ModelType#OBJECT}. * @param marshallDefault {@code true} if the value should be marshalled even if it matches the default value * * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link #getName()} () name} * and {@code marshallDefault} is {@code true} or that value differs from this attribute's {@link #getDefaultValue() default value}. */ public boolean isMarshallable(final ModelNode resourceModel, final boolean marshallDefault) { return getMarshaller().isMarshallable(this, resourceModel, marshallDefault); }
@Override public void marshallAsElement(ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException { if (attributeMarshaller.isMarshallable(this,resourceModel,marshallDefault)){ attributeMarshaller.marshallAsElement(this, resourceModel, marshallDefault, writer); } }
private boolean isMarshallable(AttributeDefinition[] valueTypes, ModelNode element){ for (AttributeDefinition valueType : valueTypes) { if (valueType.getMarshaller().isMarshallable(valueType, element)){ return true; } } return false; }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * * @param resourceModel the model, a non-null node of {@link ModelType#OBJECT}. * @param marshallDefault {@code true} if the value should be marshalled even if it matches the default value * * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link #getName()} () name} * and {@code marshallDefault} is {@code true} or that value differs from this attribute's {@link #getDefaultValue() default value}. */ public boolean isMarshallable(final ModelNode resourceModel, final boolean marshallDefault) { return getMarshaller().isMarshallable(this, resourceModel, marshallDefault); }
private boolean isMarshallable(AttributeDefinition[] valueTypes, ModelNode element){ for (AttributeDefinition valueType : valueTypes) { if (valueType.getMarshaller().isMarshallable(valueType, element)){ return true; } } return false; }
@Override public void marshallAsElement(ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException { if (attributeMarshaller.isMarshallable(this,resourceModel,marshallDefault)){ attributeMarshaller.marshallAsElement(this, resourceModel, marshallDefault, writer); } }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * <p> * This is the same as {@code isMarshallable(resourceModel, true)}. * </p> * * @param resourceModel the model, a non-null node of {@link ModelType#OBJECT}. * * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link #getName()} () name}. */ public boolean isMarshallable(final ModelNode resourceModel) { return getMarshaller().isMarshallable(this, resourceModel, true); }
/** * Gets whether the given {@code resourceModel} has a value for this attribute that should be marshalled to XML. * <p> * This is the same as {@code isMarshallable(resourceModel, true)}. * </p> * * @param resourceModel the model, a non-null node of {@link ModelType#OBJECT}. * * @return {@code true} if the given {@code resourceModel} has a defined value under this attribute's {@link #getName()} () name}. */ public boolean isMarshallable(final ModelNode resourceModel) { return getMarshaller().isMarshallable(this, resourceModel, true); }
@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(ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException { if (getMarshaller().isMarshallable(this,resourceModel,marshallDefault)){ getMarshaller().marshallAsElement(this, resourceModel, marshallDefault, writer); } }
if (marshaller.isMarshallable(ad, model, marshallDefaultValues)) { if (!started && group != null) { if (elementAds != null) {
if (marshaller.isMarshallable(ad, model, marshallDefaultValues)) { if (!started && group != null) { if (elementAds != null) {