congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
JAXRConstants$Attribute
Code IndexAdd Tabnine to your IDE (free)

How to use
JAXRConstants$Attribute
in
org.jboss.as.jaxr.extension

Best Java code snippets using org.jboss.as.jaxr.extension.JAXRConstants$Attribute (Showing top 6 results out of 315)

origin: wildfly/wildfly

private ModelNode parseProperty(XMLExtendedStreamReader reader, PathAddress parent) throws XMLStreamException {
  // Handle attributes
  String name = null;
  String value = null;
  int count = reader.getAttributeCount();
  for (int i = 0; i < count; i++) {
    requireNoNamespaceAttribute(reader, i);
    final String attrValue = reader.getAttributeValue(i);
    final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
    switch (attribute) {
      case NAME: {
        name = attrValue;
        break;
      }
      case VALUE: {
        value = attrValue;
        break;
      }
      default:
        throw unexpectedAttribute(reader, i);
    }
  }
  if (name == null) { throw missingRequired(reader, Collections.singleton(Attribute.NAME)); }
  if (value == null) { throw missingRequired(reader, Collections.singleton(Attribute.VALUE)); }
  requireNoContent(reader);
  final PathAddress address = parent.append(ModelDescriptionConstants.PROPERTY, name);
  ModelNode propNode = Util.createAddOperation(address);
  propNode.get(ModelDescriptionConstants.VALUE).set(value);
  return propNode;
}
origin: wildfly/wildfly

private List<ModelNode> parseJuddiServer(XMLExtendedStreamReader reader, PathAddress parent) throws XMLStreamException {
  List<ModelNode> result = new ArrayList<ModelNode>();
  Set<Attribute> required = EnumSet.of(Attribute.PUBLISH_URL, Attribute.QUERY_URL);
  int count = reader.getAttributeCount();
  for (int i = 0; i < count; i++) {
    requireNoNamespaceAttribute(reader, i);
    final String attrValue = reader.getAttributeValue(i);
    final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
    required.remove(attribute);
    switch (attribute) {
      case PUBLISH_URL: {
        ModelNode propOp = Util.createAddOperation(parent.append(ModelDescriptionConstants.PROPERTY, "javax.xml.registry.lifeCycleManagerURL"));
        VALUE.parseAndSetParameter(attrValue, propOp, reader);
        result.add(propOp);
        break;
      }
      case QUERY_URL: {
        ModelNode propOp = Util.createAddOperation(parent.append(ModelDescriptionConstants.PROPERTY, "javax.xml.registry.queryManagerURL"));
        VALUE.parseAndSetParameter(attrValue, propOp, reader);
        result.add(propOp);
        break;
      }
      default:
        throw unexpectedAttribute(reader, i);
    }
  }
  if (required.size() > 0) { throw missingRequired(reader, required); }
  requireNoContent(reader);
  return result;
}
origin: wildfly/wildfly

private void parseBinding1_1(XMLExtendedStreamReader reader, ModelNode addOp) throws XMLStreamException {
  // Handle attributes
  String jndiName = null;
  int count = reader.getAttributeCount();
  for (int i = 0; i < count; i++) {
    requireNoNamespaceAttribute(reader, i);
    final String attrValue = reader.getAttributeValue(i);
    final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
    switch (attribute) {
      case JNDI_NAME: {
        jndiName = attrValue;
        CONNECTION_FACTORY_ATTRIBUTE.parseAndSetParameter(jndiName, addOp, reader);
        break;
      }
      case CLASS: {
        CONNECTION_FACTORY_IMPL_ATTRIBUTE.parseAndSetParameter(attrValue, addOp, reader);
        break;
      }
      default:
        throw unexpectedAttribute(reader, i);
    }
  }
  if (jndiName == null) { throw missingRequired(reader, Collections.singleton(Attribute.JNDI_NAME)); }
  requireNoContent(reader);
}
origin: wildfly/wildfly

@Override
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException {
  context.startSubsystemElement(Namespace.CURRENT.getUriString(), false);
  ModelNode node = context.getModelNode();
  // write connection-factory
  writer.writeStartElement(Element.CONNECTION_FACTORY.getLocalName());
  JAXRSubsystemRootResource.CONNECTION_FACTORY_ATTRIBUTE.marshallAsAttribute(node, writer);
  JAXRSubsystemRootResource.CONNECTION_FACTORY_IMPL_ATTRIBUTE.marshallAsAttribute(node, writer);
  writer.writeEndElement();
  ModelNode properties = node.get(ModelDescriptionConstants.PROPERTY);
  if (properties.isDefined()) {
    writer.writeStartElement(Element.PROPERTIES.getLocalName());
    for (String key : properties.keys()) {
      writer.writeStartElement(Element.PROPERTY.getLocalName());
      writer.writeAttribute(Attribute.NAME.getLocalName(), key);
      JAXRPropertyDefinition.VALUE.marshallAsAttribute(properties.get(key), writer);
      writer.writeEndElement();
    }
    writer.writeEndElement();
  }
  writer.writeEndElement();
}
origin: wildfly/wildfly

private void parseBinding1_0(XMLExtendedStreamReader reader, ModelNode addOp) throws XMLStreamException {
  // Handle attributes
  String jndiName = null;
  int count = reader.getAttributeCount();
  for (int i = 0; i < count; i++) {
    requireNoNamespaceAttribute(reader, i);
    final String attrValue = reader.getAttributeValue(i);
    final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
    switch (attribute) {
      case JNDI_NAME: {
        jndiName = attrValue;
        CONNECTION_FACTORY_ATTRIBUTE.parseAndSetParameter(jndiName, addOp, reader);
        break;
      }
      default:
        throw unexpectedAttribute(reader, i);
    }
  }
  if (jndiName == null) { throw missingRequired(reader, Collections.singleton(Attribute.JNDI_NAME)); }
  requireNoContent(reader);
}
origin: wildfly/wildfly

  public String toString() {
    return getLocalName();
  }
}
org.jboss.as.jaxr.extensionJAXRConstants$Attribute

Most used methods

  • forName
  • getLocalName

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Best plugins for Eclipse
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