Tabnine Logo
Attribute
Code IndexAdd Tabnine to your IDE (free)

How to use
Attribute
in
org.jboss.as.logging

Best Java code snippets using org.jboss.as.logging.Attribute (Showing top 20 results out of 315)

origin: org.jboss.as/jboss-as-logging

private static String parsePatternFormatterElement(final XMLExtendedStreamReader reader) throws XMLStreamException {
  String pattern = null;
  final EnumSet<Attribute> required = EnumSet.of(Attribute.PATTERN);
  final int count = reader.getAttributeCount();
  for (int i = 0; i < count; i++) {
    requireNoNamespaceAttribute(reader, i);
    final String value = reader.getAttributeValue(i);
    final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
    required.remove(attribute);
    switch (attribute) {
      case PATTERN: {
        pattern = value;
        break;
      }
      default:
        throw unexpectedAttribute(reader, i);
    }
  }
  if (!required.isEmpty()) {
    throw missingRequired(reader, required);
  }
  requireNoContent(reader);
  return pattern;
}
origin: wildfly/wildfly-core

requireNoNamespaceAttribute(reader, i);
final String attrValue = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
  case NAME: {
throw missingRequired(reader, Collections.singleton(Attribute.NAME.getLocalName()));
origin: org.wildfly.core/wildfly-logging

/**
 * Reads the single {@code value} attribute from an element.
 *
 * @param reader the reader to use
 *
 * @return the value of the {@code value} attribute
 *
 * @throws XMLStreamException if the {@code value} attribute is not present, there is more than one attribute on the
 *                            element or there is content within the element.
 */
static String readValueAttribute(final XMLExtendedStreamReader reader) throws XMLStreamException {
  return readStringAttributeElement(reader, Attribute.VALUE.getLocalName());
}
origin: wildfly/wildfly-core

/**
 * Reads the single {@code value} attribute from an element.
 *
 * @param reader the reader to use
 *
 * @return the value of the {@code value} attribute
 *
 * @throws XMLStreamException if the {@code value} attribute is not present, there is more than one attribute on the
 *                            element or there is content within the element.
 */
static String readValueAttribute(final XMLExtendedStreamReader reader) throws XMLStreamException {
  return readStringAttributeElement(reader, Attribute.VALUE.getLocalName());
}
origin: org.wildfly.core/wildfly-logging

void parsePatternFormatterElement(final XMLExtendedStreamReader reader, final ModelNode operation) throws XMLStreamException {
  final EnumSet<Attribute> required = EnumSet.of(Attribute.PATTERN);
  final int count = reader.getAttributeCount();
  for (int i = 0; i < count; i++) {
    requireNoNamespaceAttribute(reader, i);
    final String value = reader.getAttributeValue(i);
    final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
    required.remove(attribute);
    switch (attribute) {
      case PATTERN: {
        PatternFormatterResourceDefinition.PATTERN.parseAndSetParameter(value, operation, reader);
        break;
      }
      case COLOR_MAP: {
        PatternFormatterResourceDefinition.COLOR_MAP.parseAndSetParameter(value, operation, reader);
        break;
      }
      default:
        throw unexpectedAttribute(reader, i);
    }
  }
  if (!required.isEmpty()) {
    throw missingRequired(reader, required);
  }
  requireNoContent(reader);
}
origin: org.wildfly.core/wildfly-logging

requireNoNamespaceAttribute(reader, i);
final String attrValue = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
  case NAME: {
throw missingRequired(reader, Collections.singleton(Attribute.NAME.getLocalName()));
origin: org.wildfly.core/wildfly-logging

/**
 * Reads the single {@code name} attribute from an element.
 *
 * @param reader the reader to use
 *
 * @return the value of the {@code name} attribute
 *
 * @throws XMLStreamException if the {@code name} attribute is not present, there is more than one attribute on the
 *                            element or there is content within the element.
 */
static String readNameAttribute(final XMLExtendedStreamReader reader) throws XMLStreamException {
  return readStringAttributeElement(reader, Attribute.NAME.getLocalName());
}
origin: org.jboss.as/jboss-as-logging

private static void parseFileElement(final ModelNode node, final XMLExtendedStreamReader reader) throws XMLStreamException {
  final EnumSet<Attribute> required = EnumSet.of(Attribute.PATH);
  final int count = reader.getAttributeCount();
  for (int i = 0; i < count; i++) {
    requireNoNamespaceAttribute(reader, i);
    final String value = reader.getAttributeValue(i);
    final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
    required.remove(attribute);
    switch (attribute) {
      case PATH: {
        PATH.parseAndSetParameter(value, node, reader);
        break;
      }
      case RELATIVE_TO: {
        RELATIVE_TO.parseAndSetParameter(value, node, reader);
        break;
      }
      default: {
        throw unexpectedAttribute(reader, i);
      }
    }
  }
  requireNoContent(reader);
}
origin: org.jboss.as/jboss-as-logging

requireNoNamespaceAttribute(reader, i);
final String attrValue = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
  case NAME: {
throw missingRequired(reader, Collections.singleton(Attribute.NAME.getLocalName()));
origin: wildfly/wildfly-core

/**
 * Reads the single {@code name} attribute from an element.
 *
 * @param reader the reader to use
 *
 * @return the value of the {@code name} attribute
 *
 * @throws XMLStreamException if the {@code name} attribute is not present, there is more than one attribute on the
 *                            element or there is content within the element.
 */
static String readNameAttribute(final XMLExtendedStreamReader reader) throws XMLStreamException {
  return readStringAttributeElement(reader, Attribute.NAME.getLocalName());
}
origin: wildfly/wildfly-core

void parsePatternFormatterElement(final XMLExtendedStreamReader reader, final ModelNode operation) throws XMLStreamException {
  final EnumSet<Attribute> required = EnumSet.of(Attribute.PATTERN);
  final int count = reader.getAttributeCount();
  for (int i = 0; i < count; i++) {
    requireNoNamespaceAttribute(reader, i);
    final String value = reader.getAttributeValue(i);
    final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
    required.remove(attribute);
    switch (attribute) {
      case PATTERN: {
        PatternFormatterResourceDefinition.PATTERN.parseAndSetParameter(value, operation, reader);
        break;
      }
      case COLOR_MAP: {
        PatternFormatterResourceDefinition.COLOR_MAP.parseAndSetParameter(value, operation, reader);
        break;
      }
      default:
        throw unexpectedAttribute(reader, i);
    }
  }
  if (!required.isEmpty()) {
    throw missingRequired(reader, required);
  }
  requireNoContent(reader);
}
origin: org.jboss.as/jboss-as-logging

requireNoNamespaceAttribute(reader, i);
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
required.remove(attribute);
switch (attribute) {
        requireSingleAttribute(reader, Attribute.SYSLOG_TYPE.getLocalName());
        model.get(SYSLOG_FORMATTER.getName()).set(readStringAttributeElement(reader, Attribute.SYSLOG_TYPE.getLocalName()));
        requireNoContent(reader);
        break;
origin: wildfly/wildfly-core

  @Override
  public void marshallAsElement(final AttributeDefinition attribute, final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException {
    if (isMarshallable(attribute, resourceModel, marshallDefault)) {
      writer.writeStartElement(AbstractHandlerDefinition.FORMATTER.getXmlName());
      writer.writeStartElement(attribute.getXmlName());
      final String content = resourceModel.get(attribute.getName()).asString();
      writer.writeAttribute(Attribute.SYSLOG_TYPE.getLocalName(), content);
      writer.writeEndElement();
      writer.writeEndElement();
    }
  }
})
origin: wildfly/wildfly-core

void parseFileElement(final ModelNode operation, final XMLExtendedStreamReader reader) throws XMLStreamException {
  final EnumSet<Attribute> required = EnumSet.of(Attribute.PATH);
  final int count = reader.getAttributeCount();
  for (int i = 0; i < count; i++) {
    requireNoNamespaceAttribute(reader, i);
    final String value = reader.getAttributeValue(i);
    final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
    required.remove(attribute);
    switch (attribute) {
      case PATH: {
        PATH.parseAndSetParameter(value, operation, reader);
        break;
      }
      case RELATIVE_TO: {
        RELATIVE_TO.parseAndSetParameter(value, operation, reader);
        break;
      }
      default: {
        throw unexpectedAttribute(reader, i);
      }
    }
  }
  requireNoContent(reader);
}
origin: wildfly/wildfly-core

requireNoNamespaceAttribute(reader, i);
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
required.remove(attribute);
switch (attribute) {
        requireSingleAttribute(reader, Attribute.SYSLOG_TYPE.getLocalName());
        operation.get(SYSLOG_FORMATTER.getName()).set(readStringAttributeElement(reader, Attribute.SYSLOG_TYPE.getLocalName()));
        requireNoContent(reader);
        break;
origin: org.wildfly.core/wildfly-logging

  @Override
  public void marshallAsElement(final AttributeDefinition attribute, final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException {
    if (isMarshallable(attribute, resourceModel, marshallDefault)) {
      writer.writeStartElement(AbstractHandlerDefinition.FORMATTER.getXmlName());
      writer.writeStartElement(attribute.getXmlName());
      final String content = resourceModel.get(attribute.getName()).asString();
      writer.writeAttribute(Attribute.SYSLOG_TYPE.getLocalName(), content);
      writer.writeEndElement();
      writer.writeEndElement();
    }
  }
})
origin: org.wildfly.core/wildfly-logging

void parseFileElement(final ModelNode operation, final XMLExtendedStreamReader reader) throws XMLStreamException {
  final EnumSet<Attribute> required = EnumSet.of(Attribute.PATH);
  final int count = reader.getAttributeCount();
  for (int i = 0; i < count; i++) {
    requireNoNamespaceAttribute(reader, i);
    final String value = reader.getAttributeValue(i);
    final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
    required.remove(attribute);
    switch (attribute) {
      case PATH: {
        PATH.parseAndSetParameter(value, operation, reader);
        break;
      }
      case RELATIVE_TO: {
        RELATIVE_TO.parseAndSetParameter(value, operation, reader);
        break;
      }
      default: {
        throw unexpectedAttribute(reader, i);
      }
    }
  }
  requireNoContent(reader);
}
origin: org.wildfly.core/wildfly-logging

requireNoNamespaceAttribute(reader, i);
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
required.remove(attribute);
switch (attribute) {
        requireSingleAttribute(reader, Attribute.SYSLOG_TYPE.getLocalName());
        operation.get(SYSLOG_FORMATTER.getName()).set(readStringAttributeElement(reader, Attribute.SYSLOG_TYPE.getLocalName()));
        requireNoContent(reader);
        break;
origin: org.jboss.as/jboss-as-logging

  @Override
  public void marshallAsElement(final AttributeDefinition attribute, final ModelNode resourceModel, final boolean marshallDefault, final XMLStreamWriter writer) throws XMLStreamException {
    if (isMarshallable(attribute, resourceModel, marshallDefault)) {
      writer.writeStartElement(CommonAttributes.FORMATTER.getXmlName());
      writer.writeStartElement(attribute.getXmlName());
      final String content = resourceModel.get(attribute.getName()).asString();
      writer.writeAttribute(Attribute.SYSLOG_TYPE.getLocalName(), content);
      writer.writeEndElement();
      writer.writeEndElement();
    }
  }
})
origin: wildfly/wildfly-core

requireNoNamespaceAttribute(reader, i);
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
required.remove(attribute);
switch (attribute) {
org.jboss.as.loggingAttribute

Most used methods

  • forName
  • getLocalName
    Get the local name of this attribute.

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now