Package open.dolphin.delegater

Examples of open.dolphin.delegater.UserDelegater


     */
    public void tryLogin() {
       
        // User 情報を取得するためのデリゲータを得る
        if (userDlg == null) {
            userDlg = new UserDelegater();
        }
       
        // Part11 ロガーを取得する
        if (part11Logger == null) {
            part11Logger = ClientContext.getPart11Logger();
View Full Code Here


                updateRole.setUserId(updateModel.getUserId());
                updateModel.addRole(updateRole);
            }
           
            // タスクを実行する
            final UserDelegater udl = new UserDelegater();
            int maxEstimation = ClientContext.getInt("task.default.maxEstimation");
            int delay = ClientContext.getInt("task.default.delay");
            String message = null;
            Component c = getFrame();
           
            Task task = new Task<Boolean>(c, message, PROGRESS_NOTE, maxEstimation) {
       
                @Override
                protected Boolean doInBackground() throws Exception {
                    logger.debug("ChangePassword doInBackground");
                    int cnt = udl.updateUser(updateModel);
                    return cnt > 0 ? true : false;
                }
               
                @Override
                protected void succeeded(Boolean result) {
                    logger.debug("ChangePassword succeeded");

                    if (udl.isNoError()) {
                        //
                        // Project を更新する
                        //
                        Project.getProjectStub().setUserModel(updateModel);
                        DolphinPrincipal principal = new DolphinPrincipal();
                        principal.setUserId(updateModel.idAsLocal());
                        principal.setFacilityId(updateModel.getFacilityModel().getFacilityId());
                        Project.getProjectStub().setUserId(updateModel.idAsLocal());
                        Project.getProjectStub().setDolphinPrincipal(principal);
                       
                        JOptionPane.showMessageDialog(getFrame(),
                                SUCCESS_MESSAGE,
                                ClientContext.getFrameTitle(getName()),
                                JOptionPane.INFORMATION_MESSAGE);
                    } else {
                        JOptionPane.showMessageDialog(getFrame(),
                                udl.getErrorMessage(),
                                ClientContext.getFrameTitle(getName()),
                                JOptionPane.WARNING_MESSAGE);
                    }
                }
            };
View Full Code Here

        /**
         * 施設内の全ユーザを取得する。
         */
        private void getUsers() {

            final UserDelegater udl = new UserDelegater();

            int maxEstimation = ClientContext.getInt("task.default.maxEstimation");
            int delay = ClientContext.getInt("task.default.delay");
            String note = ClientContext.getString("task.default.searchMessage");
            String message = null;
            Component c = getFrame();

            Task task = new Task<ArrayList>(c, message, note, maxEstimation) {

                @Override
                protected ArrayList doInBackground() throws Exception {
                    logger.debug("getUsers doInBackground");
                    ArrayList result = udl.getAllUser();
                    return result;
                }

                @Override
                protected void succeeded(ArrayList results) {
                    logger.debug("getUsers succeeded");
                    if (udl.getErrorCode() == BusinessDelegater.NO_ERROR) {
                        tableModel.setObjectList(results);
                    } else {
                        JOptionPane.showMessageDialog(getFrame(),
                                udl.getErrorMessage(),
                                ClientContext.getFrameTitle(getName()),
                                JOptionPane.WARNING_MESSAGE);
                    }
                }
            };
View Full Code Here

            boolean deleteDoc = true;
            if (entry.getLicenseModel().getLicense().equals("doctor")) {
                deleteDoc = false;
            }

            final UserDelegater udl = new UserDelegater();

            int maxEstimation = ClientContext.getInt("task.default.maxEstimation");
            int delay = ClientContext.getInt("task.default.delay");
            String note = ClientContext.getString("task.default.deleteMessage");
            String message = null;
            Component c = getFrame();

            final String deleteId = entry.getUserId();

            Task task = new Task<ArrayList>(c, message, note, maxEstimation) {

                @Override
                protected ArrayList doInBackground() throws Exception {
                    logger.debug("deleteUser doInBackground");
                    ArrayList result = null;
                    if (udl.removeUser(deleteId) > 0) {
                        result = udl.getAllUser();
                    }
                    return result;
                }

                @Override
                protected void succeeded(ArrayList results) {
                    logger.debug("deleteUser succeeded");
                    if (udl.getErrorCode() == BusinessDelegater.NO_ERROR) {
                        tableModel.setObjectList(results);
                        JOptionPane.showMessageDialog(getFrame(),
                                DELETE_USER_SUCCESS_MSG,
                                ClientContext.getFrameTitle(getName()),
                                JOptionPane.INFORMATION_MESSAGE);

                    } else {
                        JOptionPane.showMessageDialog(getFrame(),
                                udl.getErrorMessage(),
                                ClientContext.getFrameTitle(getName()),
                                JOptionPane.WARNING_MESSAGE);
                    }
                }
            };
View Full Code Here

            user.addRole(rm);
            rm.setUser(user);
            rm.setUserId(user.getUserId()); // 必要

            // タスクを実行する
            final UserDelegater udl = new UserDelegater();

            int maxEstimation = ClientContext.getInt("task.default.maxEstimation");
            int delay = ClientContext.getInt("task.default.delay");
            String addMsg = ClientContext.getString("task.default.addMessage");
            String message = null;
            Component c = getFrame();

            Task task = new Task<Boolean>(c, message, addMsg, maxEstimation) {

                @Override
                protected Boolean doInBackground() throws Exception {
                    logger.debug("addUserEntry doInBackground");
                    int cnt = udl.putUser(user);
                    return (cnt > 0);
                }

                @Override
                protected void succeeded(Boolean results) {
                    logger.debug("addUserEntry succeeded");
                    if (results.booleanValue()) {
                        JOptionPane.showMessageDialog(getFrame(),
                                ADD_USER_SUCCESS_MSG,
                                ClientContext.getFrameTitle(getName()),
                                JOptionPane.INFORMATION_MESSAGE);

                    } else {
                        JOptionPane.showMessageDialog(getFrame(),
                                udl.getErrorMessage(),
                                ClientContext.getFrameTitle(getName()),
                                JOptionPane.WARNING_MESSAGE);
                    }
                }
            };
View Full Code Here

            // 登録日
            // 変更しない

            // タスクを実行する
            final UserDelegater udl = new UserDelegater();

            int maxEstimation = ClientContext.getInt("task.default.maxEstimation");
            int delay = ClientContext.getInt("task.default.delay");
            String updateMsg = ClientContext.getString("task.default.updateMessage");
            String message = null;
            Component c = getFrame();

            Task task = new Task<Boolean>(c, message, updateMsg, maxEstimation) {

                @Override
                protected Boolean doInBackground() throws Exception {
                    logger.debug("updateUser doInBackground");
                    int cnt = udl.updateFacility(user);
                    return (cnt > 0);
                }

                @Override
                protected void succeeded(Boolean result) {
                    logger.debug("updateUser succeeded");
                    if (result.booleanValue()) {
                        JOptionPane.showMessageDialog(getFrame(),
                                FACILITY_SUCCESS_MSG,
                                ClientContext.getFrameTitle(getName()),
                                JOptionPane.INFORMATION_MESSAGE);
                    } else {
                        JOptionPane.showMessageDialog(getFrame(),
                                udl.getErrorMessage(),
                                ClientContext.getFrameTitle(getName()),
                                JOptionPane.WARNING_MESSAGE);
                    }
                }
            };
View Full Code Here

TOP

Related Classes of open.dolphin.delegater.UserDelegater

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.