public MountPoint getMountPoint(final MountPointID mountID) { MountPoint result = null; if (SRM_MOUNT_ID.equals(mountID)) { try { IVirtualOrganization vo = getProject().getVO(); IGridInfoService infoService = vo.getInfoService(); IGridResource[] resources = infoService.fetchResources( vo, vo, GridResourceCategoryFactory.getCategory(GridResourceCategoryFactory.ID_STORAGE), true, IGridStorage.class, null); for (IGridResource resource : resources) { if (resource instanceof GridGlueStorage) { GridGlueStorage ggs = (GridGlueStorage) resource; if (ggs.getHostName().equals(getHostName())) { result = ggs.getSrmMountPoint(this); } } } } catch (ProblemException pExc) { Activator.logException(pExc); } } else if (LFC_MOUNT_ID.equals(mountID)) { String name = String.format("lfc @ %s", getURI().toString()); String suri = String.format("lfn://%s:5010/grid/%s/", getURI(), getProject().getVO().getName()); try { URI uri = new URI(suri); result = new MountPoint(name, uri); } catch (URISyntaxException uriExc) { Activator.logException(uriExc); } } return result; }
@Override protected IStatus fetchChildren(final IProgressMonitor monitor) throws ProblemException { IStatus status = Status.OK_STATUS; IVirtualOrganization vo = getVO(); IGridInfoService infoService = vo.getInfoService(); IGridResourceCategory category = GridResourceCategoryFactory.getCategory(GridResourceCategoryFactory.ID_APPLICATIONS); IGridResource[] applications = infoService.fetchResources(this, vo, category, false, IGridApplication.class, monitor); if ((applications != null) && (applications.length > 0)) { for (IGridResource app : applications) { addElement(app); } } else { addElement( new ContainerMarker(this, ContainerMarker.MarkerType.INFO, "No matching elements found")); } return status; }