Class StreamThing
- java.lang.Object
-
- All Implemented Interfaces:
ISupportsAccessModifier
,IConfigurableObject
,INotScriptFriendly
,ISupportsDeprecation
,IDiffableObject
,IAlertProvider
,IAvatar
,IEntityLifeCycleEvent
,IEventMetadataProvider
,IEventProvider
,IPersistable
,IPropertyProvider
,IServiceMetadataProvider
,IServiceProvider
,IShapeProvider
,ITaggableObject
,IDependencyScannableObject
,IData
,IDynamicServiceShape
,IHierarchicalEntity
,IEntityDefinition
,IPersistableObject<java.lang.String>
,IDesignTimeSecurable
,IDesignTimeSecurableEntity
,IRunTimeSecurable
,IRunTimeSecurableEntity
,ISecurable
,IVisibilitySecurable
,IVisibilitySecurableEntity
,IStream
,IEventProcessor
,IAspectContainer
,IFeed
,INamedObject
,java.io.Serializable
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true, canExtendOrImplement=true) public class StreamThing extends DataThing<ClassicStreamServiceProvider> implements IData, IFeed, IDynamicServiceShape, IStream
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
_logger
static int
PURGE_BLOCK_SIZE
-
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
Constructors Constructor Description StreamThing()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
AddStreamEntries(InfoTable values)
Service Category: StreamEntries Service Description: Add multiple stream entries.void
addStreamEntry(org.joda.time.DateTime timestamp, Location location, java.lang.String source, java.lang.String sourceType, TagCollection tags, ValueCollection values)
void
AddStreamEntry(org.joda.time.DateTime timestamp, Location location, java.lang.String source, java.lang.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, java.lang.String source, java.lang.String sourceType, TagCollection tags, ValueCollection values)
InfoTable
CreateValues()
Service Category: Values Service Description: Create an empty info table of the correct datashape for this stream.InfoTable
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(java.lang.String streamEntryId)
Service Category: StreamEntries Service Description: Delete a specific stream entry given a stream entry ID.void
dispose()
DataShapeDefinition
getAccumulatedDataShape()
DataShapeDefinition
getDataShape()
java.lang.String
GetDataShape()
Service Category: DataShape Service Description: Get the currently assigned data shape.java.lang.String
getDataShapeName()
RelationshipTypes.ThingworxRelationshipTypes
getDataType()
EntityReferenceTypeMap
getDependencies()
IDataEntryCloseableIterator<StreamEntry>
getEntryIterator(Timespan timespan)
Returns an iterator over all entries inside this stream thing added over the provided timespan.InfoTable
GetFieldNames()
Service Category: Fields Service Description: Retrieve a list of field names for the data shape associated with this stream.InfoTable
GetFieldNamesByType(java.lang.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.java.lang.String
getItemCollectionName()
java.lang.String
getItemEntityName()
RelationshipTypes.ThingworxRelationshipTypes
getItemEntityType()
InfoTable
GetStreamData(java.lang.Double maxItems, java.lang.Boolean oldestFirst)
Service Category: Queries Service Description: Get all stream data (no entry detail).InfoTable
GetStreamEntries(java.lang.Double maxItems, java.lang.Boolean oldestFirst)
Service Category: Queries Service Description: Get all stream entries (without data).InfoTable
GetStreamEntriesWithData(java.lang.Double maxItems, java.lang.Boolean oldestFirst)
Service Category: Queries Service Description: Get all stream entries (with data).InfoTable
GetStreamEntry(java.lang.String streamEntryId)
Service Category: StreamEntries Service Description: Retrieve a specific stream entry given a stream entry ID.java.lang.Double
GetStreamEntryCount()
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, java.lang.Boolean immediate)
Service Category: Maintenance Service Description: Purge stream entries for a specified date range.InfoTable
QueryStreamData(java.lang.Double maxItems, java.lang.String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query)
Service Category: Queries Service Description: Query stream data (no stream entry details), along with filter and sort criteria.InfoTable
QueryStreamEntries(java.lang.Double maxItems, java.lang.String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query)
Service Category: Queries Service Description: Query stream entries (without data), along with filter and sort criteria.InfoTable
QueryStreamEntriesWithData(java.lang.Double maxItems, java.lang.String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query)
Service Category: Queries Service Description: Query stream entries (with data), along with filter and sort criteria.void
SetDataShape(java.lang.String name)
Service Category: DataShape Service Description: Sets the currently assigned data shape.void
UpdateStreamEntry(java.lang.String streamEntryId, Location location, java.lang.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 Detail
-
_logger
protected static org.slf4j.Logger _logger
-
PURGE_BLOCK_SIZE
public static final int PURGE_BLOCK_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StreamThing
@ThingworxExtensionApiMethod(since={6,6}) public StreamThing()
-
-
Method Detail
-
getEntryIterator
@ThingworxExtensionApiMethod(since={7,0,1}) public IDataEntryCloseableIterator<StreamEntry> getEntryIterator(Timespan timespan) throws java.lang.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:
java.lang.Exception
- if an exception occurred creating the iterator
-
validateConfiguration
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public void validateConfiguration(ImportedEntityCollection importedEntityCollections) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
initializeThing
@ThingworxExtensionApiMethod(since={9,0}, canOverride=true, requiresSuper=true) public void initializeThing(ContextType contextType) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
dispose
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public void dispose() throws java.lang.Exception
Description 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
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getDataShapeName()
- Specified by:
getDataShapeName
in interfaceIData
-
GetDataShape
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetDataShape()
- Service Category:
- DataShape
- Service Description:
- Get the currently assigned data shape.
- Returns:
- result Data shape name - DATASHAPENAME
-
SetDataShape
@ThingworxExtensionApiMethod(since={6,6}) public void SetDataShape(java.lang.String name) throws java.lang.Exception
- Service Category:
- DataShape
- Service Description:
- Sets the currently assigned data shape.
- Parameters:
name
- Data shape name - DATASHAPENAME- Throws:
java.lang.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(java.lang.String streamEntryId) throws java.lang.Exception
- Service Category:
- StreamEntries
- Service Description:
- Delete a specific stream entry given a stream entry ID.
- Parameters:
streamEntryId
- Stream entry ID - STRING- Throws:
java.lang.Exception
- If an error occurs
-
GetStreamEntry
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetStreamEntry(java.lang.String streamEntryId) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
GetStreamEntryCount
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Double GetStreamEntryCount() throws java.lang.Exception
- Service Category:
- StreamEntries
- Service Description:
- Retrieve a count of stream entries.
- Returns:
- result Stream entry count - NUMBER
- Throws:
java.lang.Exception
- If an error occurs
-
GetFieldNames
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetFieldNames() throws java.lang.Exception
- 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:
java.lang.Exception
- If an error occurs
-
GetFieldNamesByType
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetFieldNamesByType(java.lang.String type) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
AddStreamEntries
@ThingworxExtensionApiMethod(since={6,6}) public void AddStreamEntries(InfoTable values) throws java.lang.Exception
- Service Category:
- StreamEntries
- Service Description:
- Add multiple stream entries.
- Parameters:
values
- Stream entry values - INFOTABLE- Throws:
java.lang.Exception
- If an error occurs
-
AddStreamEntry
@ThingworxExtensionApiMethod(since={6,6}) public void AddStreamEntry(org.joda.time.DateTime timestamp, Location location, java.lang.String source, java.lang.String sourceType, TagCollection tags, InfoTable values) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
addStreamEntry
@ThingworxExtensionApiMethod(since={6,6}) public void addStreamEntry(org.joda.time.DateTime timestamp, Location location, java.lang.String source, java.lang.String sourceType, TagCollection tags, ValueCollection values) throws java.lang.Exception
- Specified by:
addStreamEntry
in interfaceIStream
- Throws:
java.lang.Exception
- If an error occurs
-
UpdateStreamEntry
@ThingworxExtensionApiMethod(since={6,6}) public void UpdateStreamEntry(java.lang.String streamEntryId, Location location, java.lang.String source, TagCollection tags, InfoTable values) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
CreateValues
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable CreateValues() throws java.lang.Exception
- 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:
java.lang.Exception
- If an error occurs
-
CreateValuesWithData
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable CreateValuesWithData(org.json.JSONObject values) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
PurgeStreamEntries
@ThingworxExtensionApiMethod(since={6,6}) public void PurgeStreamEntries(org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean immediate) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
GetStreamEntries
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetStreamEntries(java.lang.Double maxItems, java.lang.Boolean oldestFirst) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
GetStreamEntriesWithData
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetStreamEntriesWithData(java.lang.Double maxItems, java.lang.Boolean oldestFirst) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
GetStreamData
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetStreamData(java.lang.Double maxItems, java.lang.Boolean oldestFirst) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
QueryStreamEntriesWithData
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryStreamEntriesWithData(java.lang.Double maxItems, java.lang.String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
QueryStreamData
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryStreamData(java.lang.Double maxItems, java.lang.String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
QueryStreamEntries
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryStreamEntries(java.lang.Double maxItems, java.lang.String source, TagCollection tags, TagCollection sourceTags, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, java.lang.Boolean oldestFirst, org.json.JSONObject query) throws java.lang.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:
java.lang.Exception
- If an error occurs
-
getItemEntityName
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getItemEntityName()
- Specified by:
getItemEntityName
in interfaceIFeed
-
getItemCollectionName
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String 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, java.lang.String source, java.lang.String sourceType, TagCollection tags, ValueCollection values) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
-