streamWriter.writeCharacters("\n "); streamWriter.writeStartElement("attribute"); streamWriter.writeAttribute("name", entry.getKey()); streamWriter.writeAttribute("value", value); streamWriter.writeEndElement();
/** * Construct a new instance copying mappings from an original attributes collection. * * @param original the original collection */ public MapAttributes(Attributes original) { Assert.checkNotNullParam("original", original); Map<String, EntriesList> map = new HashMap<>(original.size()); for (Entry entry : original.entries()) { final EntriesList entriesList = new EntriesList(entry); if (! entriesList.isEmpty()) map.put(entry.getKey(), entriesList); } this.map = map; }
streamWriter.writeCharacters("\n "); streamWriter.writeStartElement("attribute"); streamWriter.writeAttribute("name", entry.getKey()); streamWriter.writeAttribute("value", value); streamWriter.writeEndElement();
streamWriter.writeCharacters("\n "); streamWriter.writeStartElement("attribute"); streamWriter.writeAttribute("name", entry.getKey()); streamWriter.writeAttribute("value", value); streamWriter.writeEndElement();
streamWriter.writeCharacters("\n "); streamWriter.writeStartElement("attribute"); streamWriter.writeAttribute("name", entry.getKey()); streamWriter.writeAttribute("value", value); streamWriter.writeEndElement();
ModelNode attributesModel = result.get(ATTRIBUTES); for (Attributes.Entry e : attributes.entries()) { ModelNode entry = attributesModel.get(e.getKey()); for (String s : e) { entry.add(s);
ModelNode attributesModel = result.get(ATTRIBUTES); for (Attributes.Entry e : attributes.entries()) { ModelNode entry = attributesModel.get(e.getKey()); for (String s : e) { entry.add(s);
ModelNode entryNode = attributesNode.get(entry.getKey()).setEmptyList(); for (String s : entry) { entryNode.add(s);
@Override protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { String principalName = IDENTITY.resolveModelAttribute(context, operation).asString(); ModifiableRealmIdentity realmIdentity = getRealmIdentity(context, principalName); try { AuthorizationIdentity identity = realmIdentity.getAuthorizationIdentity(); ModelNode result = context.getResult(); result.get(ElytronDescriptionConstants.NAME).set(principalName); ModelNode attributesNode = result.get(ElytronDescriptionConstants.ATTRIBUTES); for (Attributes.Entry entry : identity.getAttributes().entries()) { ModelNode entryNode = attributesNode.get(entry.getKey()).setEmptyList(); for (String s : entry) { entryNode.add(s); } } } catch (RealmUnavailableException e) { throw ROOT_LOGGER.couldNotReadIdentity(principalName, e); } } }
/** * Construct a new instance copying mappings from an original attributes collection. * * @param original the original collection */ public MapAttributes(Attributes original) { Assert.checkNotNullParam("original", original); Map<String, EntriesList> map = new HashMap<>(original.size()); for (Entry entry : original.entries()) { final EntriesList entriesList = new EntriesList(entry); if (! entriesList.isEmpty()) map.put(entry.getKey(), entriesList); } this.map = map; }
/** * Construct a new instance copying mappings from an original attributes collection. * * @param original the original collection */ public MapAttributes(Attributes original) { Assert.checkNotNullParam("original", original); Map<String, EntriesList> map = new HashMap<>(original.size()); for (Entry entry : original.entries()) { final EntriesList entriesList = new EntriesList(entry); if (! entriesList.isEmpty()) map.put(entry.getKey(), entriesList); } this.map = map; }
/** * Construct a new instance copying mappings from an original attributes collection. * * @param original the original collection */ public MapAttributes(Attributes original) { Assert.checkNotNullParam("original", original); Map<String, EntriesList> map = new HashMap<>(original.size()); for (Entry entry : original.entries()) { final EntriesList entriesList = new EntriesList(entry); if (! entriesList.isEmpty()) map.put(entry.getKey(), entriesList); } this.map = map; }