Package org.opencustomer.util.configuration

Examples of org.opencustomer.util.configuration.UserConfiguration


           
            if(errors.isEmpty()) {
                request.getSession().setAttribute(Globals.USER_KEY, user);
                request.getSession().setAttribute(Globals.AUTHENTICATOR_KEY, new Authenticator(user));
                request.getSession().setAttribute(org.apache.struts.Globals.LOCALE_KEY, user.getLocale());
                request.getSession().setAttribute(Globals.CONFIGURATION_KEY, new UserConfiguration(user));
               
                MenuFactory menuFactory = (MenuFactory)request.getSession().getServletContext().getAttribute(Globals.MENU_FACTORY_KEY);
                Menu menu = menuFactory.getCustomizedMenu(AuthenticatorUtility.getAuthenticator(request));
                request.getSession().setAttribute(Globals.MENU_KEY, menu);
View Full Code Here


    @Override
    protected void search(PageContactForm form, ActionMessages errors, HttpServletRequest request)
    {
        UserVO user     = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        PersonVO person = (PersonVO)getPanel().getEntity();
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List list = null;
        long count = 0;

        Sort sort = null;
        if (form.getSort() == null)
            sort = new Sort(ContactDAO.SORT_CONTACTTIMESTAMP, false);
        else
            sort = Sort.parseParam(form.getSort());

        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramSubject = form.getSubject();
        String paramBoundType = form.getBoundType();
        String paramContactType = form.getContactType();
        String paramName = form.getName();
View Full Code Here

    @Override
    protected void search(PageJobForm form, ActionMessages errors, HttpServletRequest request)
    {
        UserVO user       = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        PersonVO person = (PersonVO) getPanel().getEntity();
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List list = null;
        long count = 0;

        Sort sort = ListAction.extractSort(getPanel(), "job_sort", form.getSort(), new Sort(JobListDAO.SORT_DUEDATE, true));
        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramSubject = form.getSubject();
        JobVO.Status[] paramStatus = null;
        if(form.getStatus() != null)
            paramStatus = new JobVO.Status[]{EnumUtility.valueOf(JobVO.Status.class, form.getStatus())};
View Full Code Here

   
    @Override
    protected void search(Panel panel, ListForm form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List<RoleVO> list = null;
        long count = 0;

        Sort sort = extractSort(panel, form, new Sort(RoleDAO.SORT_NAME, true));

        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramName = form.getName();
        RoleDAO.AdminSelect paramAdmin = EnumUtility.valueOf(RoleDAO.AdminSelect.class, form.getAdmin(), RoleDAO.AdminSelect.ALL);
       
        RoleDAO dao = new RoleDAO();
View Full Code Here

   
    @Override
    protected final void search(EntityPanel panel, AddRoleForm form, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO activeUser = (UserVO) request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List<RoleVO> list = null;
        long count = 0;

        Sort sort = extractSort(panel, form, UsergroupDAO.SORT_NAME);

        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramName = form.getName();

        RoleDAO.AdminSelect adminSelect = RoleDAO.AdminSelect.NOT_ADMIN;
        if(activeUser.getProfile().getRole().isAdmin())
View Full Code Here

   
    @Override
    protected void search(Panel panel, ListForm form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user   = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List list = null;
        long count = 0;

        Sort sort = extractSort(panel, form, new Sort(JobListDAO.SORT_DUEDATE, true));
        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramSubject = form.getSubject();
        boolean paramAssignedUser = form.isAssignedUser();
        JobVO.Status[] paramStatus = new JobVO.Status[] {JobVO.Status.IN_PROGRESS, JobVO.Status.PLANNED};
        if(form.getStatus() != null) {
View Full Code Here

   
    @Override
    protected void search(Panel panel, ListForm form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List<UsergroupVO> list = null;
        long count = 0;

        Sort sort = extractSort(panel, form, new Sort(UsergroupDAO.SORT_NAME, true));
        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramName = form.getName();
        UsergroupDAO.AdminSelect paramAdmin = EnumUtility.valueOf(UsergroupDAO.AdminSelect.class, form.getAdmin(), UsergroupDAO.AdminSelect.ALL);
               
        UsergroupDAO dao = new UsergroupDAO();
View Full Code Here

   
    @Override
    protected void search(Panel panel, ListForm form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List<UserVO> list = null;
        long count = 0;

        Sort sort = extractSort(panel, form, new Sort(UserDAO.SORT_USERNAME, true));
        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramUserName = form.getUserName();
        Boolean paramLocked = null;
        if (form.getLocked() != null)
            paramLocked = Boolean.parseBoolean(form.getLocked());
View Full Code Here

    private boolean disabled;
   
    @Override
    public int doStartTag() throws JspException
    {
        UserConfiguration conf = (UserConfiguration)pageContext.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        boolean isDisabled = disabled;
        if(pageContext.getAttribute("i_panel_editable") != null) {
            if(pageContext.getAttribute("i_panel_editable").equals(Boolean.FALSE))
                isDisabled = true;
        }
       
        if(!isDisabled) {
            StringBuilder builder = new StringBuilder();
           
            builder.append("<script type=\"text/javascript\">");
           
            if(pageContext.getAttribute("jsCalendar_isLocaleInitialized") == null) {
                initLocale(builder);
               
                pageContext.setAttribute("jsCalendar_isLocaleInitialized", Boolean.TRUE);
            }
           
            builder.append("Calendar.setup(");
            builder.append("{");
           
            builder.append("inputField : \""+input+"\",");
            builder.append("button : \""+button+"\",");
            if(formatKey != null) {
                String jsFormat = getJsFormat(formatKey);
                builder.append("ifFormat : \""+jsFormat+"\",");
   
                if(jsFormat.contains("%M")
                        ||jsFormat.contains("%H")
                        || jsFormat.contains("%k")
                        || jsFormat.contains("%I")
                        || jsFormat.contains("%l")) {
                    builder.append("showsTime : true,");
                    builder.append("singleClick : false,");
                }
   
                if(jsFormat.contains("%I")
                        || jsFormat.contains("%l")) {
                    builder.append("timeFormat : \"12\",");
                } else {
                    builder.append("timeFormat : \"24\",");
                }
            }
            builder.append("step : 5,");
            builder.append("firstDay : "+getJsFirstDayOfWeek(conf.getIntValue(UserConfiguration.Key.CALENDAR_FIRST_DAY_OF_WEEK)));
            builder.append("}");
            builder.append(");");
            builder.append("</script>");
           
            TagUtils.getInstance().write(pageContext, builder.toString());
View Full Code Here

   
    @Override
    protected void search(Panel panel, ListForm form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);
       
        List<CalendarListVO> list = null;
        long count = 0;

        Sort sort = null;
        if (form.getSort() == null)
            sort = new Sort(UserDAO.SORT_USERNAME, true);
        else
            sort = Sort.parseParam(form.getSort());

        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramUserName = form.getUserName();
        String paramFirstName = form.getFirstName();
        String paramLastName = form.getLastName();
        String paramName = form.getName();
View Full Code Here

TOP

Related Classes of org.opencustomer.util.configuration.UserConfiguration

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.