Search in sources :

Example 46 with User

use of com.autentia.tnt.businessobject.User in project TNTConcept by autentia.

the class AuthenticationManagerLdapImplTest method getUserAdmin.

private User getUserAdmin() {
    User userAdmin = new User();
    userAdmin.setDn("admin");
    userAdmin.setLdapPassword("adminPassword");
    return userAdmin;
}
Also used : User(com.autentia.tnt.businessobject.User)

Example 47 with User

use of com.autentia.tnt.businessobject.User in project TNTConcept by autentia.

the class BookBean method getLentTos.

// Getters to list possible values of related entities
/**
 * Get the list of all lentTos
 * @return the list of all lentTos
 */
public List<SelectItem> getLentTos() {
    List<User> refs = UserManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    for (User ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) User(com.autentia.tnt.businessobject.User) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Example 48 with User

use of com.autentia.tnt.businessobject.User in project TNTConcept by autentia.

the class CommissioningBean method getAllRevisers.

// Getters to list possible values of related entities
/**
 * Get the list of all revisers
 *
 * @return the list of all revisers
 */
public List<SelectItem> getAllRevisers() {
    List<User> refs = UserManager.getDefault().getAllEntities(null, new SortCriteria("name", true));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    for (User ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) User(com.autentia.tnt.businessobject.User) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Example 49 with User

use of com.autentia.tnt.businessobject.User in project TNTConcept by autentia.

the class ContactBean method deleteOwner.

public String deleteOwner() {
    final UIData table = (UIData) FacesUtils.getComponent("contact:owners");
    final User toDelete = (User) table.getRowData();
    contact.removeOwner(toDelete);
    if (contact.getOwners().isEmpty()) {
        FacesUtils.addWarningMessage("contact:ownersList", "editContact.emptyOwners", null);
    }
    return NavigationResults.EDIT;
}
Also used : User(com.autentia.tnt.businessobject.User) UIData(javax.faces.component.UIData)

Example 50 with User

use of com.autentia.tnt.businessobject.User in project TNTConcept by autentia.

the class OfferBean method getUsers.

// Getters to list possible values of related entities
/**
 * Get the list of all users
 *
 * @return the list of all users
 */
public List<SelectItem> getUsers() {
    List<User> refs = UserManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    for (User ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) User(com.autentia.tnt.businessobject.User) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Aggregations

User (com.autentia.tnt.businessobject.User)70 Test (org.junit.Test)24 ArrayList (java.util.ArrayList)17 SortCriteria (com.autentia.tnt.dao.SortCriteria)15 SelectItem (javax.faces.model.SelectItem)11 UserDAO (com.autentia.tnt.dao.hibernate.UserDAO)10 Date (java.util.Date)9 Link (com.autentia.tnt.businessobject.Link)6 UserSearch (com.autentia.tnt.dao.search.UserSearch)5 Attributes (javax.naming.directory.Attributes)5 BasicAttributes (javax.naming.directory.BasicAttributes)5 Activity (com.autentia.tnt.businessobject.Activity)4 Attribute (javax.naming.directory.Attribute)4 BasicAttribute (javax.naming.directory.BasicAttribute)4 GlobalHourReport (com.autentia.tnt.businessobject.GlobalHourReport)3 GlobalHoursReportBean (com.autentia.tnt.bean.activity.GlobalHoursReportBean)2 Commissioning (com.autentia.tnt.businessobject.Commissioning)2 Objective (com.autentia.tnt.businessobject.Objective)2 Occupation (com.autentia.tnt.businessobject.Occupation)2 DataIntegrityException (com.autentia.tnt.dao.DataIntegrityException)2