PicketLinkIDMOrganizationServiceImpl getOrganizationService() { return (PicketLinkIDMOrganizationServiceImpl) ExoContainerContext.getCurrentContainer().getComponentInstanceOfType( OrganizationService.class); } }
@Override public void stopContainer(ExoContainer container) { WSRPServiceIntegration service = container.getComponentInstanceOfType(WSRPServiceIntegration.class); service.stopContainer(); }
@Override public void start() { nodeCreator = (NodeHierarchyCreator) ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(NodeHierarchyCreator.class); }
PicketLinkIDMOrganizationServiceImpl getOrganizationService() { return (PicketLinkIDMOrganizationServiceImpl) ExoContainerContext.getCurrentContainer().getComponentInstanceOfType( OrganizationService.class); } }
protected JOSSOAgent getJOSSOAgent() { if (this.jossoAgent == null) { JOSSOAgent jossoAgent = (JOSSOAgent)getExoContainer().getComponentInstanceOfType(JOSSOAgent.class); if (jossoAgent == null) { throw new IllegalStateException("JOSSOAgent component not provided in PortalContainer"); } this.jossoAgent = jossoAgent; } return this.jossoAgent; }
PicketLinkIDMService getIDMService() { return ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(PicketLinkIDMService.class); }
PicketLinkIDMService getIDMService() { return ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(PicketLinkIDMService.class); }
public BrandingDataStorageService() { repositoryService = (RepositoryService) ExoContainerContext.getCurrentContainer() .getComponentInstanceOfType(RepositoryService.class); }
@Override public void onInit(Application app) throws Exception { this.authRegistry = app.getApplicationServiceContainer().getComponentInstanceOfType(AuthenticationRegistry.class); }
/** * @param application Application * @see Application * @deprecated Use * {@link org.exoplatform.services.rest.impl.ApplicationRegistry#addApplication(Application)} * instead of using this method . */ public void addApplication(Application application) { org.exoplatform.services.rest.impl.ApplicationRegistry appRegistry = (org.exoplatform.services.rest.impl.ApplicationRegistry)container .getComponentInstanceOfType(org.exoplatform.services.rest.impl.ApplicationRegistry.class); appRegistry.addApplication(application); }
public AbstractSessionLifeCycle() { try { ExoContainer container = ExoContainerContext.getCurrentContainer(); RepositoryService repoService = (RepositoryService) container.getComponentInstanceOfType(RepositoryService.class); repository = repoService.getRepository(REPOSITORY_NAME); } catch (Exception e) { throw new RuntimeException(e); } }
private void initAllWorkspaceComponentEntries(ExoContainer parent) { SystemParametersPersistenceConfigurator sppc = (SystemParametersPersistenceConfigurator)parent .getComponentInstanceOfType(SystemParametersPersistenceConfigurator.class); for (WorkspaceEntry workspaceEntry : config.getWorkspaceEntries()) { initWorkspaceComponentEntries(sppc, workspaceEntry); } }
/** * {@inheritDoc} */ public Object getInstance(ApplicationContext context) { Class<?> clazz = model.getObjectClass(); return ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(clazz); }
private ResourceBundle getResourceBundle(Locale locale) throws Exception { ExoContainer appContainer = ExoContainerContext.getCurrentContainer(); ResourceBundleService service = (ResourceBundleService)appContainer.getComponentInstanceOfType(ResourceBundleService.class); ResourceBundle res = service.getResourceBundle("locale.portal.webui", locale); return res; }
private ResourceBundle getResourceBundle(Locale locale) throws Exception { ExoContainer appContainer = ExoContainerContext.getCurrentContainer(); ResourceBundleService service = (ResourceBundleService)appContainer.getComponentInstanceOfType(ResourceBundleService.class); ResourceBundle res = service.getResourceBundle("locale.portal.webui", locale); return res; }
@SuppressWarnings("deprecation") private boolean hasSpaces(String userId) { try { SpaceService spaceService = (SpaceService) ExoContainerContext.getCurrentContainer() .getComponentInstanceOfType(SpaceService.class); Space[] spaces = spaceService.getAccessibleSpacesWithListAccess(userId).load(0, 1); return spaces != null && spaces.length > 0; } catch (Exception e) { LOG.debug("Error in gettingStarted REST service: " + e.getMessage(), e); return false; } }
@SuppressWarnings("deprecation") private boolean hasContacts(String userId) { try { IdentityManager identityManager = (IdentityManager) ExoContainerContext.getCurrentContainer() .getComponentInstanceOfType(IdentityManager.class); RelationshipManager relationshipManager = (RelationshipManager) ExoContainerContext.getCurrentContainer() .getComponentInstanceOfType(RelationshipManager.class); Identity identity = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, userId); ListAccess<Identity> confirmedContacts = relationshipManager.getConnections(identity); return confirmedContacts.getSize() > 0; } catch (Exception e) { LOG.debug("Error in gettingStarted REST service: " + e.getMessage(), e); return false; } }
static public String getGroupLabel(String groupId) throws Exception { WebuiRequestContext context = WebuiRequestContext.getCurrentInstance(); ExoContainer container = context.getApplication().getApplicationServiceContainer(); OrganizationService orgService = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class); Group group = orgService.getGroupHandler().findGroupById(groupId); if(group == null){ return cachedGroupLabel; } String label = group.getLabel(); cachedGroupLabel = (label != null && label.trim().length() > 0 )? label : group.getGroupName(); return cachedGroupLabel; }
private String getUserFullName(String userId) { try { OrganizationService service = (OrganizationService) ExoContainerContext.getCurrentContainer() .getComponentInstanceOfType(OrganizationService.class); return service.getUserHandler().findUserByName(userId).getFullName(); } catch (Exception e) { return userId; } }
static public String getGroupDescription(String groupId) throws Exception { WebuiRequestContext context = WebuiRequestContext.getCurrentInstance(); ExoContainer container = context.getApplication().getApplicationServiceContainer(); OrganizationService orgService = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class); String description = ""; Group group = orgService.getGroupHandler().findGroupById(groupId); if (group != null) { description = group.getDescription(); } return description; }