It's all about the answers!

Ask a question

RTC: How I capture visibility component of Streams using Advisor operation?


Fabiano lima (17316) | asked Feb 22 '16, 2:02 p.m.
edited Feb 22 '16, 7:35 p.m.
I am creating an Advisor to control and manage the access the components of Streams in RTC. In Streams, how I capture the visibility of components? See part of code:

public void run(AdvisableOperation operation, IProcessConfigurationElement advisorConfiguration, IAdvisorInfoCollector collector,
            IProgressMonitor monitor)
        throws TeamRepositoryException
    {
IRepositoryItemService repo = getService(IRepositoryItemService.class);
        IAccessGroupService groupService = getService(IAccessGroupService.class);
        IComponentService ics = getService(IComponentService.class);
        Class<?> classe = operation.getOperationData().getClass();
        Object data = operation.getOperationData();
        if (data instanceof IComponentModificationData)
            {
            IComponentModificationData modificationData = (IComponentModificationData) data;
            .......


            }

}



Comments
Ralph Schoon commented Feb 23 '16, 2:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Please provide information what you want to do. From your question I can't tell.


Fabiano lima commented Feb 24 '16, 7:52 a.m.

I want that components created in Streams will always private. So I verify during creation, the visibility that was user choice.


Geoffrey Clemm commented Feb 26 '16, 5:43 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

How do you know what was the user's desired visibility?   Note that (to my knowledge) a precondition cannot pop up a dialog for interacting with the user, so you cannot use a precondition to ask the user interactively to confirm something.

One answer



permanent link
Michele Pegoraro (1.8k14118103) | answered Feb 23 '16, 4:08 a.m.
Hi,
component ownership and visibility on server side could be configured using this method: IScmService.setComponentOwnerAndVisibility.

Stream visibility, on the other side, are provided by IScmService.setWorkspaceOwnerAndVisibility and IScmService.setWorkspaceVisibility

Your answer


Register or 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.