public class SalesforceAnalyticsManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SalesforceAnalyticsManager.SalesforceAnalyticsPublishingType
The available Salesforce analytics publishing types.
|
Modifier and Type | Method and Description |
---|---|
void |
addRemotePublisher(java.lang.Class<? extends Transform> transformer,
java.lang.Class<? extends AnalyticsPublisher> publisher)
Adds a remote publisher to publish events to.
|
static SalesforceAnalyticsManager.SalesforceAnalyticsPublishingType |
analyticsPublishingType()
The enabled Salesforce analytics publishing type.
|
void |
enableLogging(boolean enabled)
Disables or enables logging of events.
|
AnalyticsManager |
getAnalyticsManager()
Returns an instance of analytics manager.
|
static DeviceAppAttributes |
getDeviceAppAttributes()
Returns the device app attributes associated with this device.
|
EventStoreManager |
getEventStoreManager()
Returns an instance of event store manager.
|
static SalesforceAnalyticsManager |
getInstance(UserAccount account)
Returns the instance of this class associated with this user account.
|
static SalesforceAnalyticsManager |
getInstance(UserAccount account,
java.lang.String communityId)
Returns the instance of this class associated with this user and community.
|
static int |
getPublishFrequencyInHours()
Deprecated.
Planned for removal 13.0.
Use
getPublishPeriodicallyFrequencyHours() )}. |
static int |
getPublishPeriodicallyFrequencyHours()
Returns the publish frequency currently set, in hours.
|
static SalesforceAnalyticsManager |
getUnauthenticatedInstance()
Returns the instance of this class associated with an unauthenticated user context.
|
boolean |
isLoggingEnabled()
Returns whether logging is enabled or disabled.
|
void |
publishAllEvents()
Publishes all stored events to all registered network endpoints after
applying the required event format transforms.
|
void |
publishEvent(InstrumentationEvent event)
Publishes an event to all registered network endpoints after
applying the required event format transforms.
|
void |
publishEvents(java.lang.Iterable<InstrumentationEvent> events)
Publishes a list of events to all registered network endpoints after
applying the required event format transforms.
|
static void |
reset(UserAccount account)
Resets the instance of this class associated with this user account.
|
static void |
reset(UserAccount account,
java.lang.String communityId)
Resets the instance of this class associated with this user and community.
|
static void |
resetUnauthenticatedInstance()
Resets the instance of this class associated with an unauthenticated user context.
|
static void |
setAnalyticsPublishingType(SalesforceAnalyticsManager.SalesforceAnalyticsPublishingType value)
Sets the enabled Salesforce analytics publishing type.
|
static void |
setEventPublishBatchSize(int batchSize)
Set the batch size for publishing instrumentation events.
|
static void |
setPublishFrequencyInHours(int periodicBackgroundPublishingHoursInterval)
Deprecated.
Planned for removal 13.0.
Use
setPublishPeriodicallyFrequencyHours(int) )}. |
static void |
setPublishPeriodicallyFrequencyHours(int periodicBackgroundPublishingHoursInterval)
Sets the interval for periodic background publishing in hours.
|
void |
updateLoggingPrefs()
Updates the preferences of this library.
|
public static SalesforceAnalyticsManager getUnauthenticatedInstance()
public static SalesforceAnalyticsManager getInstance(UserAccount account)
account
- User account.public static SalesforceAnalyticsManager getInstance(UserAccount account, java.lang.String communityId)
account
- User account.communityId
- Community ID.public static void resetUnauthenticatedInstance()
public static void reset(UserAccount account)
account
- User account.public static void reset(UserAccount account, java.lang.String communityId)
account
- User account.communityId
- Community ID.public static void setPublishPeriodicallyFrequencyHours(int periodicBackgroundPublishingHoursInterval)
periodicBackgroundPublishingHoursInterval
- The interval for
periodic background
publishing in hours. It
is recommended to keep
this value under seven
dayssetAnalyticsPublishingType(SalesforceAnalyticsPublishingType)
@Deprecated public static void setPublishFrequencyInHours(int periodicBackgroundPublishingHoursInterval)
setPublishPeriodicallyFrequencyHours(int)
)}.public static SalesforceAnalyticsManager.SalesforceAnalyticsPublishingType analyticsPublishingType()
public static void setAnalyticsPublishingType(SalesforceAnalyticsManager.SalesforceAnalyticsPublishingType value)
value
- The Salesforce analytics publishing typepublic static void setEventPublishBatchSize(int batchSize)
batchSize
- Event batch sizepublic static int getPublishPeriodicallyFrequencyHours()
@Deprecated public static int getPublishFrequencyInHours()
getPublishPeriodicallyFrequencyHours()
)}.public EventStoreManager getEventStoreManager()
public AnalyticsManager getAnalyticsManager()
public void enableLogging(boolean enabled)
enabled
- True - if logging should be enabled, False - otherwise.public void updateLoggingPrefs()
public boolean isLoggingEnabled()
public void publishAllEvents()
public void publishEvents(java.lang.Iterable<InstrumentationEvent> events)
events
- Iterable of events.public void publishEvent(InstrumentationEvent event)
event
- Event.public void addRemotePublisher(java.lang.Class<? extends Transform> transformer, java.lang.Class<? extends AnalyticsPublisher> publisher)
transformer
- Transformer class.publisher
- Publisher class.public static DeviceAppAttributes getDeviceAppAttributes()