Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to Set Flowcontrol using server API in scm

How to Set Flowcontrol using server API in scm as show in image

0 votes



One answer

Permanent link

I don't know the SCM server APIs.

Some considerations about the SCM Server API are here: https://rsjazz.wordpress.com/2016/02/03/setting-access-control-permissions-for-scm-versionables/

The client API looks as follows:

    private void setFlow(IWorkspaceConnection source,
            IWorkspaceConnection dest, Collection<icomponenthandle> components,
            IProgressMonitor monitor) throws TeamRepositoryException {
        // Get the current flow table
        IFlowTable cflowTable = source.getFlowTable().getWorkingCopy();
        // Set the accept and deliver flow to the target
        cflowTable.addAcceptFlow(dest.getResolvedWorkspace(), dest
                .teamRepository().getId(), dest.teamRepository()
                .getRepositoryURI(), components / Collections.EMPTY_LIST /,
                "Accept Flow");
        cflowTable.addDeliverFlow(dest.getResolvedWorkspace(), dest
                .teamRepository().getId(), dest.teamRepository()
                .getRepositoryURI(), components / Collections.EMPTY_LIST /,
                "Deliver Flow");
        // Limit the scope for accept and delivery to the components that are
        // needed
        cflowTable.setComponentScopes(dest.getResolvedWorkspace(), components);
        // We want incoming and outgoing default and current flow
        // Set the incoming flow for current and default
        IFlowEntry acceptEntry = cflowTable.getAcceptFlow(dest
                .getResolvedWorkspace());
        cflowTable.setCurrent(acceptEntry);
        cflowTable.setDefault(acceptEntry);
        // Set the incoming flow for current and default
        IFlowEntry deliverEntry = cflowTable.getDeliverFlow(dest
                .getResolvedWorkspace());
        cflowTable.setCurrent(deliverEntry);
        cflowTable.setDefault(deliverEntry);

    // Set the modified flow table
    source.setFlowTable(cflowTable, monitor);
}

</icomponenthandle>

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 7,496
× 1,326

Question asked: Oct 29 '24, 11:47 p.m.

Question was seen: 278 times

Last updated: Oct 30 '24, 3:32 a.m.

Related questions
Confirmation Cancel Confirm