I am looking for ways to check weather the selected pvob is under the group given, else the view should not be created.
CM API allows to create a view in the wrong region(group) if the given stream is of different region
Asked
Active
Viewed 33 times
2 Answers
1
Simply try a cleartool lsvob -region <yourRegion/Group>
.
See cleartool lsvob
:
- reg/ion network-region
Confines the VOB listing to include only the VOBs registered for one or more network regions. (The
mkvob
andmktag
commands have a-region
option, which can be used to assign VOB tags to specific network regions.)
Thenetwork-region
argument can include pattern-matching characters as described in thewildcards_ccase
reference page.
So if cleartool lsvob -reg aRegion YourPVobTag
does not return anything, that PVOBTag is not define in the specified region.
-
I am new to the cm-api plugin, i dint knew how to run the above command inside the plugin, with the help of above ibm reference pages i was able to get something working. – user5722923 Mar 29 '18 at 13:49
-
@user5722923 Let me check the doc I mentioned in https://stackoverflow.com/a/36150287/6309 – VonC Mar 29 '18 at 13:50
1
PropertyRequest wantedProps = new PropertyRequest(
CcRegistryRegion.VOB_TAG_LIST.nest(Resource.DISPLAY_NAME));
CcRegistryRegion region = provider.doGetDefaultCcRegistryRegion(wantedProps);
for (CcVobTag vobTag : region.getVobTagList()) {
CCLogger.log(listener, vobTag.getDisplayName()+" ### VOB list");
}
after getting the provider object the following code can access the pvob under the region

user5722923
- 33
- 1
- 5