Package de.iritgo.aktera.authentication.defaultauth.entity

Examples of de.iritgo.aktera.authentication.defaultauth.entity.AkteraUser


  private SecurityContext securityContext;

  @PayloadRoot(localPart = "countJournalRequest", namespace = "http://aktera.iritgo.de/webservices/journal")
  public CountJournalResponse count(CountJournalRequest request) throws Exception
  {
    AkteraUser user = securityContext.getUser();
    CountJournalResponse response = new CountJournalResponse();

    response.setCount((int) journalManager.countJournalEntries(request.getQuery(), new Timestamp(0), new Timestamp(
            new Date().getTime()), user.getId(), ""));

    return response;
  }
View Full Code Here


  }

  @PayloadRoot(localPart = "listJournalRequest", namespace = "http://aktera.iritgo.de/webservices/journal")
  public ListJournalResponse list(ListJournalRequest request) throws Exception
  {
    AkteraUser user = securityContext.getUser();
    int firstResult = request.getFirstResult() != null ? request.getFirstResult().intValue() : 0;
    int maxResults = request.getMaxResults() != null ? request.getMaxResults().intValue() : 100;
    SortOrder orderDir = request.getOrderDir() != null ? SortOrder.byId(request.getOrderDir())
            : SortOrder.ASCENDING;
    String orderBy = StringTools.isNotTrimEmpty(request.getOrderBy()) ? request.getOrderBy() : "journal.occurredAt";

    ListJournalResponse response = new ListJournalResponse();
    DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();

    for (Map<String, Object> entry : journalManager.listJournalEntries(request.getQuery(), new Timestamp(0),
            new Timestamp(new Date().getTime()), user.getId(), "", orderBy, orderDir, firstResult,
            maxResults))
    {
      ListJournalResponse.Entry entryElement = new ListJournalResponse.Entry();

      entryElement.setId((long) (Integer) entry.get("id"));
View Full Code Here

   * @see de.iritgo.aktera.ui.listing.ListingHandler#createSearchCategories(de.iritgo.aktera.model.ModelRequest, ListingDescriptor)
   */
  public Map<String, String> createSearchCategories(ModelRequest request, ListingDescriptor listing)
    throws ModelException
  {
    AkteraUser user = userDAO.findUserById(UserTools.getCurrentUserId(request));
    TreeMap searchTypes = new TreeMap();

    for (JournalSearch search : journalSearches.values())
    {
      searchTypes.put(search.getCategoryId(), search.getCategoryLabel(user));
View Full Code Here

  }

  public ListFiller createListing(ModelRequest request, ListingDescriptor listing, ListingHandler handler,
          ListContext context) throws ModelException, PersistenceException
  {
    AkteraUser user = userDAO.findUserById(UserTools.getCurrentUserId(request));

    String search = StringTools.trim((String) request.getParameter("listSearch"));
    String condition = "";
    Map<String, Object> conditionMap = null;
View Full Code Here

   * @see de.iritgo.aktera.authentication.Authenticator#authenticate(java.lang.String,
   *      java.lang.String)
   */
  public boolean authenticate(String userName, String loginPassword)
  {
    AkteraUser user = userDAO.findUserByName(userName);

    if (user == null || ! StringTools.digest(loginPassword).equals(user.getPassword()))
    {
      return false;
    }

    return true;
View Full Code Here

  /**
   * @see de.iritgo.aktera.authentication.defaultauth.UserManager#renameUser(java.lang.String, java.lang.String, String, String, String)
   */
  public void renameUser(String oldName, String newName, String newFirstName, String newLastName, String newEmail)
  {
    AkteraUser user = userDAO.findUserByName(oldName);

    if (user == null)
    {
      return;
    }

    user.setName(newName);

    if (StringTools.isNotTrimEmpty(newEmail))
    {
      user.setEmail(newEmail);
    }

    userDAO.updateUser(user);

    Properties props = new Properties();

    props.put("id", user.getId());
    props.put("oldName", oldName);
    props.put("newName", newName);
    props.put("newFirstName", newFirstName);
    props.put("newLastName", newLastName);
    props.put("newEmail", newEmail);
View Full Code Here

    {
      return false;
    }

    String ldapName = userName;
    AkteraUser user = userDAO.findUserByName(userName);

    if (user != null && StringTools.isNotTrimEmpty(user.getLdapName()))
    {
      ldapName = user.getLdapName();
    }

    String server = systemConfigManager.getString("ldap", "authHost");

    if (StringTools.isTrimEmpty(server))
View Full Code Here

    if (principal != null)
    {
      return;
    }

    AkteraUser akteraUser = userDAO.findUserByName(userName);
    if (akteraUser == null)
    {
      return;
    }
View Full Code Here

  @PayloadRoot(localPart = "listAddressStoresRequest", namespace = "http://aktera.iritgo.de/webservices/address")
  public ListAddressStoresResponse listAddressStores(@SuppressWarnings("unused") ListAddressStoresRequest request)
    throws Exception
  {
    AkteraUser user = securityContext.getUser();
    ListAddressStoresResponse response = new ListAddressStoresResponse();
    for (Tuple3<Integer, String, String> store : addressManager.listAddressStoresIdAndNameAndTitle())
    {
      if (permissionManager.hasPermission(user.getName(), "de.iritgo.aktera.address.view",
              AddressStore.class.getName(), store.get1()))
      {
        ListAddressStoresResponse.AddressStore as = new ListAddressStoresResponse.AddressStore();
        as.setId(store.get1());
        as.setName(store.get2());
View Full Code Here

  @PayloadRoot(localPart = "getDefaultAddressStoreNameRequest", namespace = "http://aktera.iritgo.de/webservices/address")
  public GetDefaultAddressStoreNameResponse getDefaultAddressStoreName(
          @SuppressWarnings("unused") GetDefaultAddressStoreNameRequest request) throws Exception
  {
    GetDefaultAddressStoreNameResponse response = new GetDefaultAddressStoreNameResponse();
    AkteraUser user = securityContext.getUser();
    AddressStore store = null;
    store = addressManager.getAddressStoreById(preferencesManager.getInt(user.getId(), "address",
            "defaultAddressStore", - 1));
    if (store.getId() == - 1)
    {
      store = addressManager.getDefaultAddressStore();
    }
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.authentication.defaultauth.entity.AkteraUser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.