Class BaseConnectorInstance<CnctrT extends AbstractConnector,InfoT extends BaseSubscriptionInfo,ConfigT extends ConnectorConfigI>

java.lang.Object
org.bedework.synch.shared.cnctrs.AbstractConnectorInstance<CnctrT,InfoT,ConfigT>
org.bedework.synch.shared.cnctrs.BaseConnectorInstance<CnctrT,InfoT,ConfigT>
All Implemented Interfaces:
ConnectorInstance<InfoT>, org.bedework.util.logging.Logged

public abstract class BaseConnectorInstance<CnctrT extends AbstractConnector,InfoT extends BaseSubscriptionInfo,ConfigT extends ConnectorConfigI> extends AbstractConnectorInstance<CnctrT,InfoT,ConfigT>
User: mike Date: 3/12/18 Time: 21:32 Basic implementation with some commonly used methods.
  • Field Details

    • fetchedIcal

      protected ietf.params.xml.ns.icalendar_2.IcalendarType fetchedIcal
    • prodid

      protected String prodid
    • of

      protected final ietf.params.xml.ns.icalendar_2.ObjectFactory of
    • uidMap

  • Constructor Details

    • BaseConnectorInstance

      protected BaseConnectorInstance(Subscription sub, org.bedework.synch.wsmessages.SynchEndType end, InfoT info, CnctrT cnctr, ConfigT config)
  • Method Details

    • getUri

      public abstract URI getUri() throws SynchException
      Throws:
      SynchException
    • makeXcal

      public abstract ietf.params.xml.ns.icalendar_2.IcalendarType makeXcal(InputStream is) throws SynchException
      Throws:
      SynchException
    • getIcal

      public abstract boolean getIcal() throws SynchException
      Throws:
      SynchException
    • addItem

      public org.oasis_open.docs.ws_calendar.ns.soap.AddItemResponseType addItem(ietf.params.xml.ns.icalendar_2.IcalendarType val) throws SynchException
      Description copied from interface: ConnectorInstance
      Add a calendar component
      Returns:
      response
      Throws:
      SynchException
    • updateItem

      public org.oasis_open.docs.ws_calendar.ns.soap.UpdateItemResponseType updateItem(org.oasis_open.docs.ws_calendar.ns.soap.UpdateItemType updates) throws SynchException
      Description copied from interface: ConnectorInstance
      Update a calendar component.
      Parameters:
      updates - has the change token, href, and the component selection fields set.
      Returns:
      response
      Throws:
      SynchException
    • deleteItem

      public org.oasis_open.docs.ws_calendar.ns.soap.DeleteItemResponseType deleteItem(String uid) throws SynchException
      Description copied from interface: ConnectorInstance
      Delete a calendar component.
      Parameters:
      uid - - of the component to delete.
      Returns:
      response
      Throws:
      SynchException
    • fetchItem

      public org.oasis_open.docs.ws_calendar.ns.soap.FetchItemResponseType fetchItem(String uid) throws SynchException
      Description copied from interface: ConnectorInstance
      Fetch a calendar component. The uid is required as a key as it is the only value which is guaranteed to be available at both ends.
      Parameters:
      uid - of item
      Returns:
      response
      Throws:
      SynchException
    • fetchItems

      public List<org.oasis_open.docs.ws_calendar.ns.soap.FetchItemResponseType> fetchItems(List<String> uids) throws SynchException
      Description copied from interface: ConnectorInstance
      Fetch a batch of calendar components. The number and order of the result set must match that of the parameter uids.
      Parameters:
      uids - of items
      Returns:
      responses
      Throws:
      SynchException
    • changed

      protected boolean changed(boolean headSupported, String contentType) throws SynchException
      Throws:
      SynchException
    • getItemsInfo

      public ConnectorInstance.SynchItemsInfo getItemsInfo() throws SynchException
      Description copied from interface: ConnectorInstance
      Get information about items in the subscribed calendar. Used for initial synch.
      Returns:
      List of items - never null, maybe empty.
      Throws:
      SynchException
    • getText

      public <T extends ietf.params.xml.ns.icalendar_2.TextPropertyType> String getText(Class<T> cl, javax.xml.bind.JAXBElement<? extends ietf.params.xml.ns.icalendar_2.BaseComponentType> comp, QName tag)
    • getIcal

      protected boolean getIcal(String contentType) throws SynchException
      Throws:
      SynchException
    • getHttpChangeToken

      public final String getHttpChangeToken(org.apache.http.client.methods.CloseableHttpResponse hresp)