Ejemplo n.º 1
0
 @Override
 public User setStatus(String userId, UserStatus status) {
   VertexiumUser user = (VertexiumUser) findById(userId);
   checkNotNull(user, "Could not find user: " + userId);
   Vertex userVertex = findByIdUserVertex(user.getUserId());
   UserVisalloProperties.STATUS.setProperty(
       userVertex, status.toString(), VISIBILITY.getVisibility(), authorizations);
   graph.flush();
   user.setUserStatus(status);
   return user;
 }
Ejemplo n.º 2
0
 @Override
 public void setPropertyOnUser(User user, String propertyName, Object value) {
   if (user instanceof SystemUser) {
     throw new VisalloException("Cannot set properties on system user");
   }
   Vertex userVertex = findByIdUserVertex(user.getUserId());
   userVertex.setProperty(propertyName, value, VISIBILITY.getVisibility(), authorizations);
   if (user instanceof VertexiumUser) {
     ((VertexiumUser) user).setProperty(propertyName, value);
   }
 }