Package com.tmm.enterprise.microblog.core.exception

Examples of com.tmm.enterprise.microblog.core.exception.ButterflyException


      return convertToJson((Team) c);
    } else if (c instanceof Person) {
      return convertToJson((Person) c);
    }

    throw new ButterflyException(ButterflyExceptionCode.CONTACT003_UNSUPPORTEDCONTACTABLE, "unsupported Contactable type found");
  }
View Full Code Here


    if (team != null) {
      return team;
    }

    // if nothing returned now then lets throw an exception
    throw new ButterflyException(ButterflyExceptionCode.CONTACT001_CONTACTABLENOTFOUND, "No User/Team found matching name: " + contactName);
  }
View Full Code Here

      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 {
      throw new ButterflyException(ButterflyExceptionCode.CONTACT002_ERRORMAKINGCONNECTION, "Error making connection: ");
    }

  }
View Full Code Here

    Person sender = senderAcc.getUserProfile();
    try {
      Long id = Long.parseLong(recipId);
      recipient = contactService.loadPerson(id);
    } catch (Exception e) {
      throw new ButterflyException(ButterflyExceptionCode.USER002_INVALIDUSERID, "Invalid recipient ID provided - ID must be numeric", e);
    }

    PrivateMessage pm = new PrivateMessage();
    pm.setDetails(msg);
    pm.setAssignedTo(recipient);
View Full Code Here

    case TRACKER:
      return searchTasksByTitle(searchTerm);
    case PROJECT:
      return searchActivityByTitle(searchTerm);
    }
    throw new ButterflyException(ButterflyExceptionCode.SEARCH001_INVALIDSEARCHCONTEXT,
        "Error attempting to search - invalid Activity search context");
  }
View Full Code Here

      todo.setAssignedTo(currentUser);
      currentUser.addTodoItem(todo);
      todoDao.persist(todo);
      return todo;
    }
    throw new ButterflyException(ButterflyExceptionCode.USER003_INVALIDUSER, "Unable to create new ToDo - Account does not have associated Person");
  }
View Full Code Here

TOP

Related Classes of com.tmm.enterprise.microblog.core.exception.ButterflyException

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.