Assert.notNull(entityModel, "Parameter entity can not be null!");
Assert.notNull(userModel, "Parameter user can not be null!");
Assert.notNull(projectModel, "Parameter project can not be null!");
String entity = (String) entityModel.getAsString();
User user = (User) userModel.getWrappedObject();
Project project = (Project) projectModel.getWrappedObject();
String exist = existModel!=null ? existModel.getAsString() : null;
Object value = null;
if(Profile.NAME.equals(entity)) {
value = linkService.getLink(user.getProjectId(), project.getProfileId(), entity);
} else if (TeamMember.NAME.equals(entity)) {
value = memberService.getMember(project, user, Boolean.FALSE);
}
//
boolean flag = false;