Package de.kosmos_lab.web.data
Class User
- java.lang.Object
-
- de.kosmos_lab.web.data.User
-
- All Implemented Interfaces:
IUser,JSONPersistenceObject
public class User extends Object implements JSONPersistenceObject, IUser
-
-
Field Summary
-
Fields inherited from interface de.kosmos_lab.web.data.IUser
LEVEL_ADMIN
-
-
Constructor Summary
Constructors Constructor Description User(ControllerWithPersistence server, String uuid, String username, String hash, String salt, int userLevel)User(ControllerWithPersistence server, UUID uuid, String username, String hash, String salt, int userLevel)User(JSONPersistence persistence, org.json.JSONObject jsonObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanAccess(int level)booleancheckPassword(String password)intgetLevel()StringgetName()UUIDgetUUID()booleanisAdmin()org.json.JSONObjecttoJSON()org.json.JSONObjecttoJWT()
-
-
-
Constructor Detail
-
User
public User(ControllerWithPersistence server, String uuid, String username, String hash, String salt, int userLevel)
-
User
public User(ControllerWithPersistence server, UUID uuid, String username, String hash, String salt, int userLevel)
-
User
public User(JSONPersistence persistence, org.json.JSONObject jsonObject)
-
-
Method Detail
-
toJSON
public org.json.JSONObject toJSON()
- Specified by:
toJSONin interfaceJSONPersistenceObject
-
checkPassword
public boolean checkPassword(String password)
- Specified by:
checkPasswordin interfaceIUser
-
-