Manages data integration endpoints and their pipelines for a website: email, HTTP, (S)FTP and upload-only endpoints that export or import data, plus the recurring pipeline schedules that fire them. Registered in the scripting context as "integrationManager". Endpoint definitions and pipeline step XML are read from and written to files under the website branch's "/integration" folder. Builder methods construct new endpoints of each supported type, and the pipeline step methods let a step editor read, edit and re-save the XML pipeline attached to an endpoint.

Group: Managers


Methods

findEmailRecipients(EndPointMapping endpoint) · newEmailEndpointBuilder(String id, Branch branch) · newHTTPEndpointBuilder(String id, Branch branch) · newSFTPEndpointBuilder(String id, Branch branch) · newFTPEndpointBuilder(String id, Branch branch) · newUploadOnlyEndpointBuilder(String id, Branch branch) · newNoneInboundEndpointBuilder(String id, Branch branch) · createPipelineSchedule(String pipelineId, String timerUnit, Integer timerMultiple, Date startDate, String type, String dayName, Branch branch, Profile profile) · createPipelineSchedule(String pipelineId, String timerUnit, Integer timerMultiple, Date startDate, String type, String dayName, Website website, Profile profile) · findPipelineScheduleById(long id) · findRecentExecutions(int limit) · findPipelineSchedules(Website website) · updatePipelineSchedule(PipelineSchedule schedule) · deletePipelineSchedule(PipelineSchedule schedule) · findEndpoint(Branch branch, String id) · findPipelineStep(EndPointMapping endPointMapping, WebsiteRootFolder websiteRootFolder) · toXml(PipelineStep step) · fromXml(String xml) · savePipelineStep(Branch branch, EndPointMapping endpoint, PipelineStep headStep, PipelineStep parentStep, String stepKey, String stepXml) · persistPipeline(Branch branch, EndPointMapping endpoint, PipelineStep headStep) · newColumn(String field, Integer column, String columnName, String attribute, String valueString, String expr) · newPipelineBuilder(Branch branch, EndPointMapping endPointMapping) · saveEndpointMapping(Branch branch, EndPointMapping endPointMapping) · deleteEndpointMapping(Branch branch, EndPointMapping endPointMapping)

findEmailRecipients(EndPointMapping endpoint)

Returns: List<EmailRecipient>

Resolves the email recipients for an endpoint's "email" type mapping: profiles matched by the address list in the endpoint's address field, plus profiles in any groups named in its "recipientGroups" attribute (accepted as either a collection or a comma-separated string of group names). A recipient with no matching profile is still included with a null profile; a named group that cannot be found is skipped with a warning.

ParameterDescription
endpointthe endpoint whose address and recipient groups are resolved

newEmailEndpointBuilder(String id, Branch branch)

Returns: EmailEndpointBuilder

Creates a builder for a new "email" outbound endpoint, which exports data and emails it as an attachment to a list of addresses and/or groups.

ParameterDescription
idthe unique id for the new endpoint
branchthe website branch the endpoint is saved to

newHTTPEndpointBuilder(String id, Branch branch)

Returns: HTTPEndpointBuilder

Creates a builder for a new "http" outbound endpoint, which posts exported data to a URL.

ParameterDescription
idthe unique id for the new endpoint
branchthe website branch the endpoint is saved to

newSFTPEndpointBuilder(String id, Branch branch)

Returns: SFTPEndpointBuilder

Creates a builder for a new SFTP endpoint, which transfers data to or from a remote SFTP server.

ParameterDescription
idthe unique id for the new endpoint
branchthe website branch the endpoint is saved to

newFTPEndpointBuilder(String id, Branch branch)

Returns: FTPEndpointBuilder

Creates a builder for a new FTP endpoint, which transfers data to or from a remote FTP server.

ParameterDescription
idthe unique id for the new endpoint
branchthe website branch the endpoint is saved to

newUploadOnlyEndpointBuilder(String id, Branch branch)

Returns: UploadOnlyEndpointBuilder

Creates a builder for a new "upload-only" inbound endpoint, which accepts uploaded files without any further outbound export configuration.

ParameterDescription
idthe unique id for the new endpoint
branchthe website branch the endpoint is saved to

newNoneInboundEndpointBuilder(String id, Branch branch)

Returns: NoneInboundEndpointBuilder

Creates a builder for a new "none" inbound endpoint: a placeholder endpoint that accepts no data, used purely as an entry point for a pipeline.

ParameterDescription
idthe unique id for the new endpoint
branchthe website branch the endpoint is saved to

createPipelineSchedule(String pipelineId, String timerUnit, Integer timerMultiple, Date startDate, String type, String dayName, Branch branch, Profile profile)

Returns: PipelineSchedule

Creates and persists a recurring pipeline schedule for a website branch. Resolves the branch to its underlying website and delegates to the website-based overload.

ParameterDescription
pipelineIdthe id of the pipeline to schedule
timerUnitthe time unit, one of "HOURS", "DAYS", "WEEKS", "MONTHS", "ANNUAL"
timerMultiplethe multiple of the time unit, e.g. 2 for every 2 days
startDatethe date to start the schedule
typethe type of schedule, one of "INBOUND" or "OUTBOUND"
dayNameoptional name of the day of the week to run on, e.g. "MONDAY"
branchthe branch whose website the schedule is created for
profilethe profile the schedule fires for

createPipelineSchedule(String pipelineId, String timerUnit, Integer timerMultiple, Date startDate, String type, String dayName, Website website, Profile profile)

Returns: PipelineSchedule

Creates and persists a recurring pipeline schedule that fires a pipeline on a repeating timer, for either a specific profile or the whole website. The schedule's end date is set to its start date unless a day name is given, in which case it is set to the first matching occurrence of that day.

ParameterDescription
pipelineIdthe id of the pipeline to schedule
timerUnitthe time unit, one of "HOURS", "DAYS", "WEEKS", "MONTHS", "ANNUAL"
timerMultiplethe multiple of the time unit, e.g. 2 for every 2 days
startDatethe date to start the schedule
typethe type of schedule, one of "INBOUND" or "OUTBOUND"
dayNameoptional name of the day of the week to run on, e.g. "MONDAY"
websitethe website the schedule is created for
profilethe profile the schedule fires for, or null to fire for the whole website

findPipelineScheduleById(long id)

Returns: PipelineSchedule

Looks up a pipeline schedule by its database id.

ParameterDescription
idthe id of the pipeline schedule to find

findRecentExecutions(int limit)

Returns: List<PipelineExecution>

The most recent pipeline executions for this account, newest first, across every website and pipeline. Deleted executions are excluded. The Integration page builds its own history from PipelineExecution directly, and needs a website selected to do it. This method is for pages which just want the last few runs of anything - the data processing hub in particular - so it is account wide and needs no branch.

ParameterDescription
limitmaximum number of executions to return

findPipelineSchedules(Website website)

Returns: List<PipelineSchedule>

All pipeline schedules configured for the given website.

ParameterDescription
websitethe website whose schedules are returned

updatePipelineSchedule(PipelineSchedule schedule)

Returns: void

Persists changes made to an existing pipeline schedule.

ParameterDescription
schedulethe pipeline schedule to update

deletePipelineSchedule(PipelineSchedule schedule)

Returns: void

Permanently deletes a pipeline schedule.

ParameterDescription
schedulethe pipeline schedule to delete

findEndpoint(Branch branch, String id)

Returns: EndPointMapping

Returns an endpoint by ID within the given website branch.

ParameterDescription
branch{@link Branch} the website branch whose integration XML to search
id{@link String} the endpoint id to look up

findPipelineStep(EndPointMapping endPointMapping, WebsiteRootFolder websiteRootFolder)

Returns: PipelineStep

Returns the head step of the pipeline for the specified endpoint.

ParameterDescription
endPointMappingthe integration endpoint mapping
websiteRootFolderthe website root folder to lookup

toXml(PipelineStep step)

Returns: String

Serialise a pipeline step to XML.

ParameterDescription
stepthe step to serialise

fromXml(String xml)

Returns: PipelineStep

Deserialise a pipeline step from XML.

ParameterDescription
xmlthe XML to deserialise

savePipelineStep(Branch branch, EndPointMapping endpoint, PipelineStep headStep, PipelineStep parentStep, String stepKey, String stepXml)

Returns: void

Replaces a pipeline step with a new step parsed from XML, and persists the whole pipeline back to its XML file. If parentStep is null then stepXml is treated as the new head of the pipeline. Otherwise the parsed step is spliced into parentStep at stepKey, and the whole pipeline is re-serialised starting from headStep.

ParameterDescription
branchthe website branch containing the pipeline file
endpointthe endpoint the pipeline belongs to
headStepthe head of the pipeline, used to re-serialise the whole tree
parentStepthe parent of the step being replaced, or null if replacing the head
stepKeythe key identifying the step within its parent, or null if replacing the head
stepXmlthe new XML for the step being replaced

persistPipeline(Branch branch, EndPointMapping endpoint, PipelineStep headStep)

Returns: void

Persist the whole pipeline, starting from its head step, back to its XML file. Used after a step has already been mutated in place (e.g. by a pipeline step form controller) and just needs writing out.

ParameterDescription
branchthe website branch containing the pipeline file
endpointthe endpoint the pipeline belongs to
headStepthe head of the pipeline to serialise and persist

newColumn(String field, Integer column, String columnName, String attribute, String valueString, String expr)

Returns: Column

Creates a column mapping, used to map a pipeline step's incoming data (by column number, column name, or pipeline attribute) or a constant value onto a named field. Exposed so pipeline step form controllers can build a step's columns list without instantiating Java classes directly.

ParameterDescription
fieldthe field name the mapped value is stored under
columnthe zero-indexed source column number, or null
columnNamethe source column letter (e.g. "A"), or null
attributethe pipeline attribute name to read the value from, or null
valueStringa constant value to use, or null
expran optional MVEL expression evaluated against the resolved value

newPipelineBuilder(Branch branch, EndPointMapping endPointMapping)

Returns: PipelineBuilder

Creates a builder for defining and saving a simple export-only pipeline for an existing endpoint.

ParameterDescription
branchthe website branch the pipeline file is saved to
endPointMappingthe endpoint the pipeline belongs to

saveEndpointMapping(Branch branch, EndPointMapping endPointMapping)

Returns: void

Saves an endpoint mapping, adding it to or replacing it within the website branch's endpoint mapping XML file (matched by endpoint id).

ParameterDescription
branchthe website branch the endpoint is saved to
endPointMappingthe endpoint mapping to save

deleteEndpointMapping(Branch branch, EndPointMapping endPointMapping)

Returns: void

Removes an endpoint mapping from the website branch's endpoint mapping XML file, and deletes its pipeline file if it has one.

ParameterDescription
branchthe website branch the endpoint is removed from
endPointMappingthe endpoint mapping to delete
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.