diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/AuthManager.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/AuthManager.java index c10e11a099..91947ce503 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/AuthManager.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/auth/AuthManager.java @@ -29,63 +29,101 @@ public interface AuthManager { - public boolean close(); - - public Id createUser(HugeUser user); - public Id updateUser(HugeUser user); - public HugeUser deleteUser(Id id); - public HugeUser findUser(String name); - public HugeUser getUser(Id id); - public List listUsers(List ids); - public List listAllUsers(long limit); - - public Id createGroup(HugeGroup group); - public Id updateGroup(HugeGroup group); - public HugeGroup deleteGroup(Id id); - public HugeGroup getGroup(Id id); - public List listGroups(List ids); - public List listAllGroups(long limit); - - public Id createTarget(HugeTarget target); - public Id updateTarget(HugeTarget target); - public HugeTarget deleteTarget(Id id); - public HugeTarget getTarget(Id id); - public List listTargets(List ids); - public List listAllTargets(long limit); - - public Id createBelong(HugeBelong belong); - public Id updateBelong(HugeBelong belong); - public HugeBelong deleteBelong(Id id); - public HugeBelong getBelong(Id id); - public List listBelong(List ids); - public List listAllBelong(long limit); - public List listBelongByUser(Id user, long limit); - public List listBelongByGroup(Id group, long limit); - - public Id createAccess(HugeAccess access); - public Id updateAccess(HugeAccess access); - public HugeAccess deleteAccess(Id id); - public HugeAccess getAccess(Id id); - public List listAccess(List ids); - public List listAllAccess(long limit); - public List listAccessByGroup(Id group, long limit); - public List listAccessByTarget(Id target, long limit); - - public Id createProject(HugeProject project); - public HugeProject deleteProject(Id id); - public Id updateProject(HugeProject project); - public Id projectAddGraphs(Id id, Set graphs); - public Id projectRemoveGraphs(Id id, Set graphs); - public HugeProject getProject(Id id); - public List listAllProject(long limit); - - public HugeUser matchUser(String name, String password); - public RolePermission rolePermission(AuthElement element); - - public String loginUser(String username, String password) - throws AuthenticationException; - public void logoutUser(String token); - - public UserWithRole validateUser(String username, String password); - public UserWithRole validateUser(String token); + boolean close(); + + Id createUser(HugeUser user); + + Id updateUser(HugeUser user); + + HugeUser deleteUser(Id id); + + HugeUser findUser(String name); + + HugeUser getUser(Id id); + + List listUsers(List ids); + + List listAllUsers(long limit); + + Id createGroup(HugeGroup group); + + Id updateGroup(HugeGroup group); + + HugeGroup deleteGroup(Id id); + + HugeGroup getGroup(Id id); + + List listGroups(List ids); + + List listAllGroups(long limit); + + Id createTarget(HugeTarget target); + + Id updateTarget(HugeTarget target); + + HugeTarget deleteTarget(Id id); + + HugeTarget getTarget(Id id); + + List listTargets(List ids); + + List listAllTargets(long limit); + + Id createBelong(HugeBelong belong); + + Id updateBelong(HugeBelong belong); + + HugeBelong deleteBelong(Id id); + + HugeBelong getBelong(Id id); + + List listBelong(List ids); + + List listAllBelong(long limit); + + List listBelongByUser(Id user, long limit); + + List listBelongByGroup(Id group, long limit); + + Id createAccess(HugeAccess access); + + Id updateAccess(HugeAccess access); + + HugeAccess deleteAccess(Id id); + + HugeAccess getAccess(Id id); + + List listAccess(List ids); + + List listAllAccess(long limit); + + List listAccessByGroup(Id group, long limit); + + List listAccessByTarget(Id target, long limit); + + Id createProject(HugeProject project); + + HugeProject deleteProject(Id id); + + Id updateProject(HugeProject project); + + Id projectAddGraphs(Id id, Set graphs); + + Id projectRemoveGraphs(Id id, Set graphs); + + HugeProject getProject(Id id); + + List listAllProject(long limit); + + HugeUser matchUser(String name, String password); + + RolePermission rolePermission(AuthElement element); + + String loginUser(String username, String password) throws AuthenticationException; + + void logoutUser(String token); + + UserWithRole validateUser(String username, String password); + + UserWithRole validateUser(String token); } diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolder.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolder.java index fb05714361..c8660a4f71 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolder.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/page/IdHolder.java @@ -41,7 +41,7 @@ public abstract class IdHolder { protected boolean exhausted; public IdHolder(Query query) { - E.checkNotNull(query, "query");; + E.checkNotNull(query, "query"); this.query = query; this.exhausted = false; }