Package clips.login

Examples of clips.login.UserInfo


            return super.addNewPage(pageToAdd, afterPage);
        }

        @Override
        protected String makeTitle() throws ClipsException {
            UserInfo user = UserInfo.get();
            String spec = "";
            DirectoryCollaboratorItem collaborator = user.getCollaborator();
            DirectoryCollaboratorFunctions dcf = DirectoryLocator.getDirectory(DirectoryCollaboratorFunctions.class);
            Selector<DirectoryCollaboratorFunctionsItem> s = dcf.getFilteredItems(collaborator);
            if (s.size() == 0) {
                spec = "";
            } else {
                int i = 0;
                spec += s.get(i).getSpeciality();
                for (i = 1; i < s.size(); i++) {
                    String title = s.get(i).getSpeciality().getTitle();
                    if (spec.indexOf(title) < 0) {
                        spec += ", " + title;
                    }
                }
            }
            return user.getCollaborator().getLpu().getTitle() + ", " + user.getUserName() + (user.isSuperUser() ? " [СУПЕР-ПОЛЬЗОВАТЕЛЬ] " : " [" + spec + "]");
        }
View Full Code Here

TOP

Related Classes of clips.login.UserInfo

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.