Exemple #1
0
  public String save() {
    if (client.getUser() == null) {
      client.setUser(getSessionUser());
    }
    if (service.find(client.getClientId()) != null) {
      service.update(client);

    } else {
      service.create(client);
    }
    FacesContext.getCurrentInstance()
        .addMessage(
            null, new FacesMessage(FacesMessage.SEVERITY_INFO, "client saved successfully!", null));
    return "list";
  }
Exemple #2
0
  public List<Client> list() {
    List<Client> subList = new ArrayList<Client>();
    List<Client> fullList = new ArrayList<Client>();
    User authorizedUser = getSessionUser();
    logger.debug("Found authenticatedUser: "******"fullList:" + fullList + "\nsubList:" + subList.toString());
    return subList;
  }
Exemple #3
0
 @PostConstruct
 public void newClient() {
   client = new Client();
   client.setClientId(RandomStringUtils.randomAlphanumeric(20));
   client.setClientSecret(RandomStringUtils.randomAlphanumeric(20));
 }