Search in sources :

Example 1 with UserCredentialsId

use of org.thingsboard.server.common.data.id.UserCredentialsId in project thingsboard by thingsboard.

the class UserCredentialsEntity method toData.

@Override
public UserCredentials toData() {
    UserCredentials userCredentials = new UserCredentials(new UserCredentialsId(id));
    userCredentials.setCreatedTime(UUIDs.unixTimestamp(id));
    if (userId != null) {
        userCredentials.setUserId(new UserId(userId));
    }
    userCredentials.setEnabled(enabled);
    userCredentials.setPassword(password);
    userCredentials.setActivateToken(activateToken);
    userCredentials.setResetToken(resetToken);
    return userCredentials;
}
Also used : UserCredentialsId(org.thingsboard.server.common.data.id.UserCredentialsId) UserId(org.thingsboard.server.common.data.id.UserId) UserCredentials(org.thingsboard.server.common.data.security.UserCredentials)

Example 2 with UserCredentialsId

use of org.thingsboard.server.common.data.id.UserCredentialsId in project thingsboard by thingsboard.

the class UserCredentialsEntity method toData.

@Override
public UserCredentials toData() {
    UserCredentials userCredentials = new UserCredentials(new UserCredentialsId(getId()));
    userCredentials.setCreatedTime(UUIDs.unixTimestamp(getId()));
    if (userId != null) {
        userCredentials.setUserId(new UserId(toUUID(userId)));
    }
    userCredentials.setEnabled(enabled);
    userCredentials.setPassword(password);
    userCredentials.setActivateToken(activateToken);
    userCredentials.setResetToken(resetToken);
    return userCredentials;
}
Also used : UserCredentialsId(org.thingsboard.server.common.data.id.UserCredentialsId) UserId(org.thingsboard.server.common.data.id.UserId) UserCredentials(org.thingsboard.server.common.data.security.UserCredentials)

Aggregations

UserCredentialsId (org.thingsboard.server.common.data.id.UserCredentialsId)2 UserId (org.thingsboard.server.common.data.id.UserId)2 UserCredentials (org.thingsboard.server.common.data.security.UserCredentials)2