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)Activates the component. | 
| void | applicationStarted(ComponentContext context)Notify the component that Nuxeo Framework finished starting all Nuxeo bundles. | 
| protected com.github.segmentio.models.Options | buildOptions()Build common options for identify and track calls. | 
| protected void | computeEvent2Mappers() | 
| void | deactivate(ComponentContext context)Deactivates the component. | 
| 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) | 
| boolean | isDebugMode() | 
| 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, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterContribution, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetApplicationStartedOrderprotected 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 SegmentIOComponent()
public org.osgi.framework.Bundle getBundle()
public void activate(ComponentContext context)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic void deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void applicationStarted(ComponentContext context)
ComponentComponent.start(ComponentContext) and
 Component.stop(ComponentContext) methodsapplicationStarted in interface Componentprotected 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)
public List<Map<String,Object>> getTestData()
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 SegmentIOpublic boolean isDebugMode()
isDebugMode in interface SegmentIOCopyright © 2018 Nuxeo. All rights reserved.