@Override public TombstoneCallbackResult getTombstoneCallbackResult() { TombstoneCallbackResult tombstoneCallbackResult = new TombstoneCallbackResult(); tombstoneCallbackResult.setDeletedEntriesData(deletedEntities); tombstoneCallbackResult.setDeltaLink(this.deltaLink); return tombstoneCallbackResult; }
@Override public String toString() { return super.toString() + "\n\t" + feed.toString(); } }
@Override public TombstoneCallbackResult getTombstoneCallbackResult() { TombstoneCallbackResult jpaTombstoneCallBackResult = new TombstoneCallbackResult(); jpaTombstoneCallBackResult.setDeltaLink(buildToken()); return jpaTombstoneCallBackResult; }
private void appendDeletedEntries(final XMLStreamWriter writer, final EntityInfoAggregator eia, final TombstoneCallback callback) throws EntityProviderException { TombstoneCallbackResult callbackResult = callback.getTombstoneCallbackResult(); List<Map<String, Object>> tombstoneData = callbackResult.getDeletedEntriesData(); if (tombstoneData != null) { TombstoneProducer tombstoneProducer = new TombstoneProducer(); tombstoneProducer.appendTombstones(writer, eia, properties, tombstoneData); } String deltaLink = callbackResult.getDeltaLink(); if (deltaLink != null) { try { writer.writeStartElement(FormatXml.ATOM_LINK); writer.writeAttribute(FormatXml.ATOM_REL, FormatXml.ATOM_DELTA_LINK); writer.writeAttribute(FormatXml.ATOM_HREF, deltaLink); writer.writeEndElement(); } catch (XMLStreamException e) { throw new EntityProviderProducerException(EntityProviderException.COMMON, e); } } }
/** * Do the callback based on given parameters. * * @param readProperties * @param navigationProperty * @param callback * @param isFeed * @param entry * @throws EntityProviderException */ private void doCallback(final EntityProviderReadProperties readProperties, final EdmNavigationProperty navigationProperty, final OnReadInlineContent callback, final boolean isFeed, final Object content) throws EntityProviderException { try { if (isFeed) { ReadFeedResult callbackInfo = new ReadFeedResult(readProperties, navigationProperty, (ODataFeed) content); callback.handleReadFeed(callbackInfo); } else { ReadEntryResult callbackInfo = new ReadEntryResult(readProperties, navigationProperty, (ODataEntry) content); callback.handleReadEntry(callbackInfo); } } catch (ODataApplicationException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } }
private void appendDeltaLink(final TombstoneCallback callback, final JsonStreamWriter jsonStreamWriter) throws IOException { if (callback != null) { TombstoneCallbackResult callbackResult = callback.getTombstoneCallbackResult(); String deltaLink = callbackResult.getDeltaLink(); if (deltaLink != null) { jsonStreamWriter.separator().namedStringValue(FormatJson.DELTA, deltaLink); } } } }
private void appendDeletedEntries(final Writer writer, final EntityInfoAggregator entityInfo, final List<Map<String, Object>> data, TombstoneCallback callback) throws EntityProviderException { JsonDeletedEntryEntityProducer deletedEntryProducer = new JsonDeletedEntryEntityProducer(properties); TombstoneCallbackResult callbackResult = callback.getTombstoneCallbackResult(); List<Map<String, Object>> deletedEntries = callbackResult.getDeletedEntriesData(); if (deletedEntries != null) { deletedEntryProducer.append(writer, entityInfo, deletedEntries, data.isEmpty()); } }
private ODataEntityProviderPropertiesBuilder getInlineEntityProviderProperties(WriteCallbackContext context, List<Boolean> inlineInfo2) throws EdmException{ ODataEntityProviderPropertiesBuilder propertiesBuilder = EntityProviderWriteProperties.serviceRoot(baseUri); propertiesBuilder.callbacks(getCallbacks(baseUri, context.getCurrentExpandSelectTreeNode(), inlineInfo2, isMultiOrigin)); propertiesBuilder.expandSelectTree(context.getCurrentExpandSelectTreeNode()); //Disabled metadata Validation need to apply condition once patch is provided propertiesBuilder.validatingFacets(false); return propertiesBuilder; }
private void appendDeletedEntries(final XMLStreamWriter writer, final EntityInfoAggregator eia, final TombstoneCallback callback) throws EntityProviderException { TombstoneCallbackResult callbackResult = callback.getTombstoneCallbackResult(); List<Map<String, Object>> tombstoneData = callbackResult.getDeletedEntriesData(); if (tombstoneData != null) { TombstoneProducer tombstoneProducer = new TombstoneProducer(); tombstoneProducer.appendTombstones(writer, eia, properties, tombstoneData); } String deltaLink = callbackResult.getDeltaLink(); if (deltaLink != null) { try { writer.writeStartElement(FormatXml.ATOM_LINK); writer.writeAttribute(FormatXml.ATOM_REL, FormatXml.ATOM_DELTA_LINK); writer.writeAttribute(FormatXml.ATOM_HREF, deltaLink); writer.writeEndElement(); } catch (XMLStreamException e) { throw new EntityProviderException(EntityProviderException.COMMON, e); } } }
@Override public String toString() { return super.toString() + "\n\t" + entry.toString(); } }
private void appendDeltaLink(final TombstoneCallback callback, final JsonStreamWriter jsonStreamWriter) throws IOException { if (callback != null) { TombstoneCallbackResult callbackResult = callback.getTombstoneCallbackResult(); String deltaLink = callbackResult.getDeltaLink(); if (deltaLink != null) { jsonStreamWriter.separator().namedStringValue(FormatJson.DELTA, deltaLink); } } } }
private void appendDeletedEntries(final Writer writer, final EntityInfoAggregator entityInfo, final List<Map<String, Object>> data, TombstoneCallback callback) throws EntityProviderException { JsonDeletedEntryEntityProducer deletedEntryProducer = new JsonDeletedEntryEntityProducer(properties); TombstoneCallbackResult callbackResult = callback.getTombstoneCallbackResult(); List<Map<String, Object>> deletedEntries = callbackResult.getDeletedEntriesData(); if (deletedEntries != null) { deletedEntryProducer.append(writer, entityInfo, deletedEntries, data.isEmpty()); } }
@Override public TombstoneCallbackResult getTombstoneCallbackResult() { TombstoneCallbackResult jpaTombstoneCallBackResult = new TombstoneCallbackResult(); jpaTombstoneCallBackResult.setDeltaLink(buildToken()); return jpaTombstoneCallBackResult; }
private void appendDeletedEntries(final XMLStreamWriter writer, final EntityInfoAggregator eia, final TombstoneCallback callback) throws EntityProviderException { TombstoneCallbackResult callbackResult = callback.getTombstoneCallbackResult(); List<Map<String, Object>> tombstoneData = callbackResult.getDeletedEntriesData(); if (tombstoneData != null) { TombstoneProducer tombstoneProducer = new TombstoneProducer(); tombstoneProducer.appendTombstones(writer, eia, properties, tombstoneData); } String deltaLink = callbackResult.getDeltaLink(); if (deltaLink != null) { try { writer.writeStartElement(FormatXml.ATOM_LINK); writer.writeAttribute(FormatXml.ATOM_REL, FormatXml.ATOM_DELTA_LINK); writer.writeAttribute(FormatXml.ATOM_HREF, deltaLink); writer.writeEndElement(); } catch (XMLStreamException e) { throw new EntityProviderProducerException(EntityProviderException.COMMON, e); } } }
@Override public String toString() { return super.toString() + "\n\t" + entry.toString(); } /**
@Override public String toString() { return super.toString() + "\n\t" + feed.toString(); } /**
@Override public String toString() { return super.toString() + "\n\t" + entry.toString(); } /**
@Override public String toString() { return super.toString() + "\n\t" + feed.toString(); } /**
@Override public String toString() { return super.toString() + "\n\t" + feed.toString(); } /**
@Override public String toString() { return super.toString() + "\n\t" + entry.toString(); } /**