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

Programmatically read operation behavior (Restrict Change Set Delivery to Component)

Scenario:
We have many streams owned by different Team areas.
Components in the stream are owned by different Project areas (for external access restriction)
Change sets delivery to components of streams is restricted via operation behavior -> Deliver(Server) -> Preconditions and follow up actions -> Restrict Change Set Delivery to Component

Requirement:
I am developing application to display all components of a specific stream along with delivery restrictions enforced on them. This information becomes handy to show/figure who all have access to components, who all can deliver to component.

I am able to get all components of specific stream but currently stuck with second part. Any hint/sample source on how to read Restrict Change Set Delivery to Component precondition is much appreciated.

0 votes


Accepted answer

Permanent link
Hello,
If you are using REST, check out the OperationReport to see if it is what you need:
https://jazz.net/wiki/bin/view/Main/DraftSecurityServiceRestApi#Operation_Report

If you are using the Java API, IClientProcess.getAdvisorDeclarations may be what you need. Here is the javadoc:
    /**
     * Returns the collection of advisors declarations which are configured for
     * the given operation relative to the given process area. The returned
     * advisor declarations correspond to the advisors which would be run if an
     * operation with the given id and process area were advised by this
     * process.
     * <p>
     * Note that this method only works for team operations. For project
     * operations, use {@link #getAdvisorDeclarations(String, IProgressMonitor)}
     * instead.
     *
     * @param processArea the starting process area
     * @param operationId the operation id
     * @param monitor the progress monitor or <code>null</code>
     * @return the advisor declarations which are configured for the given
     *         operation relative to the given area
     * @LongOp This is a long operation; it may block indefinitely; must not be
     *         called from a responsive thread.
     */
    IAdvisorDeclaration[] getAdvisorDeclarations(IProcessArea processArea, String operationId, IProgressMonitor monitor) throws TeamRepositoryException;


Hope that helps,
Ruby

Martha (Ruby) Andrews
Jazz Foundation L3 Development Team Lead
Sanjeev Kulkarni selected this answer as the correct answer

0 votes

Comments

Thanks Martha this works!

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,939
× 7,498

Question asked: May 05 '15, 9:03 a.m.

Question was seen: 2,838 times

Last updated: May 06 '15, 12:02 p.m.

Confirmation Cancel Confirm