public String getOwnerDisplayName() { String ownerIdString = this.getOwnerId(); String ownerDisplayName= AgentFacade.getDisplayName(ownerIdString); return ownerDisplayName; }
public String getOwnerDisplayName() { String ownerIdString = this.getOwnerId(); String ownerDisplayName= AgentFacade.getDisplayName(ownerIdString); return ownerDisplayName; }
/** * Delete a pool */ public void deletePool(Long poolId, String agentId, Tree tree) { try { QuestionPoolFacade qp = PersistenceService.getInstance(). getQuestionPoolFacadeQueries().getPool(poolId, agentId); // you are not allowed to delete pool if you are not the owner if (!qp.getOwnerId().equals(agentId)) throw new Exception("You are not allowed to delete pool if you are not the owner"); PersistenceService.getInstance().getQuestionPoolFacadeQueries(). deletePool(poolId, agentId, tree); } catch(Exception e) { log.error(e.getMessage(), e); throw new RuntimeException(e); } }
/** * Delete a pool */ public void deletePool(Long poolId, String agentId, Tree tree) { try { QuestionPoolFacade qp = PersistenceService.getInstance(). getQuestionPoolFacadeQueries().getPool(poolId, agentId); // you are not allowed to delete pool if you are not the owner if (!qp.getOwnerId().equals(agentId)) throw new Exception("You are not allowed to delete pool if you are not the owner"); PersistenceService.getInstance().getQuestionPoolFacadeQueries(). deletePool(poolId, agentId, tree); } catch(Exception e) { log.error(e.getMessage(), e); throw new RuntimeException(e); } }
this.description = getDescription(); this.questionPoolType = getType(); this.ownerId = getOwnerId(); this.owner = getOwner(); this.dateCreated = getDateCreated();
this.description = getDescription(); this.questionPoolType = getType(); this.ownerId = getOwnerId(); this.owner = getOwner(); this.dateCreated = getDateCreated();