Key Services (Base Building Block)
The following key services are found in the base building block. All services in this building block can be viewed by navigating to the Services page for each of the entities noted below.
PTC.Base.Manager
The following key services are found on the PTC.Base.Manager Thing:
• AddNewComponent—Creates standard or abstract building blocks. Creates all of the Thing Shapes, Thing Templates, Things, groups, organizations, and so on, that are required for a building block to function.
• AddNewImplComponent—Creates implementation building blocks. This service requires the project name of the abstract block it is implementing as input. This services automatically sets up all of the entities and dependencies.
• DeleteComponent—Deletes all entities that belong to the passed-in project. This action is not reversible.
• FixDefaultUserGroupHierarchy—Internal service used as a work around for the ThingWorx Platform gap where multiple projects cannot be added as a project dependency at creation time. Once the project dependencies are manually updated, this service adjusts all of the default user groups so that they are added as members of the dependent component default groups. This allows default security to be inherited up the chain.
• GetConfiguredComponentManager—Returns the default configured manager for the component. The manager is configured on the DefaultGlobalManagerConfiguration configuration table on the PTC.Base.EntryPoint Thing.
• GetDefaultConfiguredDatabaseThing—Returns the global configuration of the configured database Thing.
• GetDefaultConfiguredSolutionName—Returns the globally configured solution name for use by the common master mashup.
• GetGlobalDefaultManagerForIdentifier—Returns the globally configured manager for the passed-in identifier.
• InitializeSolution—Runs any post-deployment scripts for the building blocks in the building block solution stack.
PTC.Base.CommonHelper
The following key services are found on the PTC.Base.CommonHelper Thing:
• AddAuditLogEntry—Adds an audit log to the audit log stream.
• FormatDateTime—Returns the string representation of the date and time instance using the required pattern. By default, this service uses the predefined localization token values listed in the table below to return the date and time string.
• FormatDateTimeString—Returns the string representation of the date and time string using the required pattern. By default, this service uses the predefined localization token values listed in the table below to return the date and time string.
• GetAuditLogsForDateRange—Returns the logs that are in the audit log stream for the passed-in date range.
• GetDateTime—Returns the date and time for the specified time zone.
• GetAvailableTimeZones—Provides the list of all available time zones.
• GetTimeZoneInfo—Provides time zone information for the given time zone ID, such as the offset, the display name of the time zone, and more.
• PurgeAuditLog—Deletes all logs in the audit log stream for the passed-in date range.
Localization Token
|
Value
|
PTC.Base.InternationalDateFormat
|
yyyy-MM-dd
|
PTC.Base.InternationalDateTimeFormat
|
yyyy-MM-dd HH:mm
|
PTC.Base.InternationalTimeFormat
|
HH:mm:ss
|
PTC.Base.InternationalShortDateFormat
|
MM-dd
|
PTC.Base.InternationalShortTimeFormat
|
HH:mm
|
PTC.Base.DatePickerDateFormat
|
YYYY-MM-DD
|
PTC.Base.DatePickerDateTimeFormat
|
YYYY-MM-DD HH:mm
|
PTC.Base.ChartDateFormat
|
MM-DD
|