Class UserModel
- java.lang.Object
-
- com.composum.sling.core.usermanagement.model.AuthorizableModel
-
- com.composum.sling.core.usermanagement.model.UserModel
-
- All Implemented Interfaces:
Serializable
,Comparable<AuthorizableModel>
- Direct Known Subclasses:
ServiceUserModel
public class UserModel extends AuthorizableModel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
admin
protected boolean
disabled
protected String
disabledReason
protected boolean
systemUser
protected org.apache.sling.api.resource.ValueMap
values
-
Fields inherited from class com.composum.sling.core.usermanagement.model.AuthorizableModel
context, declaredMemberOf, id, memberOf, path, principalName, type, TYPE_GROUP, TYPE_SERVICE, TYPE_TO_ICON, TYPE_USER
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserModel(Authorizables.Context context, @NotNull AuthorizableWrapper authorizable)
UserModel(Authorizables.Context context, @NotNull UserWrapper jcrUser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable String
getDisabledReason()
protected int
getRank()
Collection<AuthorizableModel>
getServiceUsers()
@NotNull String
getTypeIcon()
boolean
isAdmin()
boolean
isDisabled()
boolean
isGroup()
boolean
isServiceUser()
boolean
isSystemUser()
protected void
toJsonData(com.google.gson.stream.JsonWriter writer)
-
Methods inherited from class com.composum.sling.core.usermanagement.model.AuthorizableModel
compareTo, equals, getDeclaredMemberOf, getDeclaredModelOf, getGroups, getId, getKey, getMemberOf, getModelOf, getModels, getPath, getPrincipalName, getType, getType, getUsers, hashCode, stripIDs, toJson
-
-
-
-
Field Detail
-
values
protected final org.apache.sling.api.resource.ValueMap values
-
admin
protected final boolean admin
-
systemUser
protected final boolean systemUser
-
disabled
protected final boolean disabled
-
disabledReason
protected final String disabledReason
-
-
Constructor Detail
-
UserModel
public UserModel(@NotNull Authorizables.Context context, @NotNull @NotNull UserWrapper jcrUser) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
UserModel
protected UserModel(@NotNull Authorizables.Context context, @NotNull @NotNull AuthorizableWrapper authorizable) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
-
Method Detail
-
getRank
protected int getRank()
- Specified by:
getRank
in classAuthorizableModel
-
isGroup
public boolean isGroup()
- Specified by:
isGroup
in classAuthorizableModel
-
getTypeIcon
@NotNull public @NotNull String getTypeIcon()
- Overrides:
getTypeIcon
in classAuthorizableModel
-
isAdmin
public boolean isAdmin()
-
isSystemUser
public boolean isSystemUser()
-
isServiceUser
public boolean isServiceUser()
-
isDisabled
public boolean isDisabled()
-
getDisabledReason
@Nullable public @Nullable String getDisabledReason()
-
getServiceUsers
public Collection<AuthorizableModel> getServiceUsers()
-
toJsonData
protected void toJsonData(com.google.gson.stream.JsonWriter writer) throws IOException
- Overrides:
toJsonData
in classAuthorizableModel
- Throws:
IOException
-
-