Package com.bytedesk.core.utils
Class ConvertUtils
java.lang.Object
com.bytedesk.core.utils.ConvertUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddGrantedAuthorityIfPresent(Set<org.springframework.security.core.GrantedAuthority> authorities, String value) static AuthorityResponseconvertToAuthorityResponse(AuthorityEntity authorityEntity) static BytedeskPropertiesResponseconvertToBytedeskPropertiesResponse(BytedeskProperties bytedeskProperties) static MessageResponseconvertToMessageResponse(MessageEntity message) static MessageUnreadResponseprivate static OrganizationResponseSimpleconvertToOrganizationResponseSimple(OrganizationEntity organization) static RoleResponseconvertToRoleResponse(RoleEntity entity) private static RoleResponseSimpleprivate static Set<RoleResponseSimple>static ThreadProtobufconvertToThreadProtobuf(ThreadEntity thread) static ThreadResponseconvertToThreadResponse(ThreadEntity thread) static ThreadResponseSimplestatic UploadResponseconvertToUploadResponse(UploadEntity entity) static UserProtobufstatic Stringstatic UserResponseconvertToUserResponse(UserDetailsImpl userDetails) static UserResponseprivate static UserResponseSimplestatic Set<org.springframework.security.core.GrantedAuthority>private static StringfirstNonBlank(String... candidates) private static org.modelmapper.ModelMapperprivate static UserEntity.SexparseUserSex(String sexValue)
-
Constructor Details
-
ConvertUtils
public ConvertUtils()
-
-
Method Details
-
firstNonBlank
-
addGrantedAuthorityIfPresent
-
getModelMapper
private static org.modelmapper.ModelMapper getModelMapper() -
convertToUserResponse
-
convertToUserResponse
-
parseUserSex
-
convertToOrganizationResponseSimple
private static OrganizationResponseSimple convertToOrganizationResponseSimple(OrganizationEntity organization) -
convertToUserResponseSimpleManual
-
convertToRoleResponseSimples
-
convertToRoleResponseSimpleManual
-
filterUserGrantedAuthorities
public static Set<org.springframework.security.core.GrantedAuthority> filterUserGrantedAuthorities(UserEntity user) -
convertToUserProtobuf
-
convertToUserProtobufString
-
convertToThreadProtobuf
-
convertToThreadResponse
-
convertToThreadResponseSimple
-
convertToRoleResponse
-
convertToMessageResponse
-
convertToAuthorityResponse
-
convertToBytedeskPropertiesResponse
public static BytedeskPropertiesResponse convertToBytedeskPropertiesResponse(BytedeskProperties bytedeskProperties) -
convertToUploadResponse
-
convertToMessageUnreadResponse
-