コード例 #1
0
 @Override
 public String getCurrentWorkspaceId(String userId) {
   User user = findById(userId);
   checkNotNull(user, "Could not find user: " + userId);
   Vertex userVertex = findByIdUserVertex(user.getUserId());
   return UserVisalloProperties.CURRENT_WORKSPACE.getPropertyValue(userVertex);
 }
コード例 #2
0
 @Override
 public User setCurrentWorkspace(String userId, String workspaceId) {
   User user = findById(userId);
   checkNotNull(user, "Could not find user: " + userId);
   Vertex userVertex = findByIdUserVertex(user.getUserId());
   UserVisalloProperties.CURRENT_WORKSPACE.setProperty(
       userVertex, workspaceId, VISIBILITY.getVisibility(), authorizations);
   graph.flush();
   return user;
 }