/** @return */ public List<ComponentInst> getApplications() { List<ComponentInst> hyperLinks = new ArrayList<ComponentInst>(); String[] asAvailCompoForCurUser = getOrganizationController() .getAvailCompoIds( getSettings("applications.spaceId", "toBeDefined"), getMainSessionController().getUserId()); for (String componentId : asAvailCompoForCurUser) { ComponentInst componentInst = getOrganizationController().getComponentInst(componentId); if ("hyperlink".equals(componentInst.getName())) { hyperLinks.add(componentInst); } } return hyperLinks; }
public List<Project> getProjects() { List<Project> projects = new ArrayList<Project>(); String[] spaceIds = getOrganizationController().getAllowedSubSpaceIds(getUserId(), getProjectsSpaceId()); for (String spaceId : spaceIds) { SpaceInstLight space = getOrganizationController().getSpaceInstLightById(spaceId); if (space != null) { Project project = new Project(space); String[] componentIds = getOrganizationController().getAvailCompoIdsAtRoot(space.getId(), getUserId()); for (String componentId : componentIds) { ComponentInst component = getOrganizationController().getComponentInst(componentId); if (component != null && !component.isHidden()) { project.addComponent(component); } } projects.add(project); } } return projects; }
@Override public String[] getExistingComponentInstances() { return new String[] {component.getId()}; }
/** * Denies the access to the silverpeas resources to all users.</br> TODO For now, the mechanism is * about to update the dummy component in order to set it that it is not public. But this has to * be improved in the future. */ public void denieAuthorizationToUsers() { ComponentInst component = getSilverpeasEnvironmentTest().getDummyPublicComponent(); component.setPublic(false); getSilverpeasEnvironmentTest().updateComponent(component); }