Package jp.co.nskint.uq.pd.signage.model

Examples of jp.co.nskint.uq.pd.signage.model.User


     * @param address 住所
     * @return 保存した管理者情報
     */
    public User put(String uid, String name, String mail,
            String phone, String zipcode, String address) {
        User result = null;
        Transaction tx = Datastore.beginTransaction();
        result = put(tx, uid, name, mail, phone, zipcode, address);

        tx.commit();

View Full Code Here


     * @param name 氏名
     * @param mail メールアドレス
     * @return 保存したユーザ情報
     */
    public User put(String uid, String name, String mail) {
        User result = null;
        Transaction tx = Datastore.beginTransaction();
        result = put(tx, uid, name, mail);

        tx.commit();

View Full Code Here

     * @param name 氏名
     * @param mail メールアドレス
     * @return 保存したユーザ情報
     */
    public User put(Transaction tx, String uid, String name, String mail) {
        User result = createOrSetUser(tx, uid, name, mail);

        Datastore.put(tx, result);

        return result;
    }
View Full Code Here

     * @param mail
     * @return
     */
    protected User createOrSetUser(Transaction tx, String uid, String name,
            String mail) {
        User result = get(tx, uid);
        if (result == null) {
            result = createModel();
            Key key = UserService.createKey(uid);
            result.setUid(key);
            // 初期化キーを設定
            result.setInitialKey(RandomStringUtils.randomAlphanumeric(16));
        }
        result.setName(name);
        result.setMail(new Email(mail));
        return result;
    }
View Full Code Here

     * @param uid ユーザID
     * @return ユーザ情報
     */
    public User get(String uid) {
        Transaction tx = Datastore.beginTransaction();
        User result = this.get(tx, uid);
        tx.commit();
        return result;
    }
View Full Code Here

     * @param tx トランザクション
     * @param uid ユーザID
     * @return ユーザ情報
     */
    protected User get(Transaction tx, String uid) {
        User result;
        result = Datastore.getOrNull(tx, UserMeta.get(), UserService.createKey(uid));
        return result;
    }
View Full Code Here

     * @param uid ユーザID
     * @param password パスワード
     */
    public void savePassword(String uid, String password) {
        Transaction tx = Datastore.beginTransaction();
        User user = Datastore.getOrNull(tx, UserMeta.get(), UserService.createKey(uid));
        user.setInitialKey("");
        user.setPassword(password);
        Datastore.put(tx, user);
        tx.commit();
    }
View Full Code Here

    public boolean checkDuplicationUid(String uid) {
        if (Pattern.matches(REGEXP_INVALID_UID, uid)) {
            return false;
        }
        Key key = UserService.createKey(uid);
        User user = Datastore.getOrNull(UserMeta.get(), key);
        return user == null;
    }
View Full Code Here

     * ログイン中かどうかチェックする。
     *
     * @return true:ログイン中 / false:未ログイン|セッションタイムアウト
     */
    protected boolean checkLogin() {
        User user = getLoginUser();
        return user != null;
    }
View Full Code Here

     * ログインユーザが管理者かどうかチェックする。
     *
     * @return true:管理者である / false:管理者ではない
     */
    protected boolean checkAdmin() {
        User user = getLoginUser();
        return user != null && user instanceof Administrator;
    }
View Full Code Here

TOP

Related Classes of jp.co.nskint.uq.pd.signage.model.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.