/** * Tries to read the current XML element. * * @param reader the reader * @return true is the current element was read, false otherwise * @throws Exception the exception */ @Override public boolean tryReadCurrentXmlElement(EwsXmlReader reader) throws Exception { if (!super.tryReadCurrentXmlElement(reader)) { if (reader.getLocalName().equals(XmlElementNames.User)) { this.user.loadFromXml(reader); return true; } else if (reader.getLocalName().equals(XmlElementNames.Account)) { this.account.loadFromXml(reader); return true; } else { reader.skipCurrentElement(); return false; } } else { return true; } }
/** * Load from XML. * * @param reader The reader. * @throws Exception the exception */ protected void loadFromXml(EwsXmlReader reader) throws Exception { do { reader.read(); if (reader.getNodeType().getNodeType() == XmlNodeType.START_ELEMENT) { if (reader.getLocalName().equals(XmlElementNames.DisplayName)) { this.displayName = reader.readElementValue(); } else if (reader.getLocalName().equals( XmlElementNames.LegacyDN)) { this.legacyDN = reader.readElementValue(); } else if (reader.getLocalName().equals( XmlElementNames.DeploymentId)) { this.deploymentId = reader.readElementValue(); } else { reader.skipCurrentElement(); } } } while (!reader.isEndElement(XmlNamespace.NotSpecified, XmlElementNames.User)); }
/** * Loads web client urls from XML. * * @param reader The reader. * @param webClientUrls The web client urls. * @param elementName Name of the element. * @throws Exception */ private static void loadWebClientUrlsFromXml(EwsXmlReader reader, WebClientUrlCollection webClientUrls, String elementName) throws Exception { do { reader.read(); if (reader.getNodeType().getNodeType() == XmlNodeType.START_ELEMENT) { if (reader.getLocalName().equals(XmlElementNames.OWAUrl)) { String authMethod = reader.readAttributeValue( XmlAttributeNames.AuthenticationMethod); String owaUrl = reader.readElementValue(); WebClientUrl webClientUrl = new WebClientUrl(authMethod, owaUrl); webClientUrls.getUrls().add(webClientUrl); } else { reader.skipCurrentElement(); } } } while (!reader.isEndElement(XmlNamespace.NotSpecified, elementName)); }
this.alternateMailboxes.getEntries().add(alternateMailbox); } else { reader.skipCurrentElement();
error.debugData = reader.readElementValue(); } else { reader.skipCurrentElement();
/** * Loads the settings from XML. * * @param reader the reader * @throws Exception the exception */ public void loadFromXml(EwsXmlReader reader) throws Exception { reader.readStartElement(XmlNamespace.NotSpecified, XmlElementNames.Autodiscover); reader.readStartElement(XmlNamespace.NotSpecified, XmlElementNames.Response); do { reader.read(); if (reader.isStartElement()) { if (!this.tryReadCurrentXmlElement(reader)) { reader.skipCurrentElement(); } } } while (!reader.isEndElement(XmlNamespace.NotSpecified, XmlElementNames.Response)); reader.readEndElement(XmlNamespace.NotSpecified, XmlElementNames.Autodiscover); }
this.groupingInformation = reader.readElementValue(); } else { reader.skipCurrentElement();
/** * Tries to read the current XML element. * * @param reader the reader * @return true is the current element was read, false otherwise * @throws Exception the exception */ @Override public boolean tryReadCurrentXmlElement(EwsXmlReader reader) throws Exception { if (!super.tryReadCurrentXmlElement(reader)) { if (reader.getLocalName().equals(XmlElementNames.User)) { this.user.loadFromXml(reader); return true; } else if (reader.getLocalName().equals(XmlElementNames.Account)) { this.account.loadFromXml(reader); return true; } else { reader.skipCurrentElement(); return false; } } else { return true; } }
/** * Load from XML. * * @param reader The reader. * @throws Exception the exception */ protected void loadFromXml(EwsXmlReader reader) throws Exception { do { reader.read(); if (reader.getNodeType().getNodeType() == XmlNodeType.START_ELEMENT) { if (reader.getLocalName().equals(XmlElementNames.DisplayName)) { this.displayName = reader.readElementValue(); } else if (reader.getLocalName().equals( XmlElementNames.LegacyDN)) { this.legacyDN = reader.readElementValue(); } else if (reader.getLocalName().equals( XmlElementNames.DeploymentId)) { this.deploymentId = reader.readElementValue(); } else { reader.skipCurrentElement(); } } } while (!reader.isEndElement(XmlNamespace.NotSpecified, XmlElementNames.User)); }
/** * Loads web client urls from XML. * * @param reader The reader. * @param webClientUrls The web client urls. * @param elementName Name of the element. * @throws Exception */ private static void loadWebClientUrlsFromXml(EwsXmlReader reader, WebClientUrlCollection webClientUrls, String elementName) throws Exception { do { reader.read(); if (reader.getNodeType().getNodeType() == XmlNodeType.START_ELEMENT) { if (reader.getLocalName().equals(XmlElementNames.OWAUrl)) { String authMethod = reader.readAttributeValue( XmlAttributeNames.AuthenticationMethod); String owaUrl = reader.readElementValue(); WebClientUrl webClientUrl = new WebClientUrl(authMethod, owaUrl); webClientUrls.getUrls().add(webClientUrl); } else { reader.skipCurrentElement(); } } } while (!reader.isEndElement(XmlNamespace.NotSpecified, elementName)); }
error.debugData = reader.readElementValue(); } else { reader.skipCurrentElement();
this.alternateMailboxes.getEntries().add(alternateMailbox); } else { reader.skipCurrentElement();
/** * Loads the settings from XML. * * @param reader the reader * @throws Exception the exception */ public void loadFromXml(EwsXmlReader reader) throws Exception { reader.readStartElement(XmlNamespace.NotSpecified, XmlElementNames.Autodiscover); reader.readStartElement(XmlNamespace.NotSpecified, XmlElementNames.Response); do { reader.read(); if (reader.isStartElement()) { if (!this.tryReadCurrentXmlElement(reader)) { reader.skipCurrentElement(); } } } while (!reader.isEndElement(XmlNamespace.NotSpecified, XmlElementNames.Response)); reader.readEndElement(XmlNamespace.NotSpecified, XmlElementNames.Autodiscover); }
this.groupingInformation = reader.readElementValue(); } else { reader.skipCurrentElement();