/** * Get the current user's Eid. * Static convenience method. * @return the eid. */ public static String getEid() { AgentFacade facade =new AgentFacade(); return facade.eid; }
/** * Get the agent string. * Static convenience method. * @return the agent string. */ public static String getAgentString() { AgentFacade facade =new AgentFacade(); return facade.agentString; }
/** * Get the agent string. * Static convenience method. * @return the agent string. */ public static String getAgentString() { AgentFacade facade =new AgentFacade(); return facade.agentString; }
/** * Get the current user's Eid. * Static convenience method. * @return the eid. */ public static String getEid() { AgentFacade facade =new AgentFacade(); return facade.eid; }
public static String getDisplayId() { AgentFacade facade =new AgentFacade(); return facade.displayId; }
public static String getDisplayId() { AgentFacade facade =new AgentFacade(); return facade.displayId; }
/** * Create anonymous user and return the anonymous user id. * @return the anonymous user id. */ public static String createAnonymous() { AgentFacade facade = new AgentFacade(); return helper.createAnonymous(facade); }
/** * Create anonymous user and return the anonymous user id. * @return the anonymous user id. */ public static String createAnonymous() { AgentFacade facade = new AgentFacade(); return helper.createAnonymous(facade); }
/** * Get the current site name. * @return the site name. */ public static String getCurrentSiteName() { AgentFacade facade = new AgentFacade(); boolean accessViaUrl = facade.isAccessViaUrl(); return helper.getCurrentSiteName(accessViaUrl); }
/** * Get the anonymous user id. * @return the anonymous user id. */ public static String getAnonymousId() { AgentFacade facade = new AgentFacade(); String agentString = facade.getAgentInstanceString(); return helper.getAnonymousId(agentString); }
/** * Get the anonymous user id. * @return the anonymous user id. */ public static String getAnonymousId() { AgentFacade facade = new AgentFacade(); String agentString = facade.getAgentInstanceString(); return helper.getAnonymousId(agentString); }
/** * Get the current site id. * @return the site id. */ public static String getCurrentSiteId() { AgentFacade facade = new AgentFacade(); boolean accessViaUrl = facade.isAccessViaUrl(); return helper.getCurrentSiteId(accessViaUrl); }
public List<AgentFacade> getAgentsWithoutAccess(Long questionPoolId, String realmId) { List<AgentFacade> agents = new ArrayList<AgentFacade>(); try { // Get agents with access List<AgentFacade> agentsWithAccess = getAgentsWithAccess(questionPoolId); List<String> azGroups = new ArrayList<String>(); azGroups.add("/site/" + realmId); // Get all agents Set<String> users = ComponentManager.get(AuthzGroupService.class).getUsersIsAllowed("assessment.questionpool.create", azGroups); // Create the AgentFacade for (String userId : users) { AgentFacade agent = new AgentFacade(userId); agents.add(agent); } agents.removeAll(agentsWithAccess); } catch (Exception e) { log.error(e.getMessage(), e); } return agents; }
/** * Get the current site id. * @return the site id. */ public static String getCurrentSiteId() { AgentFacade facade = new AgentFacade(); boolean accessViaUrl = facade.isAccessViaUrl(); return helper.getCurrentSiteId(accessViaUrl); }
public List<AgentFacade> getAgentsWithoutAccess(Long questionPoolId, String realmId) { List<AgentFacade> agents = new ArrayList<AgentFacade>(); try { // Get agents with access List<AgentFacade> agentsWithAccess = getAgentsWithAccess(questionPoolId); List<String> azGroups = new ArrayList<String>(); azGroups.add("/site/" + realmId); // Get all agents Set<String> users = ComponentManager.get(AuthzGroupService.class).getUsersIsAllowed("assessment.questionpool.create", azGroups); // Create the AgentFacade for (String userId : users) { AgentFacade agent = new AgentFacade(userId); agents.add(agent); } agents.removeAll(agentsWithAccess); } catch (Exception e) { log.error(e.getMessage(), e); } return agents; }
/** * Get the current site name. * @return the site name. */ public static String getCurrentSiteName() { AgentFacade facade = new AgentFacade(); boolean accessViaUrl = facade.isAccessViaUrl(); return helper.getCurrentSiteName(accessViaUrl); }
public List<AgentFacade> getAgentsWithAccess(final Long questionPoolId) { final HibernateCallback<List<QuestionPoolAccessData>> hcb = session -> { Query q = session.createQuery("select qpa from QuestionPoolAccessData as qpa where qpa.questionPoolId = :id"); q.setLong("id", questionPoolId); return q.list(); }; List<QuestionPoolAccessData> qpaList = getHibernateTemplate().execute(hcb); List<AgentFacade> agents = new ArrayList<>(); for (QuestionPoolAccessData pool : qpaList) { AgentFacade agent = new AgentFacade(pool.getAgentId()); agents.add(agent); } return agents; }
public List<AgentFacade> getAgentsWithAccess(final Long questionPoolId) { final HibernateCallback<List<QuestionPoolAccessData>> hcb = session -> { Query q = session.createQuery("select qpa from QuestionPoolAccessData as qpa where qpa.questionPoolId = :id"); q.setLong("id", questionPoolId); return q.list(); }; List<QuestionPoolAccessData> qpaList = getHibernateTemplate().execute(hcb); List<AgentFacade> agents = new ArrayList<>(); for (QuestionPoolAccessData pool : qpaList) { AgentFacade agent = new AgentFacade(pool.getAgentId()); agents.add(agent); } return agents; }
agent = new AgentFacade(p.getLastModifiedBy()); if (agent != null) { lastModifiedBy = agent.getDisplayName();
agent = new AgentFacade(p.getLastModifiedBy()); if (agent != null) { lastModifiedBy = agent.getDisplayName();