public class SegmentIOComponent extends DefaultComponent implements SegmentIO
| Modifier and Type | Field and Description |
|---|---|
protected org.osgi.framework.Bundle |
bundle |
protected SegmentIOConfig |
config |
static String |
CONFIG_EP |
protected boolean |
debugMode |
protected static String |
DEFAULT_DEBUG_KEY |
protected Map<String,List<SegmentIOMapper>> |
event2Mappers |
static String |
FILTERS_EP |
protected com.github.segmentio.flush.Flusher |
flusher |
static String |
INTEGRATIONS_EP |
protected SegmentIOIntegrations |
integrationsConfig |
protected static org.apache.commons.logging.Log |
log |
static String |
MAPPER_EP |
protected Map<String,SegmentIOMapper> |
mappers |
protected List<Map<String,Object>> |
testData |
protected SegmentIOUserFilter |
userFilters |
static String |
WRITE_KEY |
lastModified| Constructor and Description |
|---|
SegmentIOComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(ComponentContext context) |
void |
applicationStarted(ComponentContext context) |
protected com.github.segmentio.models.Options |
buildOptions()
Build common options for identify and track calls.
|
protected void |
computeEvent2Mappers() |
void |
deactivate(ComponentContext context) |
void |
flush() |
Map<String,List<SegmentIOMapper>> |
getAllMappers() |
org.osgi.framework.Bundle |
getBundle() |
protected com.github.segmentio.flush.Flusher |
getFlusher() |
Map<String,String> |
getGlobalParameters() |
Map<String,Boolean> |
getIntegrations() |
Set<String> |
getMappedEvents() |
Map<String,List<SegmentIOMapper>> |
getMappers(List<String> events) |
List<Map<String,Object>> |
getTestData() |
SegmentIOUserFilter |
getUserFilters() |
String |
getWriteKey() |
protected void |
group(String groupId,
String userId,
com.github.segmentio.models.Traits traits,
com.github.segmentio.models.Options options) |
void |
identify(NuxeoPrincipal principal) |
void |
identify(NuxeoPrincipal principal,
Map<String,Serializable> metadata) |
protected boolean |
mustTrackprincipal(String principalName) |
protected Map<String,Object> |
pushForTest(String action,
String userId,
Map<String,Object> metadata,
com.github.segmentio.models.Options options) |
protected void |
pushForTest(String action,
String userId,
String eventName,
Map<String,Object> metadata,
com.github.segmentio.models.Options options) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
track(NuxeoPrincipal principal,
String eventName) |
void |
track(NuxeoPrincipal principal,
String eventName,
Map<String,Serializable> metadata) |
getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterContribution, unregisterExtensionprotected static org.apache.commons.logging.Log log
protected static final String DEFAULT_DEBUG_KEY
public static final String WRITE_KEY
public static final String CONFIG_EP
public static final String MAPPER_EP
public static final String INTEGRATIONS_EP
public static final String FILTERS_EP
protected boolean debugMode
protected Map<String,SegmentIOMapper> mappers
protected Map<String,List<SegmentIOMapper>> event2Mappers
protected SegmentIOConfig config
protected SegmentIOIntegrations integrationsConfig
protected SegmentIOUserFilter userFilters
protected org.osgi.framework.Bundle bundle
protected com.github.segmentio.flush.Flusher flusher
public org.osgi.framework.Bundle getBundle()
public void activate(ComponentContext context)
activate in interface Componentactivate in class DefaultComponentpublic void deactivate(ComponentContext context)
deactivate in interface Componentdeactivate in class DefaultComponentpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void applicationStarted(ComponentContext context)
applicationStarted in interface ComponentapplicationStarted in class DefaultComponentprotected void computeEvent2Mappers()
public String getWriteKey()
getWriteKey in interface SegmentIOpublic Map<String,String> getGlobalParameters()
getGlobalParameters in interface SegmentIOprotected com.github.segmentio.flush.Flusher getFlusher()
public void identify(NuxeoPrincipal principal)
public Map<String,Boolean> getIntegrations()
getIntegrations in interface SegmentIOprotected com.github.segmentio.models.Options buildOptions()
Options objectpublic void identify(NuxeoPrincipal principal, Map<String,Serializable> metadata)
protected void group(String groupId, String userId, com.github.segmentio.models.Traits traits, com.github.segmentio.models.Options options)
protected Map<String,Object> pushForTest(String action, String userId, Map<String,Object> metadata, com.github.segmentio.models.Options options)
protected void pushForTest(String action, String userId, String eventName, Map<String,Object> metadata, com.github.segmentio.models.Options options)
protected boolean mustTrackprincipal(String principalName)
public void track(NuxeoPrincipal principal, String eventName)
public void track(NuxeoPrincipal principal, String eventName, Map<String,Serializable> metadata)
public Map<String,List<SegmentIOMapper>> getMappers(List<String> events)
getMappers in interface SegmentIOpublic Set<String> getMappedEvents()
getMappedEvents in interface SegmentIOpublic Map<String,List<SegmentIOMapper>> getAllMappers()
getAllMappers in interface SegmentIOpublic SegmentIOUserFilter getUserFilters()
getUserFilters in interface SegmentIOCopyright © 2019 Nuxeo SA. All rights reserved.