Class ProductsService
java.lang.Object
app.ductape.sdk.products.services.ProductsService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTSJobEventTypes.ACTIONdiscriminator for agent dispatch jobs.static final StringTSProductComponents.AGENT.static final StringTSProductComponents.ENV.static final StringTSProductComponents.GRAPH.static final StringTSProductComponents.JOB.static final StringTSProductComponents.SESSION.static final StringTSProductComponents.VECTOR.static final StringTSJobEventTypes.FEATUREdiscriminator for feature dispatch jobs.static final StringTSJobEventTypes.GRAPH_ACTIONdiscriminator for predefined graph-action jobs.static final StringTSJobEventTypes.GRAPH_OPERATIONdiscriminator for job payloads. -
Constructor Summary
ConstructorsConstructorDescriptionProductsService(ProductsApiService api, CloudApiService cloudApi, RequestContext auth) ProductsService(ProductsApiService api, RequestContext auth) ProductsService(EnvType environment, RequestContext auth) -
Method Summary
Modifier and TypeMethodDescriptionReturns the workspace auth context used for product API calls.Sprint 3 — open the fluentProductBuilderbound to this service for a given product tag.checkProductNameExists(String name) cloudApi()voidcreateAgent(String productId, Map<String, Object> agentPayload) TScreateAgent: minimal update payload (caller validates).voidcreateDatabase(String productTag, Map<String, Object> data) TScreateDatabasewith cloud-linked env materialization.voidcreateDatabase(String productTag, Map<String, Object> data, boolean throwIfExists) voidcreateDatabaseAction(String productId, Map<String, Object> data) voidcreateDatabaseAction(String productId, Map<String, Object> data, boolean throwErrorIfExists) voidcreateDatabaseMigration(String productId, Map<String, Object> data) voidcreateDatabaseMigration(String productId, Map<String, Object> data, boolean throwErrorIfExists) voidcreateDatabaseTrigger(String productId, Map<String, Object> data) voidcreateDatabaseTrigger(String productId, Map<String, Object> data, boolean throwErrorIfExists) voidTScreateEnv: register a product environment component.voidcreateGraph(String productTag, Map<String, Object> data) TScreateGraphwith cloud-linked env materialization.voidcreateGraph(String productTag, Map<String, Object> data, boolean throwIfExists) voidcreateMessageBroker(String productTag, Map<String, Object> data) TScreateMessageBrokerwith cloud-linked env materialization.voidcreateMessageBroker(String productTag, Map<String, Object> data, boolean throwIfExists) voidcreateMessageBrokerTopic(String productTag, Map<String, Object> data) TSsdk.events.topics.create: standalone topic create on an existing broker.createProduct(Map<String, Object> productPayload) voidcreateStorage(String productTag, Map<String, Object> data) TScreateStoragewith cloud-linked env materialization.voidcreateStorage(String productTag, Map<String, Object> data, boolean throwIfExists) voidcreateVector(String productTag, Map<String, Object> data) TScreateVectorwith cloud-linked env materialization.voidcreateVector(String productTag, Map<String, Object> data, boolean throwIfExists) voiddeleteAgent(String productId, String tag) TSdeleteAgent(tag).voiddeleteDatabaseAction(String productId, String compositeTag) voiddeleteDatabaseMigration(String productId, String compositeTag) voiddeleteDatabaseTrigger(String productId, String compositeTag) voiddeleteGraph(String productId, String graphTag) TSProductsService.deleteGraph: remove a graph component from the product.voiddeleteProduct(String productId) voidensureActionJobForDispatch(String productTag, String app, String action, String jobTag, Map<String, Object> schedule, long startAt) TSactions.dispatch: ensure anactionproduct-job component exists withapp/eventkeyed off the dispatched app + action tags.voidensureAgentJobForDispatch(String productTag, String agentTag, String jobTag, Map<String, Object> schedule, long startAt) TSagents.service.ts#dispatch: ensure anactionjob exists (app=agent tag,event=execute).voidensureFeatureJobForDispatch(String productTag, String featureTag, String jobTag, Map<String, Object> schedule, long startAt) TSfeatures.service.ts#dispatch: ensure a feature job component exists beforeprocessJob.voidensureGraphActionJobForDispatch(String productTag, String graph, String event, String jobTag, Map<String, Object> schedule, long startAt) TSgraphs.service.ts#get action().dispatch: ensure agraph_actionjob exists before processor input.voidensureGraphOperationJobForDispatch(String productTag, String graph, String operation, String jobTag, Map<String, Object> schedule, long startAt) TSgraphs.service.ts#dispatch: ensure agraph_operationproduct job exists (creates viaupdateProductwhen missing).fetchAgent(String productId, String tag) TSfetchAgent(tag)via component lookup.fetchAgents(String productId) TSfetchAgentsviafetchProductComponents(String, String).fetchDatabaseAction(String productId, String compositeTag, boolean throwIfMissing) fetchDatabaseActions(String productId, String databaseTag) fetchDatabaseMigration(String productId, String compositeTag, boolean throwError) fetchDatabaseMigrations(String productId, String databaseTag) fetchDatabaseTrigger(String productId, String compositeTag, boolean throwIfMissing) fetchDatabaseTriggers(String productId, String databaseTag) TSfetchJob(tag)via product API job component lookup.fetchProduct(String productId) fetchProductByTag(String productTag) fetchProductComponentByTag(String productId, String componentType, String tag) fetchProductComponents(String productId, String componentType) fetchProductSessionUser(String ductapeUserId) fetchProductSessionUsers(Map<String, Object> payload) fetchProductStorageFiles(Map<String, Object> payload) fetchSession(String productId, String tag) TSsdk.sessions.fetch(product, tag)->ProductBuilder.fetchSession(tag): session *definition* fetch by tag.fetchSessions(String productId) TSsdk.sessions.list(product)->ProductBuilder.fetchSessions(): session *definition* list, distinct fromSessionsService.list/listActive(runtime active-session instances).fetchWorkspaceProducts(String status) initProduct(String id) static StringproductDocumentId(Map<String, Object> productRow) Resolves Mongo-style_idoridfrom a fetched product envelope (processors / job executions).resolveDatabaseConfig(String productId, String databaseTag) TSresolveDatabaseConfig: in-memoryproduct.databasesfirst, then API component fetch.resolveProductIdByTag(String productTag) TSProductBuilder: resolve numeric/mongoproduct_idfrom a product tag viafetchProductByTag(String).voidupdateAgent(String productId, Map<String, Object> agentPayload) TSupdateAgent: merged payload withcomponent/action.voidupdateAuth(RequestContext next) Replace credentials for downstream API calls (TS cache/productsupdateConfigparity).voidvoidupdateDatabaseAction(String productId, Map<String, Object> data) voidupdateDatabaseMigration(String productId, Map<String, Object> data) voidupdateDatabaseTrigger(String productId, Map<String, Object> data) voidvoidTSsdk.jobs.update(product, tag, data)->ProductBuilder.updateJob(tag, data): job-*definition* CRUD (distinct fromJobsService's runtime job tracker).voidvoidTSsdk.events.topics.update.voidupdateProduct(String productId, Map<String, Object> updatePayload) voidTSsdk.sessions.update(product, tag, data)->ProductBuilder.updateSession(tag, data): fetches the existing session-definition component, merges the supplied fields on top (defaultingtagto the original when not overridden, matching TS), and resends viaupdateProductwithcomponent=session, action=update.voidvoid
-
Field Details
-
COMPONENT_JOB
TSProductComponents.JOB.- See Also:
-
GRAPH_OPERATION_JOB_TYPE
TSJobEventTypes.GRAPH_OPERATIONdiscriminator for job payloads.- See Also:
-
FEATURE_JOB_TYPE
TSJobEventTypes.FEATUREdiscriminator for feature dispatch jobs.- See Also:
-
ACTION_JOB_TYPE
TSJobEventTypes.ACTIONdiscriminator for agent dispatch jobs.- See Also:
-
COMPONENT_AGENT
TSProductComponents.AGENT.- See Also:
-
COMPONENT_SESSION
TSProductComponents.SESSION.- See Also:
-
COMPONENT_ENV
TSProductComponents.ENV.- See Also:
-
COMPONENT_VECTOR
TSProductComponents.VECTOR.- See Also:
-
COMPONENT_GRAPH
TSProductComponents.GRAPH.- See Also:
-
GRAPH_ACTION_JOB_TYPE
TSJobEventTypes.GRAPH_ACTIONdiscriminator for predefined graph-action jobs.- See Also:
-
-
Constructor Details
-
ProductsService
-
ProductsService
-
ProductsService
-
-
Method Details
-
cloudApi
-
createStorage
TScreateStoragewith cloud-linked env materialization. -
createStorage
-
updateStorage
-
createMessageBroker
TScreateMessageBrokerwith cloud-linked env materialization. -
createMessageBroker
-
updateMessageBroker
-
createMessageBrokerTopic
TSsdk.events.topics.create: standalone topic create on an existing broker.data.tagmust be"brokerTag:topicTag". -
updateMessageBrokerTopic
TSsdk.events.topics.update. -
createDatabase
TScreateDatabasewith cloud-linked env materialization. -
createDatabase
-
updateDatabase
-
createGraph
TScreateGraphwith cloud-linked env materialization. -
createGraph
-
updateGraph
-
createVector
TScreateVectorwith cloud-linked env materialization. -
createVector
-
updateVector
-
builder
Sprint 3 — open the fluentProductBuilderbound to this service for a given product tag. -
updateAuth
Replace credentials for downstream API calls (TS cache/productsupdateConfigparity). -
authContext
Returns the workspace auth context used for product API calls. -
createProduct
-
updateProduct
-
deleteProduct
-
deleteGraph
TSProductsService.deleteGraph: remove a graph component from the product. -
fetchProduct
-
fetchProductByTag
-
fetchWorkspaceProducts
-
fetchProductStorageFiles
-
fetchProductSessionUsers
-
fetchProductSessionUser
-
checkProductNameExists
-
fetchProductComponents
-
fetchProductComponentByTag
-
resolveProductIdByTag
TSProductBuilder: resolve numeric/mongoproduct_idfrom a product tag viafetchProductByTag(String). -
initProduct
-
bootstrapAction
public BootstrapModels.BootstrapActionResponse bootstrapAction(BootstrapModels.BootstrapActionParams params) -
bootstrapNotification
public BootstrapModels.BootstrapNotificationResponse bootstrapNotification(BootstrapModels.BootstrapNotificationParams params) -
bootstrapStorage
public BootstrapModels.BootstrapStorageResponse bootstrapStorage(BootstrapModels.BootstrapStorageParams params) -
bootstrapSession
public BootstrapModels.BootstrapSessionResponse bootstrapSession(BootstrapModels.BootstrapSessionParams params) -
bootstrapDatabase
public BootstrapModels.BootstrapDatabaseResponse bootstrapDatabase(BootstrapModels.BootstrapDatabaseParams params) -
bootstrapBroker
public BootstrapModels.BootstrapBrokerResponse bootstrapBroker(BootstrapModels.BootstrapBrokerParams params) -
bootstrapGraph
public BootstrapModels.BootstrapGraphResponse bootstrapGraph(BootstrapModels.BootstrapGraphParams params) -
bootstrapVector
public BootstrapModels.BootstrapVectorResponse bootstrapVector(BootstrapModels.BootstrapVectorParams params) -
bootstrapResilience
public BootstrapModels.BootstrapResilienceResponse bootstrapResilience(BootstrapModels.BootstrapResilienceParams params) -
bootstrapIntelligence
public BootstrapModels.BootstrapIntelligenceResponse bootstrapIntelligence(BootstrapModels.BootstrapIntelligenceParams params) -
bootstrapFeature
-
generateExecutablePayload
public BootstrapModels.GenerateExecutablePayloadResponse generateExecutablePayload(BootstrapModels.GenerateExecutablePayloadParams params) -
fetchJob
TSfetchJob(tag)via product API job component lookup. -
updateJobDefinition
TSsdk.jobs.update(product, tag, data)->ProductBuilder.updateJob(tag, data): job-*definition* CRUD (distinct fromJobsService's runtime job tracker). Fetches the existing job component, merges the supplied fields on top, and resends viaupdateProductwithcomponent=job, action=update. -
fetchSessions
TSsdk.sessions.list(product)->ProductBuilder.fetchSessions(): session *definition* list, distinct fromSessionsService.list/listActive(runtime active-session instances). -
fetchSession
TSsdk.sessions.fetch(product, tag)->ProductBuilder.fetchSession(tag): session *definition* fetch by tag. -
updateSessionDefinition
TSsdk.sessions.update(product, tag, data)->ProductBuilder.updateSession(tag, data): fetches the existing session-definition component, merges the supplied fields on top (defaultingtagto the original when not overridden, matching TS), and resends viaupdateProductwithcomponent=session, action=update. -
ensureGraphOperationJobForDispatch
public void ensureGraphOperationJobForDispatch(String productTag, String graph, String operation, String jobTag, Map<String, Object> schedule, long startAt) TSgraphs.service.ts#dispatch: ensure agraph_operationproduct job exists (creates viaupdateProductwhen missing). Resolves numeric product id fromfetchProductByTag(productTag). -
ensureFeatureJobForDispatch
public void ensureFeatureJobForDispatch(String productTag, String featureTag, String jobTag, Map<String, Object> schedule, long startAt) TSfeatures.service.ts#dispatch: ensure a feature job component exists beforeprocessJob. -
ensureActionJobForDispatch
public void ensureActionJobForDispatch(String productTag, String app, String action, String jobTag, Map<String, Object> schedule, long startAt) TSactions.dispatch: ensure anactionproduct-job component exists withapp/eventkeyed off the dispatched app + action tags. Idempotent — does nothing if the job already exists. -
ensureAgentJobForDispatch
public void ensureAgentJobForDispatch(String productTag, String agentTag, String jobTag, Map<String, Object> schedule, long startAt) TSagents.service.ts#dispatch: ensure anactionjob exists (app=agent tag,event=execute). -
fetchAgents
TSfetchAgentsviafetchProductComponents(String, String). -
fetchAgent
TSfetchAgent(tag)via component lookup. -
createAgent
TScreateAgent: minimal update payload (caller validates). -
updateAgent
TSupdateAgent: merged payload withcomponent/action. -
deleteAgent
TSdeleteAgent(tag). -
createEnv
TScreateEnv: register a product environment component. -
ensureGraphActionJobForDispatch
public void ensureGraphActionJobForDispatch(String productTag, String graph, String event, String jobTag, Map<String, Object> schedule, long startAt) TSgraphs.service.ts#get action().dispatch: ensure agraph_actionjob exists before processor input. -
productDocumentId
Resolves Mongo-style_idoridfrom a fetched product envelope (processors / job executions). -
createDatabaseTrigger
public void createDatabaseTrigger(String productId, Map<String, Object> data, boolean throwErrorIfExists) - Parameters:
data- must includetagin the formdatabase_tag:trigger_tag(other fields follow TSIProductDatabaseTrigger)
-
createDatabaseTrigger
-
updateDatabaseTrigger
-
fetchDatabaseTrigger
public Map<String,Object> fetchDatabaseTrigger(String productId, String compositeTag, boolean throwIfMissing) - Parameters:
compositeTag-database_tag:trigger_tag- Returns:
- the trigger map, or
nullif not found (or throws whenthrowIfMissingand missing)
-
fetchDatabaseTriggers
-
deleteDatabaseTrigger
-
createDatabaseMigration
-
createDatabaseMigration
-
updateDatabaseMigration
-
fetchDatabaseMigration
-
fetchDatabaseMigrations
-
deleteDatabaseMigration
-
createDatabaseAction
-
createDatabaseAction
-
updateDatabaseAction
-
fetchDatabaseAction
-
fetchDatabaseActions
-
deleteDatabaseAction
-
resolveDatabaseConfig
TSresolveDatabaseConfig: in-memoryproduct.databasesfirst, then API component fetch.
-