Package open.dolphin.infomodel

Examples of open.dolphin.infomodel.UserModel


            this.setBorder(BorderFactory.createEmptyBorder(12, 12, 11, 11));
        }

        public void get() {

            UserModel user = Project.getUserModel();
            FacilityModel facility = user.getFacilityModel();

            if (facility.getFacilityName() != null) {
                facilityName.setText(facility.getFacilityName());
            }
View Full Code Here


            }
        }

        private void update() {

            final UserModel user = Project.getUserModel();
            // ディタッチオブジェクトが必要である
            FacilityModel facility = user.getFacilityModel();

            // 医療機関コードは変更できない

            // 施設名
            String val = facilityName.getText().trim();
View Full Code Here

                // オブジェクトをテーブルに表示する
                @Override
                public Object getValueAt(int row, int col) {

                    UserModel entry = (UserModel) getObject(row);
                    if (entry == null) {
                        return null;
                    }

                    String ret = null;

                    switch (col) {

                        case 0:
                            ret = entry.idAsLocal();
                            break;

                        case 1:
                            ret = entry.getSirName();
                            break;

                        case 2:
                            ret = entry.getGivenName();
                            break;

                        case 3:
                            ret = entry.getLicenseModel().getLicenseDesc();
                            break;

                        case 4:
                            ret = entry.getDepartmentModel().getDepartmentDesc();
                            break;
                    }
                    return ret;
                }
            };

            table = new JTable(tableModel);
            // Selection を設定する
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            table.setRowSelectionAllowed(true);
            table.setToolTipText(DELETE_OK_USER_);
            ListSelectionModel m = table.getSelectionModel();
            m.addListSelectionListener(new ListSelectionListener() {

                @Override
                public void valueChanged(ListSelectionEvent e) {
                    if (e.getValueIsAdjusting() == false) {
                        // 削除ボタンをコントロールする
                        // 医療資格が other 以外は削除できない
                        int index = table.getSelectedRow();
                        if (index == -1) { return; }
                        UserModel entry = (UserModel) tableModel.getObject(index);
                        if (entry == null) {
                            return;
                        } else {
                            controleDelete(entry);
                        }
View Full Code Here

         *
         */
        private void deleteUser() {

            int row = table.getSelectedRow();
            UserModel entry = (UserModel) tableModel.getObject(row);
            if (entry == null) {
                return;
            }

            //
            // 作成したドキュメントも削除するかどうかを選ぶ
            //
            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 {
View Full Code Here

                return;
            }

            String userId = uid.getText().trim();
            String pass = new String(userPassword1.getPassword());
            UserModel loginUser = Project.getUserModel();
            String facilityId = loginUser.getFacilityModel().getFacilityId();

            String hashPass = HashUtil.MD5(pass);
            //String Algorithm = ClientContext.getString("addUser.password.hash.algorithm");
            //String encoding = ClientContext.getString("addUser.password.hash.encoding");
            //String charset = ClientContext.getString("addUser.password.hash.charset");
            //String charset = null;
            //String hashPass = CryptoUtil.createPasswordHash(Algorithm, encoding, charset, userId, pass);
            pass = null;

            final UserModel user = new UserModel();
            StringBuilder sb = new StringBuilder(facilityId);
            sb.append(IInfoModel.COMPOSITE_KEY_MAKER);
            sb.append(userId);
            user.setUserId(sb.toString());
            user.setPassword(hashPass);
            user.setSirName(sn.getText().trim());
            user.setGivenName(givenName.getText().trim());
            user.setCommonName(user.getSirName() + " " + user.getGivenName());

            // 施設情報
            // 管理者のものを使用する
            user.setFacilityModel(Project.getUserModel().getFacilityModel());

            // 医療資格
            int index = licenseCombo.getSelectedIndex();
            user.setLicenseModel(licenses[index]);

            // 診療科
            index = deptCombo.getSelectedIndex();
            user.setDepartmentModel(depts[index]);

            // MemberType
            // 管理者のものを使用する
            user.setMemberType(Project.getUserModel().getMemberType());

            // RegisteredDate
            if (Project.getUserModel().getMemberType().equals("ASP_TESTER")) {
                user.setRegisteredDate(Project.getUserModel().getRegisteredDate());
            } else {
                user.setRegisteredDate(new Date());
            }

            // Email
            user.setEmail(emailField.getText().trim());

            // Role = user
            RoleModel rm = new RoleModel();
            rm.setRole(usersRole);
            user.addRole(rm);
            rm.setUser(user);
            rm.setUserId(user.getUserId()); // 必要

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

            int maxEstimation = ClientContext.getInt("task.default.maxEstimation");
View Full Code Here

TOP

Related Classes of open.dolphin.infomodel.UserModel

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.