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 booleanadminprotected booleandisabledprotected StringdisabledReasonprotected booleansystemUserprotected org.apache.sling.api.resource.ValueMapvalues-
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 protectedUserModel(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 StringgetDisabledReason()protected intgetRank()Collection<AuthorizableModel>getServiceUsers()@NotNull StringgetTypeIcon()booleanisAdmin()booleanisDisabled()booleanisGroup()booleanisServiceUser()booleanisSystemUser()protected voidtoJsonData(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:
getRankin classAuthorizableModel
-
isGroup
public boolean isGroup()
- Specified by:
isGroupin classAuthorizableModel
-
getTypeIcon
@NotNull public @NotNull String getTypeIcon()
- Overrides:
getTypeIconin 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:
toJsonDatain classAuthorizableModel- Throws:
IOException
-
-