Package org.bedework.synch.shared.cnctrs
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.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.bedework.synch.shared.cnctrs.ConnectorInstance
ConnectorInstance.ItemInfo, ConnectorInstance.SynchItemsInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ietf.params.xml.ns.icalendar_2.IcalendarTypeprotected final ietf.params.xml.ns.icalendar_2.ObjectFactoryprotected Stringprotected Map<String,BaseConnectorInstance.MapEntry> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseConnectorInstance(Subscription sub, org.bedework.synch.wsmessages.SynchEndType end, InfoT info, CnctrT cnctr, ConfigT config) -
Method Summary
Modifier and TypeMethodDescriptionorg.oasis_open.docs.ws_calendar.ns.soap.AddItemResponseTypeaddItem(ietf.params.xml.ns.icalendar_2.IcalendarType val) Add a calendar componentprotected booleanorg.oasis_open.docs.ws_calendar.ns.soap.DeleteItemResponseTypedeleteItem(String uid) Delete a calendar component.org.oasis_open.docs.ws_calendar.ns.soap.FetchItemResponseTypeFetch a calendar component.List<org.oasis_open.docs.ws_calendar.ns.soap.FetchItemResponseType>fetchItems(List<String> uids) Fetch a batch of calendar components.final StringgetHttpChangeToken(org.apache.http.client.methods.CloseableHttpResponse hresp) abstract booleangetIcal()protected booleanGet information about items in the subscribed calendar.<T extends ietf.params.xml.ns.icalendar_2.TextPropertyType>
StringgetText(Class<T> cl, javax.xml.bind.JAXBElement<? extends ietf.params.xml.ns.icalendar_2.BaseComponentType> comp, QName tag) abstract URIgetUri()abstract ietf.params.xml.ns.icalendar_2.IcalendarTypemakeXcal(InputStream is) org.oasis_open.docs.ws_calendar.ns.soap.UpdateItemResponseTypeupdateItem(org.oasis_open.docs.ws_calendar.ns.soap.UpdateItemType updates) Update a calendar component.Methods inherited from class org.bedework.synch.shared.cnctrs.AbstractConnectorInstance
getClient, getConnector, getLastCrudCts, getLogger, getSubInfo, getTotalCrudCts, open, setLastCrudCts, setTotalCrudCts, subscribe, unsubscribe, validateActiveSubInfo, validateSubInfoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bedework.synch.shared.cnctrs.ConnectorInstance
changedMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
-
Field Details
-
fetchedIcal
protected ietf.params.xml.ns.icalendar_2.IcalendarType fetchedIcal -
prodid
-
of
protected final ietf.params.xml.ns.icalendar_2.ObjectFactory of -
uidMap
-
-
Constructor Details
-
Method Details
-
getUri
- Throws:
SynchException
-
makeXcal
public abstract ietf.params.xml.ns.icalendar_2.IcalendarType makeXcal(InputStream is) throws SynchException - Throws:
SynchException
-
getIcal
- 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:ConnectorInstanceAdd 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:ConnectorInstanceUpdate 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:ConnectorInstanceDelete 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:ConnectorInstanceFetch 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:ConnectorInstanceFetch 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
- Throws:
SynchException
-
getItemsInfo
Description copied from interface:ConnectorInstanceGet information about items in the subscribed calendar. Used for initial synch.- Returns:
- List of items - never null, maybe empty.
- Throws:
SynchException
-
getText
-
getIcal
- Throws:
SynchException
-
getHttpChangeToken
-