Class StreamThing
- All Implemented Interfaces:
ISupportsAccessModifier
,IConfigurableObject
,INotScriptFriendly
,ISupportsDeprecation
,IDiffableObject
,IAlertProvider
,IAvatar
,IEntityLifeCycleEvent
,IEventMetadataProvider
,IEventProvider
,IPersistable
,IPropertyProvider
,IServiceMetadataProvider
,IServiceProvider
,IShapeProvider
,ITaggableObject
,IDependencyScannableObject
,IImportDependencyHandler
,IData
,IDynamicServiceShape
,IHierarchicalEntity
,IEntityDefinition
,IPersistableObject<String>
,IDesignTimeSecurable
,IDesignTimeSecurableEntity
,IRunTimeSecurable
,IRunTimeSecurableEntity
,ISecurable
,IVisibilitySecurable
,IVisibilitySecurableEntity
,IStream
,IEventProcessor
,IAspectContainer
,IFeed
,INamedObject
,Serializable
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected static org.slf4j.Logger
static final int
Fields inherited from class com.thingworx.datastorage.DataThing
DATA_THING_SETTINGS, PERSISTENCE_PROVIDER, PERSISTENCE_PROVIDER_DESCRIPTION
Fields inherited from class com.thingworx.things.Thing
BUILT_IN_PROPERTY_DEFINITIONS, DATASHAPE_INCOMING_LOCAL_PROPERTY_BINDING, DEFAULT_SETTINGS_TABLE, ENTITYLIST_SHAPE, GENERIC_THING_TEMPLATE, NON_PROPERTY_BASED_EVENTS, PROPERTY_EVENTS, TYPE_THING
Fields inherited from class com.thingworx.entities.RootEntity
BASIC_PROPERTY_DEFINITIONS, EXCLUDED_ENTITY_TYPES_IN_PROJECT
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
AddStreamEntries
(InfoTable values) Service Category: StreamEntries Service Description: Add multiple stream entries.void
addStreamEntry
(org.joda.time.DateTime timestamp, Location location, String source, String sourceType, TagCollection tags, ValueCollection values) void
AddStreamEntry
(org.joda.time.DateTime timestamp, Location location, String source, String sourceType, TagCollection tags, InfoTable values) Service Category: StreamEntries Service Description: Add a new stream entry.void
addStreamEntryImmediately
(org.joda.time.DateTime timestamp, Location location, String source, String sourceType, TagCollection tags, ValueCollection values) Service Category: Values Service Description: Create an empty info table of the correct datashape for this stream.CreateValuesWithData
(org.json.JSONObject values) Service Category: Values Service Description: Create an info table of the correct datashape for this stream and include data values.void
DeleteStreamEntry
(String streamEntryId) Service Category: StreamEntries Service Description: Delete a specific stream entry given a stream entry ID.void
dispose()
Service Category: DataShape Service Description: Get the currently assigned data shape.getEntryIterator
(Timespan timespan)
Returns an iterator over all entries inside this stream thing added over the provided timespan.Service Category: Fields Service Description: Retrieve a list of field names for the data shape associated with this stream.GetFieldNamesByType
(String type) Service Category: Fields Service Description: Retrieve a list of field names for the data shape associated with this stream, of a specific type.GetStreamData
(Double maxItems, Boolean oldestFirst) Service Category: Queries Service Description: Get all stream data (no entry detail).GetStreamEntries
(Double maxItems, Boolean oldestFirst) Service Category: Queries Service Description: Get all stream entries (without data).GetStreamEntriesWithData
(Double maxItems, Boolean oldestFirst) Service Category: Queries Service Description: Get all stream entries (with data).GetStreamEntry
(String streamEntryId) Service Category: StreamEntries Service Description: Retrieve a specific stream entry given a stream entry ID.Service Category: StreamEntries Service Description: Retrieve a count of stream entries.void
initializeThing
(ContextType contextType) void
PurgeStreamEntries
(org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean immediate) Service Category: Maintenance Service Description: Purge stream entries for a specified date range.QueryStreamData
(Double maxItems, String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean oldestFirst, org.json.JSONObject query) Service Category: Queries Service Description: Query stream data (no stream entry details), along with filter and sort criteria.QueryStreamEntries
(Double maxItems, String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean oldestFirst, org.json.JSONObject query) Service Category: Queries Service Description: Query stream entries (without data), along with filter and sort criteria.QueryStreamEntriesWithData
(Double maxItems, String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean oldestFirst, org.json.JSONObject query) Service Category: Queries Service Description: Query stream entries (with data), along with filter and sort criteria.void
SetDataShape
(String name) Service Category: DataShape Service Description: Sets the currently assigned data shape.void
UpdateStreamEntry
(String streamEntryId, Location location, String source, TagCollection tags, InfoTable values) Service Category: StreamEntries Service Description: Update an existing stream entry.void
validateConfiguration
(ImportedEntityCollection importedEntityCollections) Methods inherited from class com.thingworx.datastorage.DataThing
GetPersistenceProvider, SetPersistenceProvider
Methods inherited from class com.thingworx.things.Thing
AcknowledgeAlert, acknowledgeAlertByProperty, acknowledgeAlertByPropertyAndName, acknowledgeAllAlerts, AcknowledgeAllAlerts, AddBooleanValueStreamEntry, AddBooleanValueStreamEntry, AddDateTimeValueStreamEntry, AddDateTimeValueStreamEntry, AddDynamicSubscription, AddEventDefinition, AddImageValueStreamEntry, AddImageValueStreamEntry, AddInfoTableValueStreamEntry, AddInfoTableValueStreamEntry, AddIntegerValueStreamEntry, AddIntegerValueStreamEntry, AddLocationValueStreamEntry, AddLocationValueStreamEntry, AddLongValueStreamEntry, AddLongValueStreamEntry, AddNumberValueStreamEntry, AddNumberValueStreamEntry, AddOrUpdateAlert, addProperty, AddPropertyDefinition, AddPropertyDefinition, AddPropertyDefinition, AddPropertyDefinition, AddPropertyDefinitions, AddPropertyTransformDefinition, AddServiceDefinition, AddServiceDefinition, AddStringValueStreamEntry, AddStringValueStreamEntry, AddTags, AddThingCodeValueStreamEntry, AddThingCodeValueStreamEntry, AddVec2ValueStreamEntry, AddVec2ValueStreamEntry, AddVec3ValueStreamEntry, AddVec3ValueStreamEntry, AddVec4ValueStreamEntry, AddVec4ValueStreamEntry, checkDemandRead, checkPropertyName, checkValueStream, cleanupThing, DisableAlertsForProperty, DisableAllAlerts, DisableSubscription, DisableSubscription, DisableThing, dispatchBackgroundEvent, dispatchEvent, EnableAlertsForProperty, EnableAllAlerts, EnableSubscription, EnableSubscription, EnableThing, fireEvent, getAlertConfigurations, GetAlertDefinition, GetAlertDefinitions, getAlerts, getAlertsForProperty, GetAlertStatus, GetAlertStatuses, GetAlertStatusesForProperty, GetAlertSummary, GetAlertSummaryForProperty, GetAllAnomalyAlertTrainingStatistics, getAllImplementedThingShapes, getAllImplementedThingTemplates, GetAnomalyAlertTrainingStatisticsForAlert, GetAnomalyAlertTrainingStatisticsForProperty, GetAvatar, GetBooleanAlertParameter, GetBooleanPropertyValue, GetDateTimeAlertParameter, GetDateTimePropertyValue, getEffectiveAlertConfiguration, getEffectiveAlertDefinition, getEffectiveEventDefinition, getEffectiveIdentifier, GetEffectiveLocalPropertyBinding, getEffectiveLocalPropertyBindings, GetEffectiveLocalPropertyBindings, getEffectivePropertyDefinition, GetEffectivePropertyLogging, getEffectiveRemoteEventBindings, getEffectiveRemotePropertyBindings, getEffectiveRemoteServiceBindings, getEffectiveServiceDefinition, getEffectiveValueStreamName, getEntityType, GetHomeMashup, getIdentifier, GetIdentifier, GetImagePropertyValue, GetImplementedShapes, getImplementedThingTemplates, GetIncomingLocalPropertyBinding, GetIncomingLocalPropertyBindings, getInstanceEventDefinition, getInstanceEventDefinitions, getInstanceMultiEventSubscriptions, getInstancePropertyDefinition, getInstancePropertyDefinitionIfVisible, getInstancePropertyDefinitions, getInstancePublicServiceDefinitions, getInstanceServiceDefinition, getInstanceServiceDefinitions, getInstanceShape, getInstanceSubscriptions, GetIntegerAlertParameter, GetIntegerPropertyValue, GetLocalAlertDefinitions, GetLocallyImplementedShapes, GetLocalPropertyBinding, GetLocationAlertParameter, GetLocationPropertyValue, GetLoggedProperties, GetLongAlertParameter, GetLongPropertyValue, GetMashups, GetNamedProperties, GetNamedPropertyValues, GetNamedPropertyValuesVTQ, GetNamedPropertyValuesVTQA, GetNetworks, GetNumberAlertParameter, GetNumberPropertyValue, GetNumericLoggedProperties, getProperties, getProperty, getPropertyAckStatus, getPropertyAlertStatus, GetPropertyLogging, getPropertyQuality, GetPropertyQuality, getPropertyTime, GetPropertyTime, getPropertyType, getPropertyValue, getPropertyValue, getPropertyValues, GetPropertyValues, getPropertyValuesAsInfoTable, GetPropertyValuesAsMultiRowTable, GetPropertyValuesVTQ, GetPropertyValuesVTQA, GetPublished, GetRemoteEventBinding, GetRemotePropertyBinding, GetRemoteServiceBinding, getState, GetStringAlertParameter, GetStringPropertyValue, GetThingCodePropertyValue, GetThingGroupDelegatedVisibilityPermissions, GetThingRelationships, GetThingSummaryInformation, getThingTemplate, GetThingTemplate, getThingTemplateName, GetValueStream, getValueStreamName, GetVec2PropertyValue, GetVec3PropertyValue, GetVec4PropertyValue, HasAlert, hasEventDefinition, hasLocalEventDefinition, hasLocalPropertyDefinition, hasLocalServiceDefinition, hasProperty, hasPropertyAndIsVisible, hasPropertyDefinition, hasServiceDefinition, HavePropertiesChangedSince, implementsShape, ImplementsShape, implementsTemplate, initializeEntity, initializeProperty, isAlwaysAvailableService, isBuiltInEvent, isBuiltInProperty, IsDerivedFromTemplate, IsDynamicSubscriptionCreated, isEnabled, IsEnabled, isEventRemote, isExternallySubscribed, IsInNetwork, isLocallySubscribed, isLocalProperty, isPropertyEvent, isPropertyRemote, isPublished, isRunning, isServiceRemote, isSubscribed, preprocessSetPropertyVTQ, processAPIServiceRequest, processServiceRequest, processStartNotification, PurgeAllPropertyHistory, PurgePropertyHistory, PurgeSelectedPropertyHistory, QueryAlertHistory, QueryAlertSummary, QueryBooleanPropertyHistory, QueryBooleanPropertyHistory, QueryDateTimePropertyHistory, QueryDateTimePropertyHistory, QueryImagePropertyHistory, QueryImagePropertyHistory, QueryInfoTablePropertyHistory, QueryInfoTablePropertyHistory, QueryIntegerPropertyHistory, QueryIntegerPropertyHistory, QueryLocationPropertyHistory, QueryLocationPropertyHistory, QueryLongPropertyHistory, QueryLongPropertyHistory, QueryNamedPropertyHistory, QueryNamedPropertyHistory, QueryNamedPropertyHistory, QueryNumberPropertyHistory, QueryNumberPropertyHistory, QueryPropertyHistory, QueryPropertyHistory, QueryPropertyHistory, QueryStringPropertyHistory, QueryStringPropertyHistory, QueryThingCodePropertyHistory, QueryThingCodePropertyHistory, QueryVec2PropertyHistory, QueryVec2PropertyHistory, QueryVec3PropertyHistory, QueryVec3PropertyHistory, QueryVec4PropertyHistory, QueryVec4PropertyHistory, QueuePostCommitEvent, RemoveAlert, RemoveDynamicSubscription, RemoveEventDefinition, RemoveLocalPropertyBinding, RemovePropertyDefinition, RemoveRemoteEventBinding, RemoveRemotePropertyBinding, RemoveRemoteServiceBinding, RemoveServiceDefinition, RestartThing, SetBooleanAlertParameter, SetDateTimeAlertParameter, SetDescription, SetIdentifier, SetIntegerAlertParameter, SetLocalPropertyBinding, SetLocalPropertyBinding, SetLocationAlertParameter, SetNumberAlertParameter, SetPropertyLogging, setPropertyValue, SetPropertyValues, setPropertyVTQ, setPropertyVTQ, SetPublished, SetRemoteEventBinding, SetRemotePropertyBinding, SetRemotePropertyBinding, SetRemoteServiceBinding, SetStringAlertParameter, SetTags, setThingTemplateName, SetUnitsForNumericPropertyDefinition, SetValueStream, startThing, stopThing, UpdatePropertyValues, UpdatePropertyValuesBatched, WritePropertiesToStream
Methods inherited from class com.thingworx.entities.RootEntity
AddConfigurationTableDefinition, AddConfigurationTableDefinition, addDesignTimePermission, AddDesignTimePermission, addRunTimePermission, AddRunTimePermission, addVisibilityPermission, AddVisibilityPermission, CheckDesignTimePermission, CheckDesignTimePermissionForGroup, CheckDesignTimePermissionForUser, CheckPermission, CheckPermissionForGroup, CheckPermissionForUser, cleanupEntity, DeleteAllConfigurationTableRows, DeleteConfigurationTable, DeleteConfigurationTableRows, DeleteConfigurationTableRows, deleteDesignTimePermission, DeleteDesignTimePermission, deleteRunTimePermission, DeleteRunTimePermission, deleteVisibilityPermission, DeleteVisibilityPermission, getAspects, getAvatarContent, GetAvatarURL, GetConfigurationChangeHistory, getConfigurationSetting, getConfigurationTable, GetConfigurationTable, GetConfigurationTableDefinition, GetConfigurationTableRow, GetConfigurationTables, GetDescription, getDesignTimePermissions, GetDesignTimePermissions, GetDesignTimePermissionsAsJSON, getDocumentationContent, getEntityTypeAsString, GetEventDefinition, GetEventDefinitions, GetIncomingDependencies, GetIncomingDependenciesAsNetwork, GetInstanceMetadataAsJSON, GetInstanceMetadataWithPermissionsAsJSON, GetLastModifiedDate, GetMetadata, GetMetadataAsJSON, GetMetadataWithPermissionsAsJSON, GetOutgoingDependencies, GetOutgoingDependenciesAsNetwork, getOwner, GetOwner, GetPermissionsForCurrentUser, GetPermissionsForGroup, GetPermissionsForUser, GetProjectName, GetPropertyDefinition, GetPropertyDefinitions, getRunTimePermissions, GetRunTimePermissions, GetRunTimePermissionsAsJSON, GetServiceDefinition, GetServiceDefinitions, getStringConfigurationSetting, getStringConfigurationSettingWithDefault, GetSummaryInformation, getTags, GetTags, GetTagsAsInfoTable, getVisibilityPermissions, GetVisibilityPermissions, GetVisibilityPermissionsAsJSON, HasIncomingDependencies, HasOutgoingDependencies, isEditable, isEditableExtensionObject, isEditableSystemObject, isExtensionObject, IsMultiRowTable, isOwner, isSystemObject, isThemeObject, isVisible, isVisible, ListDeprecatedUsage, persistDesignTimePermissions, persistRunTimePermissions, persistVisibilityPermissions, preInitializeEntity, RemoveTags, SaveConfigurationTables, SetAvatar, setConfigurationSetting, SetConfigurationTable, SetConfigurationTableRows, setDesignTimePermissions, SetDesignTimePermissionsAsJSON, setDocumentationContent, setExtensionObject, SetHomeMashup, setLastModifiedDate, SetMultiRowConfigurationTable, setOwner, SetOwner, SetProjectName, setRunTimePermissions, SetRunTimePermissionsAsJSON, setStringConfigurationSetting, setVisibilityPermissions, SetVisibilityPermissionsAsJSON, toJSON, toJSONDefinition, UpdateProjectDependencies
Methods inherited from class com.thingworx.persistence.common.PersistableNamedObject
getID, hasID, isTransient
Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.thingworx.types.INamedObject
getDescription
Methods inherited from interface com.thingworx.entities.interfaces.IPersistable
getID, hasID
Methods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getName
Methods inherited from interface com.thingworx.entities.interfaces.IShapeProvider
getName
Methods inherited from interface com.thingworx.accesscontrol.ISupportsAccessModifier
getAccessModifier, getAccessModifierScope, getExemptList, hasAccessModifier, isInternalAccess, isPrivateAccess, isRestrictedAccess
Methods inherited from interface com.thingworx.deprecation.ISupportsDeprecation
getDeprecated, isDeprecated, isDeprecatedBefore, since
-
Field Details
-
_logger
protected static org.slf4j.Logger _logger -
PURGE_BLOCK_SIZE
public static final int PURGE_BLOCK_SIZE- See Also:
-
-
Constructor Details
-
StreamThing
-
-
Method Details
-
getEntryIterator
@ThingworxExtensionApiMethod(since={7,0,1}) public IDataEntryCloseableIterator<StreamEntry> getEntryIterator(Timespan timespan) throws Exception
Returns an iterator over all entries inside this stream thing added over the provided timespan. If the timespan's start and end dates are both null, all entries will be iterated. The iterator must be closed when no longer used.- Parameters:
timespan
- the timespan of interest- Returns:
- a closeable iterator
- Throws:
Exception
- if an exception occurred creating the iterator
-
validateConfiguration
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public void validateConfiguration(ImportedEntityCollection importedEntityCollections) throws Exception Description copied from class:Thing
Validates the configuration of the thing during the import process. This method is called whenever a thing is created or modified via the REST APIs. During the validation step, there may be other associated entities (including thing shapes and templates) that are being imported. These can be accessed via the
importedEntities
collection if needed.Note that some resources belonging to the thing or other associated entities may not be available during this step in the lifecycle.
It is required for all subclasses of
Thing
to callsuper.validateConfiguration(importedEntities)
if they override this method.- Overrides:
validateConfiguration
in classThing
- Parameters:
importedEntityCollections
- - a typed collection of entities currently being imported- Throws:
Exception
- If an error occurs
-
initializeThing
@ThingworxExtensionApiMethod(since={9,0}, canOverride=true, requiresSuper=true) public void initializeThing(ContextType contextType) throws Exception Description copied from class:Thing
An initialization hook for subclasses of
Thing
. Some resources ofThing
may not be available at this point in the lifecycle.- Overrides:
initializeThing
in classThing
- Throws:
Exception
- If an error occurs
-
dispose
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public void dispose() throws ExceptionDescription copied from class:RootEntity
Removes any remaining references of this entity and disposes any resources that were not cleaned up earlier in the lifecycle. This method is only invoked when the entity is in the process of deletion.
-
getDataShapeName
- Specified by:
getDataShapeName
in interfaceIData
-
GetDataShape
- Service Category:
- DataShape
- Service Description:
- Get the currently assigned data shape.
- Returns:
- result Data shape name - DATASHAPENAME
-
SetDataShape
- Service Category:
- DataShape
- Service Description:
- Sets the currently assigned data shape.
- Parameters:
name
- Data shape name - DATASHAPENAME- Throws:
Exception
- If an error occurs
-
getDataShape
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true) public DataShapeDefinition getDataShape()- Specified by:
getDataShape
in interfaceIData
- Specified by:
getDataShape
in interfaceIDynamicServiceShape
- Specified by:
getDataShape
in interfaceIStream
-
getAccumulatedDataShape
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true) public DataShapeDefinition getAccumulatedDataShape() -
DeleteStreamEntry
@ThingworxExtensionApiMethod(since={6,6}) public void DeleteStreamEntry(String streamEntryId) throws Exception - Service Category:
- StreamEntries
- Service Description:
- Delete a specific stream entry given a stream entry ID.
- Parameters:
streamEntryId
- Stream entry ID - STRING- Throws:
Exception
- If an error occurs
-
GetStreamEntry
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetStreamEntry(String streamEntryId) throws Exception - Service Category:
- StreamEntries
- Service Description:
- Retrieve a specific stream entry given a stream entry ID.
- Parameters:
streamEntryId
- Stream entry ID - STRING- Returns:
- result Stream entry - INFOTABLE - Aspects {isEntityDataShape:true, isStreamEntry:true}
- Throws:
Exception
- If an error occurs
-
GetStreamEntryCount
- Service Category:
- StreamEntries
- Service Description:
- Retrieve a count of stream entries.
- Returns:
- result Stream entry count - NUMBER
- Throws:
Exception
- If an error occurs
-
GetFieldNames
- Service Category:
- Fields
- Service Description:
- Retrieve a list of field names for the data shape associated with this stream.
- Returns:
- result Field names - INFOTABLE - Aspects {dataShape:EntityList}
- Throws:
Exception
- If an error occurs
-
GetFieldNamesByType
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetFieldNamesByType(String type) throws Exception - Service Category:
- Fields
- Service Description:
- Retrieve a list of field names for the data shape associated with this stream, of a specific type.
- Parameters:
type
- Base type name - BASETYPENAME- Returns:
- result Field names - INFOTABLE - Aspects {dataShape:EntityList}
- Throws:
Exception
- If an error occurs
-
AddStreamEntries
@ThingworxExtensionApiMethod(since={6,6}) public void AddStreamEntries(InfoTable values) throws Exception - Service Category:
- StreamEntries
- Service Description:
- Add multiple stream entries.
- Parameters:
values
- Stream entry values - INFOTABLE- Throws:
Exception
- If an error occurs
-
AddStreamEntry
@ThingworxExtensionApiMethod(since={6,6}) public void AddStreamEntry(org.joda.time.DateTime timestamp, Location location, String source, String sourceType, TagCollection tags, InfoTable values) throws Exception - Service Category:
- StreamEntries
- Service Description:
- Add a new stream entry.
- Parameters:
timestamp
- Event time (optional) - DATETIMElocation
- Location of the entry (optional) - LOCATIONsource
- Source of the event - STRINGsourceType
- Source type (User,Thing) - STRINGtags
- Tags (optional) - TAGSvalues
- Data values - INFOTABLE- Throws:
Exception
- If an error occurs
-
addStreamEntry
@ThingworxExtensionApiMethod(since={6,6}) public void addStreamEntry(org.joda.time.DateTime timestamp, Location location, String source, String sourceType, TagCollection tags, ValueCollection values) throws Exception - Specified by:
addStreamEntry
in interfaceIStream
- Throws:
Exception
- If an error occurs
-
UpdateStreamEntry
@ThingworxExtensionApiMethod(since={6,6}) public void UpdateStreamEntry(String streamEntryId, Location location, String source, TagCollection tags, InfoTable values) throws Exception - Service Category:
- StreamEntries
- Service Description:
- Update an existing stream entry.
- Parameters:
streamEntryId
- Stream entry ID - STRINGlocation
- Location of the entry (optional) - LOCATIONsource
- Source of the event - STRINGtags
- Tags (optional) - TAGSvalues
- Data values - INFOTABLE- Throws:
Exception
- If an error occurs
-
CreateValues
- Service Category:
- Values
- Service Description:
- Create an empty info table of the correct datashape for this stream.
- Returns:
- Values Created Infotable - INFOTABLE - Aspects {isEntityDataShape:true}
- Throws:
Exception
- If an error occurs
-
CreateValuesWithData
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable CreateValuesWithData(org.json.JSONObject values) throws Exception - Service Category:
- Values
- Service Description:
- Create an info table of the correct datashape for this stream and include data values.
- Parameters:
values
- Data values (JSON Object) - JSON- Returns:
- Values Created Infotable - INFOTABLE - Aspects {isEntityDataShape:true}
- Throws:
Exception
- If an error occurs
-
PurgeStreamEntries
@ThingworxExtensionApiMethod(since={6,6}) public void PurgeStreamEntries(org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean immediate) throws Exception - Service Category:
- Maintenance
- Service Description:
- Purge stream entries for a specified date range.
- Parameters:
startDate
- Start time - DATETIMEendDate
- End time - DATETIMEimmediate
- Delete immediately - BOOLEAN- Throws:
Exception
- If an error occurs
-
GetStreamEntries
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetStreamEntries(Double maxItems, Boolean oldestFirst) throws Exception - Service Category:
- Queries
- Service Description:
- Get all stream entries (without data).
- Parameters:
maxItems
- Maximum number of items to return - NUMBERoldestFirst
- Search/sort from oldest to newest - BOOLEAN- Returns:
- result Table entries - INFOTABLE - Aspects {isStreamEntry:true}
- Throws:
Exception
- If an error occurs
-
GetStreamEntriesWithData
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetStreamEntriesWithData(Double maxItems, Boolean oldestFirst) throws Exception - Service Category:
- Queries
- Service Description:
- Get all stream entries (with data).
- Parameters:
maxItems
- Maximum number of items to return - NUMBERoldestFirst
- Search/sort from oldest to newest - BOOLEAN- Returns:
- result Table entries - INFOTABLE - Aspects {isEntityDataShape:true, isStreamEntry:true}
- Throws:
Exception
- If an error occurs
-
GetStreamData
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetStreamData(Double maxItems, Boolean oldestFirst) throws Exception - Service Category:
- Queries
- Service Description:
- Get all stream data (no entry detail).
- Parameters:
maxItems
- Maximum number of items to return - NUMBERoldestFirst
- Search/sort from oldest to newest - BOOLEAN- Returns:
- result Table entries - INFOTABLE - Aspects {isEntityDataShape:true}
- Throws:
Exception
- If an error occurs
-
QueryStreamEntriesWithData
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryStreamEntriesWithData(Double maxItems, String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean oldestFirst, org.json.JSONObject query) throws Exception - Service Category:
- Queries
- Service Description:
- Query stream entries (with data), along with filter and sort criteria.
- Parameters:
maxItems
- Maximum number of items to return - NUMBERsource
- Source of this entry (optional) - STRINGtags
- Tags - TAGSsourceTags
- Source Tags - TAGSstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERY- Returns:
- result Table entries - INFOTABLE - Aspects {isEntityDataShape:true, isStreamEntry:true}
- Throws:
Exception
- If an error occurs
-
QueryStreamData
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryStreamData(Double maxItems, String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean oldestFirst, org.json.JSONObject query) throws Exception - Service Category:
- Queries
- Service Description:
- Query stream data (no stream entry details), along with filter and sort criteria.
- Parameters:
maxItems
- Maximum number of items to return - NUMBERsource
- Source of this entry (optional) - STRINGtags
- Tags - TAGSsourceTags
- Source Tags - TAGSstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERY- Returns:
- result Table entries - INFOTABLE - Aspects {isEntityDataShape:true}
- Throws:
Exception
- If an error occurs
-
QueryStreamEntries
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryStreamEntries(Double maxItems, String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean oldestFirst, org.json.JSONObject query) throws Exception - Service Category:
- Queries
- Service Description:
- Query stream entries (without data), along with filter and sort criteria.
- Parameters:
maxItems
- Maximum number of items to return - NUMBERsource
- Source of this entry (optional) - STRINGtags
- Tags - TAGSsourceTags
- Source Tags - TAGSstartDate
- Start time - DATETIMEendDate
- End time - DATETIMEoldestFirst
- Search/sort from oldest to newest - BOOLEANquery
- Query definition - QUERY- Returns:
- result Table entries - INFOTABLE - Aspects {isStreamEntry:true}
- Throws:
Exception
- If an error occurs
-
getItemEntityName
- Specified by:
getItemEntityName
in interfaceIFeed
-
getItemCollectionName
- Specified by:
getItemCollectionName
in interfaceIFeed
-
getDependencies
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public EntityReferenceTypeMap getDependencies()Description copied from class:Thing
Returns a map containing references to all entities that the Thing is dependent on.
- Overrides:
getDependencies
in classThing
- Returns:
- a map of up-stream dependencies
-
getDataType
@ThingworxExtensionApiMethod(since={6,6}) public RelationshipTypes.ThingworxRelationshipTypes getDataType() -
getItemEntityType
@ThingworxExtensionApiMethod(since={6,6}) public RelationshipTypes.ThingworxRelationshipTypes getItemEntityType() -
addStreamEntryImmediately
@ThingworxExtensionApiMethod(since={6,6}) public void addStreamEntryImmediately(org.joda.time.DateTime timestamp, Location location, String source, String sourceType, TagCollection tags, ValueCollection values) throws Exception - Throws:
Exception
- If an error occurs
-