Package com.tmm.enterprise.microblog.domain

Examples of com.tmm.enterprise.microblog.domain.Contactable


  public void connect(String userName, long connectId) throws ButterflyException {
    Account acc = accountService.loadAccountByUserName(userName);
    if (acc != null) {
      Person user = acc.getUserProfile();
      if (user != null) {
        Contactable c = loadContactable(connectId);
        user.addFollowing(c);
      } else {
        throw new ButterflyException(ButterflyExceptionCode.CONTACT002_ERRORMAKINGCONNECTION, "Error making connection: ");
      }
    } else {
View Full Code Here


    // current user
    Account acc = accountService.loadAccountByUserName(currentUserName);
    Person currentUser = acc.getUserProfile();
    // assigning to
    if (currentUser != null) {
      Contactable contact = contactService.loadContactable(assignedToId);
      Question q = new Question();
      q.setTitle(title);
      q.setDetails(description);
      q.setRaisedBy(currentUser);
      q.setAssignedTo(contact);
View Full Code Here

  @Transactional
  public void createWorkTask(String title, String description, String currentUserName, long assignedToId, String priority) {
    Account acc = accountService.loadAccountByUserName(currentUserName);
    Person currentUser = acc.getUserProfile();
    if (currentUser != null) {
      Contactable contact = contactService.loadContactable(assignedToId);
      WorkTask wt = new WorkTask();
      wt.setTitle(title);
      wt.setDetails(description);
      wt.setPriority(WorkTask.Priorities.valueOf(priority));
      wt.setRaisedBy(currentUser);
View Full Code Here

  public void updateWorkTask(String state, String body, String userName, long assignedToId, String priority, long taskId) {
    WorkTask wt = loadWorkTask(taskId);
    wt.setState(State.valueOf(state));
    wt.setPriority(Priorities.valueOf(priority));
    if (wt.getAssignedTo().getId() != assignedToId) {
      Contactable ass = contactService.loadContactable(assignedToId);
      wt.setAssignedTo(ass);
    }

    if (body != null && !"".equals(body.trim())) {
      Account acc = accountService.loadAccountByUserName(userName);
View Full Code Here

  }

  @Transactional
  public void removeTodo(long id) {
    ToDo todo = getEntityManager().find(ToDo.class, id);
    Contactable raiser = todo.getRaisedBy();
    List<ToDo> todos = raiser.getTodoItems();
    todos.remove(todo);
    todo.setRaisedBy(null);
  }
View Full Code Here

TOP

Related Classes of com.tmm.enterprise.microblog.domain.Contactable

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.