contract/lib/BeanUser.js
/**
     * Creates a new prototype of BeanUser receiving parameters.
     * @param {BeanUser} user A kind of BeanUser configured with values.
     */
Creates a new prototype of BeanUser receiving parameters.
@param {BeanUser} user A kind of BeanUser configured with values.
Creates a new prototype of BeanUser receiving parameters . @param { BeanUser } user A kind of BeanUser configured with values .
static createBeanUser(user){
        let newInstance = new BeanUser();
        newInstance.setType(user.type);
        newInstance.setVersion(user.version);
        newInstance.setUserId(user.userId);
        newInstance.setKeys(user.keys);
        newInstance.setPassphrase(user.passphrase);
        newInstance.setPassword(user.password);
        newInstance.setInitVector(user.initVector);
        if (user.publicId != undefined && user.publicId != ''){
            newInstance.setPublicId(user.publicId);
        } else {
            newInstance.setPublicId(BeanUser.generateHashForPublicId(newInstance));
        }
        newInstance.setSignatureOfUserInfos(user.signatureOfUserInfos);
        return newInstance;
    }
static createBeanUser ( user ) { let newInstance = new BeanUser ( ) ; newInstance . setType ( user . type ) ; newInstance . setVersion ( user . version ) ; newInstance . setUserId ( user . userId ) ; newInstance . setKeys ( user . keys ) ; newInstance . setPassphrase ( user . passphrase ) ; newInstance . setPassword ( user . password ) ; newInstance . setInitVector ( user . initVector ) ; if ( user . publicId != undefined && user . publicId != '' ) { newInstance . setPublicId ( user . publicId ) ; } else { newInstance . setPublicId ( BeanUser . generateHashForPublicId ( newInstance ) ) ; } newInstance . setSignatureOfUserInfos ( user . signatureOfUserInfos ) ; return newInstance ; }
Creates a new prototype of BeanUser receiving parameters.
Creates a new prototype of BeanUser receiving parameters .